Support Questions

Find answers, ask questions, and share your expertise

nifi disabled controller-services and ConsumeJMS failed

avatar
Rising Star

When I use Nifi connect to IBM MQ, nifi disabled controller-services and ConsumeJMS failed.

I got the following error:

ConsumeJMS - null ConsumeJMS - null failed to process session due to java.lang.IllegalStateException: Cannot invoke method public abstract javax.jms.ConnectionFactory org.apache.nifi.jms.cf.JMSConnectionFactoryProviderDefinition.getConnectionFactory() on Controller Service with identifier 57fa0ec2-015a-1000-1377-c1374f9dd1c1 because the Controller Service is disabled: java.lang.IllegalStateException: Cannot invoke method public abstract javax.jms.ConnectionFactory org.apache.nifi.jms.cf.JMSConnectionFactoryProviderDefinition.getConnectionFactory() on Controller Service with identifier 57fa0ec2-015a-1000-1377-c1374f9dd1c1 because the Controller Service is disabled

nifi Error log:

2017-02-20 05:32:21,023 ERROR [Timer-Driven Process Thread-5] o.apache.nifi.jms.processors.ConsumeJMS ConsumeJMS - null ConsumeJMS - null failed to process session due to java.lang.IllegalStateException: Cannot invoke method public abstract javax.jms.ConnectionFactory org.apache.nifi.jms.cf.JMSConnectionFactoryProviderDefinition.getConnectionFactory() on Controller Service with identifier 57fa0ec2-015a-1000-1377-c1374f9dd1c1 because the Controller Service is disabled: java.lang.IllegalStateException: Cannot invoke method public abstract javax.jms.ConnectionFactory org.apache.nifi.jms.cf.JMSConnectionFactoryProviderDefinition.getConnectionFactory() on Controller Service with identifier 57fa0ec2-015a-1000-1377-c1374f9dd1c1 because the Controller Service is disabled 2017-02-20 05:32:21,025 ERROR [Timer-Driven Process Thread-5] o.apache.nifi.jms.processors.ConsumeJMS java.lang.IllegalStateException: Cannot invoke method public abstract javax.jms.ConnectionFactory org.apache.nifi.jms.cf.JMSConnectionFactoryProviderDefinition.getConnectionFactory() on Controller Service with identifier 57fa0ec2-015a-1000-1377-c1374f9dd1c1 because the Controller Service is disabled at org.apache.nifi.controller.service.StandardControllerServiceProvider$1.invoke(StandardControllerServiceProvider.java:172) ~[nifi-framework-core-1.1.1.jar:1.1.1] at com.sun.proxy.$Proxy139.getConnectionFactory(Unknown Source) ~[na:na] at org.apache.nifi.jms.processors.AbstractJMSProcessor.buildTargetResource(AbstractJMSProcessor.java:190) ~[na:na] at org.apache.nifi.jms.processors.AbstractJMSProcessor.onTrigger(AbstractJMSProcessor.java:134) ~[na:na] at org.apache.nifi.jms.processors.ConsumeJMS.onTrigger(ConsumeJMS.java:57) ~[na:na] at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27) ~[nifi-api-1.1.1.jar:1.1.1] at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1099) ~[nifi-framework-core-1.1.1.jar:1.1.1] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:136) [nifi-framework-core-1.1.1.jar:1.1.1] at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47) [nifi-framework-core-1.1.1.jar:1.1.1] at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132) [nifi-framework-core-1.1.1.jar:1.1.1] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_111] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_111] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_111] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_111] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_111] at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111]

JMSConnectionFactoryProvider settings:

12682-screenhunter-11-feb-20-0559.jpg

ConsumeJMS settings

12684-screenhunter-10-feb-20-0558.jpg

Any suggestion on how to solve this issue is appreciated.

Thanks a lot

Andy


screenhunter-10-feb-20-0558.jpg
1 ACCEPTED SOLUTION

avatar
Contributor

Andy, that is a great news!

If you don't mind, would you please post your working configuration here (masking user/password or course), so others can benefit from your experience.

Cheers

Oleg

View solution in original post

17 REPLIES 17

avatar
Contributor

What error are you getting now? Could you please post

Also, it appears form your configuration that your queue name is 'Q1' but in NiFi config you're using 'queue://NiFiMQ' instead of 'queue://Q1'

I am not MQ administrator and there is nothing specific to NiFi anyone on the MQ side needs to do. Do you have a plain Java program that is able to send/receive messages from MQ instance you have created. That would be the easiest way to debug. The information such as queue, channel, queueManager, transportType and many other is provided by MQ administrators and have no relevance to NiFi.

avatar
Contributor

Ok, based on your additional info that was just posted you are having a connection issue to localhost:1419

Have you explicitly change it from the default port of 1414? I know you have a config window that shows some kind of listener on on 1419, but I am not sure what that is.

In any event, you're definitely having networking issue so, let's try this and see if you can connect to either 1419 and 1414 via telnet. From the terminal window execute the following:

> telnet localhost 1419

Repeat the same for 1414

Let me know

avatar
Rising Star

@ozhurakousky

Hi Oleg,

I had re-installed IBM MQ and setting up the queue manager, Channel, listener, and queue.

I will do more testing on Nifi and post the result. Thanks a lot

Andy

avatar
Contributor

Yes, you can see there are two properties in ConsumeJMS processor User Name and Password. So you can provide them there.

avatar
Rising Star

@ozhurakousky

Hi Oleg,

I finally got the connection between Nifi and IBM MQ working now. It's some configuration issue on MQ.

Thank you very much for your help and time. I am very appreciated.

Andy

avatar
Contributor

Andy, that is a great news!

If you don't mind, would you please post your working configuration here (masking user/password or course), so others can benefit from your experience.

Cheers

Oleg

avatar
Rising Star

@ozhurakousky of course, I will post what I did on the IBM MQ here later today.

avatar
Rising Star

@ozhurakousky

Here is the steps to setup IBM MQ for the Nifi connection

1) Create queue manager myMQManager using MQ Explorer

2) create Channel and queue using the following commands

runmqsc myMQManager

def chl(myMQChannel) chltype(svrconn) replace

def chl(myMQChannel) chltype(clntconn) conname('localhost(1420)') QMNAME('myMQManager') replace

def ql(myMQqueue)

2) Grant necessary authorization for a user using MQ Explorer

2.1 Queue Manager Authorities Setting

right click your queue manager-->Object Authorities-->Add Role Based Authorities -->give the user access permission

2.2 Queue Authorities Setting

right click your queue-->Object Authorities-->Manage Authority Records-->Specific Profiles--> your queue--> Accumulated authorities-->setup your user Access Permission for the queue

3) After the configuration and setup your Nifi ConsumeJMS processor, you should be able connect to IBM MQ