Created on 02-20-2017 10:48 AM - edited 08-19-2019 04:00 AM
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:
ConsumeJMS settings
Any suggestion on how to solve this issue is appreciated.
Thanks a lot
Andy
Created 02-23-2017 06:44 PM
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
Created 02-21-2017 05:12 PM
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.
Created 02-21-2017 05:33 PM
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
Created 02-22-2017 09:14 PM
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
Created 02-22-2017 09:50 PM
Yes, you can see there are two properties in ConsumeJMS processor User Name and Password. So you can provide them there.
Created 02-23-2017 06:40 PM
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
Created 02-23-2017 06:44 PM
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
Created 02-23-2017 06:49 PM
@ozhurakousky of course, I will post what I did on the IBM MQ here later today.
Created 02-24-2017 10:29 PM
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