JMeter connect to queue IBM MQ webshare error JMSWMQ2013 - jmeter

I try to connect to queue by JMeter and IBM MQ Webshere like on the photo. I did .bindings file, ContextFactory, QueueConnectionFactory and MQQueueConnectionFactory. I did it like here : http://shekup.blogspot.se/2009/06/oc4j-mq-series-adaptor-with-mdb-30-as.html
in JMeter I have : enter image description here
And I don't know why I have error :
com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013: The
security authentication was not valid that was supplied for
QueueManager 'MYQM' with connection mode 'Client' and host name
'(1500)'. Please check if the supplied username and password are
correct on the QueueManager to which you are connecting.

Related

Can't connect to ibm mq using jms

I had a problem with connecting to the IBM MQ queue from Java. I tried to change the passwords for the service of the IBM MQ, create a connection without specifying a login and password, but nothing happens. I wrote the code:
Properties props = new Properties();
props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
props.setProperty(Context.PROVIDER_URL, "file:/D:/JNDI/");
try {
InitialContext initialContext = new InitialContext(props);
ConnectionFactory connectionFactory = (ConnectionFactory) initialContext.lookup(connectionFactoryName);
Destination destination = (Destination) initialContext.lookup(queueName);
initialContext.close();
Connection queueConnection = connectionFactory.createConnection("login", "password");// .createConnection();
which falls when I create a connection. I get an error:
JMSWMQ2013: Invalid credentials were passed to the queue manager QueueManager 'QM_LOCAL' in the 'Client' connection mode using the host 'localhost (1414)'.
Verify that the provided user name and password are correct in the queue administrator that you are connecting to.
can I turn off the authentication so that the method ".createConnection();" works? If not, where do I set the password? I Use the Windows.
Thanks.
p.s.: I get the completion code '2' ('MQCC_FAILED'), reason'2035' ('MQRC_NOT_AUTHORIZED').

FTP polling in OSB

I've created a ftp server on localhost:21
I created on OSB (I use OEPE to play with OSB) the proxy service called FTPpol
I configured FTPpol in this way:
General configuration(first tab): messaging service
Message Type Configuration: text in message requeste type and i leave the message response type on None
Transport Configuration: protocol: ftp and Endpoint Uri: ftp://127.0.0.1/
FTP Transport Configuration: User Authentication: External User and i use a service account previously created (with the username and password need to access to ftp)
After this configuration I receive a connection error on the console everytime the proxy try the polling. The username and password are correct and the server ftp is up and reachable.
Any suggestion?
My suggestion is to use an adapter for it, as seem here:
https://blogs.oracle.com/MarkSmith/entry/osb_and_ftp_adapter_in_11g

Importing MQ data into HDFS

I want to import websphere MQ messages to my hadoop VM using Flume.I have not used MQ before and installed MQ version 8.0.0.4 on my windows machine and created JNDI binding . I have copied that JNDI binding file to the /etc/flume/conf location and created conf file for flume. Once i have started the Flume agent i am getting below error:-
Caused by: com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager 'JMSDEMO' with connection mode 'Client' and host name 'XXX.XXX.XX.XX(1414)'
Below are the errors in the Log file of Websphere MQ:-
4/20/2016 22:00:18 - Process(14396.9) User(MUSR_MQADMIN) Program(amqrmppa.exe)
Host(armaan) Installation(Installation1)
VRMF(8.0.0.4) QMgr(JMSDEMO)
AMQ9245: Unable to obtain account details for channel MCA user ID.
EXPLANATION:
WebSphere MQ was unable to obtain the account details for MCA user ID 'root'.
This user ID was the MCA user ID for channel 'SYSTEM.DEF.SVRCONN' on queue
manager 'JMSDEMO' and may have been defined in the channel definition, or
supplied either by a channel exit or by a client.
ACTION:
Ensure that the user ID is correct and that it is defined on the Windows local
system, the local domain or on a trusted domain. For a domain user ID, ensure
that all necessary domain controllers are available.
----- cmqxrsrv.c : 2140 -------------------------------------------------------
4/20/2016 22:00:18 - Process(6376.20) User(MUSR_MQADMIN) Program(amqzlaa0.exe)
Host(armaan) Installation(Installation1)
VRMF(8.0.0.4) QMgr(JMSDEMO)
AMQ7227: WebSphere MQ encountered the following network error: The trust
relationship between this workstation and the primary domain failed.
EXPLANATION:
MQ failed to successfully complete a network operation due to the specified
error. If the error is encountered on systems that are part of a Windows 2000
domain it can indicate incorrect DNS or WINS configuration.
ACTION:
Ensure that your network is functioning correctly. On the Windows platform
check DNS and/or WINS settings to ensure that domain controllers, used for
authentication or authorisation functions, are accessible.
----- amqxsecn.c : 5125 -------------------------------------------------------
4/20/2016 22:00:18 - Process(6376.20) User(MUSR_MQADMIN) Program(amqzlaa0.exe)
Host(armaan) Installation(Installation1)
VRMF(8.0.0.4) QMgr(JMSDEMO)
AMQ8075: Authorization failed because the SID for entity 'root' cannot be
obtained.
EXPLANATION:
The Object Authority Manager was unable to obtain a SID for the specified
entity. This could be because the local machine is not in the domain to locate
the entity, or because the entity does not exist.
ACTION:
Ensure that the entity is valid, and that all necessary domain controllers are
available. This might mean creating the entity on the local machine.
----- amqzfubn.c : 2421 -------------------------------------------------------
4/20/2016 22:00:18 - Process(6376.20) User(MUSR_MQADMIN) Program(amqzlaa0.exe)
Host(armaan) Installation(Installation1)
VRMF(8.0.0.4) QMgr(JMSDEMO)
AMQ7227: WebSphere MQ encountered the following network error: The trust
relationship between this workstation and the primary domain failed.
EXPLANATION:
MQ failed to successfully complete a network operation due to the specified
error. If the error is encountered on systems that are part of a Windows 2000
domain it can indicate incorrect DNS or WINS configuration.
ACTION:
Ensure that your network is functioning correctly. On the Windows platform
check DNS and/or WINS settings to ensure that domain controllers, used for
authentication or authorisation functions, are accessible.
----- amqxsecn.c : 5125 -------------------------------------------------------
4/20/2016 22:00:18 - Process(6376.20) User(MUSR_MQADMIN) Program(amqzlaa0.exe)
Host(armaan) Installation(Installation1)
VRMF(8.0.0.4) QMgr(JMSDEMO)
AMQ8075: Authorization failed because the SID for entity 'root' cannot be
obtained.
EXPLANATION:
The Object Authority Manager was unable to obtain a SID for the specified
entity. This could be because the local machine is not in the domain to locate
the entity, or because the entity does not exist.
ACTION:
Ensure that the entity is valid, and that all necessary domain controllers are
available. This might mean creating the entity on the local machine.
----- amqzfubn.c : 2421 -------------------------------------------------------
4/20/2016 22:00:18 - Process(14396.9) User(MUSR_MQADMIN) Program(amqrmppa.exe)
Host(armaan) Installation(Installation1)
VRMF(8.0.0.4) QMgr(JMSDEMO)
AMQ9557: Queue Manager User ID initialization failed for 'root'.
EXPLANATION:
The call to initialize the User ID 'root' failed with CompCode 2 and Reason
2035.
ACTION:
Correct the error and try again.
----- cmqxrsrv.c : 2321 -------------------------------------------------------
I have submitted the flume command from VM as root user.
I know i had done something wrong with MQ settings as i have noprevious experience with MQ . Please help .
I know i had done something wrong with MQ settings as i have
no previous experience with MQ.
How about doing some self-training and read the documentation. There is a whole section in the MQ Knowledge Center about MQ & JMS. Please read it here. Or you could go to the largest conference in the world solely dedicated to IBM MQ (aka WebSphere MQ & MQSeries) - MQ Technical Conference v2.0.1.6.
Just put the credentials as follows:
QueueConnection conn = cf.createQueueConnection(userID, password);

IBM Websphere MQ authentication error while accessing channel

I am using IBM Websphere MQ 7.5 in Unix system. I have installed the client on my machine and server is running on other machine. I am observing a scenario where I am able to communicate with server when running my JMS application via 'mqm' user but facing below mentioned error when using other user.
But I am able to run 'amqsputc' and 'amqsgetc' command and communicate with the server with mqm as well as other user also. I have followed all steps mentioned http://www-01.ibm.com/support/knowledgecenter/SSFKSJ_7.5.0/com.ibm.mq.ins.doc/q009300_.htm?lang=en
Exception:
com.ibm.msg.client.jms.DetailedJMSSecurityException: JMSWMQ2013: The security authentication was not valid that was supplied for QueueManager 'TestManager' with connection mode 'Client' and host name 'x.x.x.x(9923)'.
Please check if the supplied username and password are correct on the QueueManager to which you are connecting.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:521)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:221)
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:426)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createV7ProviderConnection(WMQConnectionFactory.java:6902)
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6277)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createConnection(JmsConnectionFactoryImpl.java:285)
at com.ibm.mq.jms.MQConnectionFactory.createCommonConnection(MQConnectionFactory.java:6233)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:120)
at com.ibm.mq.jms.MQQueueConnectionFactory.createConnection(MQQueueConnectionFactory.java:203)
at performance.IBMMQTestProducer.start(IBMMQTestProducer.java:142)
at performance.IBMMQTestProducer.main(IBMMQTestProducer.java:177)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2035' ('MQRC_NOT_AUTHORIZED').**
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:209)
... 9 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2035;AMQ9509: Program cannot open queue manager object. [1=2035,5=???]**
at com.ibm.mq.jmqi.internal.JmqiTools.getQueueManagerInfo(JmqiTools.java:783)
at com.ibm.mq.jmqi.remote.impl.RemoteSession.loadInfo(RemoteSession.java:1993)
at com.ibm.mq.jmqi.remote.impl.RemoteSession.getName(RemoteSession.java:2026)
at com.ibm.mq.jmqi.remote.api.RemoteHconn.getName(RemoteHconn.java:728)
at com.ibm.mq.ese.intercept.JmqiConnInterceptorImpl.validate(JmqiConnInterceptorImpl.java:321)
at com.ibm.mq.ese.intercept.JmqiConnInterceptorImpl.afterConnect(JmqiConnInterceptorImpl.java:226)
at com.ibm.mq.ese.intercept.JmqiConnInterceptorImpl.afterJmqiConnect(JmqiConnInterceptorImpl.java:133)
at com.ibm.mq.ese.jmqi.InterceptedJmqiImpl.jmqiConnect(InterceptedJmqiImpl.java:315)
at com.ibm.mq.ese.jmqi.ESEJMQI.jmqiConnect(ESEJMQI.java:337)
I am able to run it when I am running as myself and passing 'mqm' when starting the connection.
connection = cf.createConnection("mqm", "pswd");
I am not getting anything in manager's log. Below is the log.
------------------------------------------------------------------------------
10/30/2015 06:50:54 AM - Process(31064.1) User(mqm) Program(strmqm)
Host(x.x.x.x) Installation(Installation1)
VRMF(7.5.0.2)
AMQ7125: There are 83 days left in the trial period for this copy of WebSphere
MQ.
EXPLANATION:
This copy of WebSphere MQ is licensed for a limited period only.
ACTION:
None.
Given that you have told us that you have successfully connected and run the amqsgetc and amqsputc client samples using the same server-connection channel as you are attempting to use for your JMS program that suggests that this is not a connection time problem, in other words the MQCONN to the queue manager has been successful and something following that is failing. We know that you can MQPUT and MQGET (since that is what the aforementioned samples do).
Something that JMS does that those simple samples do not do, is an MQINQ of the queue manager. The following part of your exception makes me wonder if that is what you are tripping over:-
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2035;
AMQ9509: Program cannot open queue manager object. [1=2035,5=???] at
com.ibm.mq.jmqi.internal.JmqiTools.getQueueManagerInfo(JmqiTools.java:783) at
To be completely certain you must check the queue manager AMQERR01.LOG to see what is reported there. If it is missing authorization then it will tell you there.

IBM Cast Iron: MQ Put activity issues

I am trying to put a message into Websphere MQ queue from an Orchestration which is deployed on Cast Iron Live. I have used secure connector since the orchestation is deployed on Cast Iron. When I am trying to execute the flow, it fails and the message is not placed in MQ queue. The below are the errors:
Error while trying to call remote operation execute on Secure Connector for activity
com.approuter.module.mq.activity.MqPut and Secure Connector LocalSecureConnector,
error is Unable to put message on queue null. MQ returned error code 2538.
Unable to put message on queue null. MQ returned error code 2538.
Fault Name : Mq.Put.OperationActivityId : 163
Message: Unable to put message on queue null. MQ returned error code 2538.
Activity Name:Put MessageFault Time: 2015-07-15T05:40:29.711Z
Can someone please help me resolve this. Please let me know if any further details are required.
Here are the details:
Cast Iron flow is deployed on Cast Iron Cloud i.e Cast Iron Live
MQ is running on-premise
The port I am trying to connect is 1414.
Have a secure connector running on the machine where MQ is installed.
MQ version is 8.
In Cast Iron flow, I am using an MQ connector, by giving the hostname where MQ is running, port: 1414, Channel Name : SYSTEM.DEF.SVRCONN and username as mqm. Tired using my log on username, by adding it to mqm group. But this also dosent seem to work.
The return code is instructive:
2538 0x000009ea MQRC_HOST_NOT_AVAILABLE
This indicates that Cast Iron is attempting to contact MQ using a client connection and not finding a listener at the host/port that it is using.
There are a couple of possibilities here but not enough info to say which it might be. I'll explain and provide some diagnostics you can try.
The 2538 indicates an attempt to contact the QMgr has failed. This might be that, for example, the QMgr isn't listening on the configured port (1414) or that the MQ listener is not running.
The error code says the queue name is "null". The question doesn't specify which queue name the connector is configured with but presumably it's been configured with some queue name. This error code suggests the Secure Connector on the MQ server side doesn't have its configuration installed.
The Cast Iron docs advise connecting with an ID in the mqm group but do not mention that on any MQ version 7.1 or higher this is guaranteed to fail unless special provisions are made to allow the admin connection. It may be that it's actually failing for an authorization error and the connector not reporting the correct error.
If it is as simple as the listener not running, that's easy enough to fix. Just start it and make sure it's on 1414 as expected.
Next, ensure that the Secure Connector has the configuration that was created using the Cast Iron admin panel. You need to understand why the error code says the queue name is null.
Now enable Authorization Events and Channel Events in the QMgr and try to connect again. The connector on the MQ server should connect when started and if successful you can see this by looking at the MQ channel status. However, if unsuccessful, you can tell by looking at the event messages or the MQ error logs. Both of these will show authorization failures and connection attempts, if the connection has made it that far.
The reason I'm expecting 2035 Authorization Error failures is that any QMgr from v7.1 and up will by default allow an administrative connection on any channel. This is configured in the default set of CHLAUTH rules. The intent is that the MQ admin would have to explicitly provision admin access by adding one or more new CHLAUTH rules.
For reasons of security SYSTEM.DEF.* and SYSTEM.AUTO.* channels should never be used for legitimate connections. The Best Practice is to define a new SVRCONN, for example one named CAST.IRON.SVRCONN and then define a CHLAUTH rule to allow the administrative connection.
For example:
DEFINE CHL(CAST.IRON.SVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP) REPLACE
SET CHLAUTH('CAST.IRON.SVRCONN') TYPE(ADDRESSMAP) +
ADDRESS('127.0.0.1') +
USERSRC(MAP) MCAUSER('mqm') +
ACTION(REPLACE)
SET CHLAUTH('CAST.IRON.SVRCONN') TYPE(BLOCKUSER) +
USERLIST('*NOBODY') +
WARN(NO) ACTION(REPLACE)
The first statement defines the new channel.
The next one allows the connections from 127.0.0.1 which is where the Secure Connector lives. (Presumably you installed the internal Secure Connection on the same server as MQ, yes?) Ideally the connector would use TLS on the channel and instead of IP filtering the CHLAUTH rule would filter based on the certificate Distinguished Name. This rule is not nearly so slective and allows anyone on the local host to be an MQ administrator by using this channel.
The last statement overrides the default CHLAUTH rule which blocks *MQADMIN with a new rule that blocks *NOBODY but just for that channel.

Resources