0

I have two linux servers, one with the MQ Server version 8.0.0.6 and the other one with the MQ Client 8.0.0.4 installed. The application deployed in the Client(WebSphere Application) is not able to connect to the MQ server, it gives me an error that says:

JMSWMQ0018: Failed to connect to queue manager 'AEDMQ03A' with connection mode 'Client' and host name 'hostname(1414)'

I verified in the MQ Server that the queue manager AEDMQ03A is running, the AEDMQ03A listener is running on port 1414. I also could establish a connection from the client to the server with telnet MQhost 1414.

I checked the channels for qmgr AEDMQ03A(in the MQServer) with:

DISPLAY CHANNEL(AEDMQ03A,*) ALL

but i didn't find any channel from AEDMQ03A to the MQ Client host. I know that the command to create channels is:

DEFINE CHANNEL(JAVA.CHANNEL) CHLTYPE(SVRCONN) TRPTYPE(TCP)

In this particular case it would be something like DEFINE CHANNEL(AEDMQ03A.X) CHLTYPE(Y) TRPTYPE(TCP), but I am not quite sure what to type on the X variable, because in the MQ Client there are no qmgrs created. And i don't know what channel type should be if I want the connection from the MQ Client to the MQServer.


I created a local queue (QUEUE_TEST) to test the connection from the MQ Client to the qmanager AEDMQ03A in the MQ Server. I did the following:

1) start the AEDMQ03A queue manager, also made sure the listener is started too

2) create the svrconn channel with the command:

DEFINE CHANNEL(A03ZCIWAS) CHLTYPE(SVRCONN) TRPTYPE(TCP)

On the Client:

set the MQSERVER=A03ZCIWAS/TCP/'ip_adress_MQServer(1414)'

and then when i try with ./amqsputc QUEUE_TEST AEDMQ03A it gives me the error:

MQCONNX ended with reason code 2035

I know this error is a permission issue and I tried to solve it with setmqaut -m AEDMQ03A -t qmgr -g mqm +alladm +set, but it still giving me the same error.

JoshMc
  • 10,239
  • 2
  • 19
  • 38
user3105533
  • 321
  • 3
  • 11
  • What channel are you specifying on the client side. A channel is defined on the queue manager of type SVRCONN. On the client you specify that channel name to use when you connect. In some cases you can use a client channel definition table (CCDT) which is a binary file that contains what are referenced as CLNTCONN channels, but they do not need to be created on a queue manager. – JoshMc Sep 06 '17 at 20:02
  • If you want to see what channels are running you would use a command like `DIS CHS(*)`. – JoshMc Sep 06 '17 at 20:04
  • On the queue manager check the logs under `/var/mqm/qmgrs/AEDMQ03A/errors/AMQERR01.LOG` to see what if any error you receive at the time the client tries to connect. It could be "channel not found" or something similar. – JoshMc Sep 06 '17 at 20:06
  • Do you see my comments above? I addressed the question you asked on the answer below. The advise to turn off security is not good in my opinion, you should set things up correctly even in testing situations to you are aware of what is needed in production situations. – JoshMc Sep 08 '17 at 03:14
  • In your question you state `MQ Server version 8.0.0.6 ` and then state `Client(WebSphere Application)`. As of v8, the product is no longer branded under the WebSphere brand is and simply IBM MQ now. When you say `WebSphere Application` are you referring to a IBM MQ Classes for JMS application running in a WebSphere Application server? If not what type of language is your application written in? I noted in your update you mention `amqsputc`, will you be writing a C application? – JoshMc Sep 08 '17 at 03:17
  • In MQ v7.1 and higher there are default CHLAUTH rules in place that block all MQ Admin connections. The recommended setup is to create a user that is not part of the mqm group that you will associate with the application. With v8.0 and later you can also do username/password authentication. You have to give the non-mqm group user specific permissions to connect to the queue manager and put to the queue. – JoshMc Sep 08 '17 at 03:22
  • Hi, I was setting the permissions for the wrong user(mqm), once I gave the right permissions it allowed me to send the message from de MQ Client to the qmgr. – user3105533 Sep 11 '17 at 00:31

1 Answers1

0

You need to create a channel with type SVRCONN

runmqsc > DEFINE CHANNEL(AEDMQ03A.SVRCONN) CHLTYPE(SVRCONN) TRPTYPE(TCP)

And for testing purpose [ONLY] try disabling the Security - If you have NOT done the 'setmqaut' for client users already

runmqsc > SET CHLAUTH('AEDMQ03A.SVRCONN') TYPE(BLOCKUSER) USERLIST('nobody')

runmqsc > alter authinfo(SYSTEM.DEFAULT.AUTHINFO.IDPWOS) AUTHTYPE(IDPWOS) CHCKCLNT(NONE)

runmqsc > REFRESH SECURITY (*)

runmqsc > end

Try connecting and share the details.

M I P
  • 867
  • 10
  • 25
  • I defined a channel with svrconn, but I also defined if for clntconn . Is that correct? – user3105533 Sep 07 '17 at 17:48
  • You dont need a Client connection channel to connect. Check the answer here : https://stackoverflow.com/questions/11304163/when-to-use-client-connection-channel-in-mq – M I P Sep 08 '17 at 09:42
  • Also, You have mentioned that you are trying to connect websphere application to MQ, in that case you should be using a QCF to connect to MQ - which contains all the connection details. Regarding security, I totally agree with @JoshMc that you should not disable security even in test env as the PROD settings are derived from your test environment. – M I P Sep 08 '17 at 09:51