Author |
Message
|
fooey |
Posted: Fri Jun 10, 2011 11:23 am Post subject: MQ Client Connectivity Issues |
|
|
Newbie
Joined: 10 Jun 2011 Posts: 7
|
I will try to describe my problem succintly but descriptively. I have an MQ server running on a CentOS machine and am attempting to connect to it with a Windows client.
There is a listener named DEFAULT_LISTENER running on port 1414:
display lsstatus(default_listener)
1 : display lsstatus(default_listener)
AMQ8631: Display listener status details.
LISTENER(DEFAULT_LISTENER) STATUS(RUNNING)
PID(11977) STARTDA(2011-06-10)
STARTTI(09.03.25) DESCR( )
TRPTYPE(TCP) CONTROL(MANUAL)
IPADDR(*) PORT(1414)
BACKLOG(100)
There is a SVRCONN channel:
display channel(default_channel)
2 : display channel(default_channel)
AMQ8414: Display Channel details.
CHANNEL(DEFAULT_CHANNEL) CHLTYPE(SVRCONN)
ALTDATE(2011-06-10) ALTTIME(09.07.17)
COMPHDR(NONE) COMPMSG(NONE)
DESCR(Auto-defined by) HBINT(300)
KAINT(AUTO) MAXINST(999999999)
MAXINSTC(999999999) MAXMSGL(4194304)
MCAUSER( ) MONCHL(QMGR)
RCVDATA( ) RCVEXIT( )
SCYDATA( ) SCYEXIT( )
SENDDATA( ) SENDEXIT( )
SHARECNV(10) SSLCAUTH(REQUIRED)
SSLCIPH( ) SSLPEER( )
TRPTYPE(TCP)
executing ./amqsget and ./amqsput work correctly on the server (on a local queue named TESTQ1).
Now I'm trying to connect a Windows client to that, so I set the MQSERVER=DEFAULT_CHANNEL/TCP/TESTBROKER
When I run amqscnxc I get:
Sample AMQSCNXC start
Connecting to the default queue manager
with no client connection information specified.
MQCONNX ended with reason code 2538
The error log says:
AMQ9202: Remote host 'testbroker (1414)' not available, retry
later.
EXPLANATION:
The attempt to allocate a conversation using TCP/IP to host 'testbroker (1414)' was not successful. However the error may be a
transitory one and it may be possible to successfully allocate a TCP/IP
conversation later.
ACTION:
Try the connection again later. If the failure persists, record the error
values and contact your systems administrator. The return code from TCP/IP is
10060 (X'274C'). The reason for the failure may be that this host cannot reach
the destination host. It may also be possible that the listening program at
host 'testbroker (1414)' was not running. If this is the case,
perform the relevant operations to start the TCP/IP listening program, and try
again.
Obviously testbroker is the name of my CentOS box. I removed the IP after each time it says the name testbroker in that error message, fyi. Trying amqsputc and amqsgetc yield the same result. I can ping testbroker from the client just fine, and I have a listener running on the correct port and a server_conn channel set up on the server, so I cannot figure out why it can't connect. I've been chasing this around for several hours now, reading all sorts of documentation, and can't seem to figure it out. Any help or pointers would be greatly appreciated. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jun 10, 2011 11:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Does it work with amqsputc and amqsgetc?
Is port 1414 open? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 10, 2011 11:35 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
what is the result of
Code: |
telnet testbroker 1414 |
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
fooey |
Posted: Fri Jun 10, 2011 11:46 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2011 Posts: 7
|
I thought the "c" in amqsgetc and amqsputc was for client, so I hadn't tried them on them the server. Trying that though gives me this:
[root@testbroker bin]# ./amqsgetc TESTQ1
Sample AMQSGET0 start
MQCONN ended with reason code 2058
I'm also very new to linux, so how do I check if a port is open?
Here's the result of the telnet command:
[root@testbroker bin]# telnet testbroker 1414
testbroker/1414: Name or service not known
But that's trying to telnet to itself, so should that even work? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jun 10, 2011 11:49 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fooey wrote: |
I thought the "c" in amqsgetc and amqsputc was for client, so I hadn't tried them on them the server. |
There's no good reason why you can't client onto somthing from the same box
fooey wrote: |
[root@testbroker bin]# ./amqsgetc TESTQ1
Sample AMQSGET0 start
MQCONN ended with reason code 2058 |
You're missing a parameter
fooey wrote: |
I'm also very new to linux, so how do I check if a port is open? |
With the telnet command my most worthy associate posted.
fooey wrote: |
Here's the result of the telnet command:
[root@testbroker bin]# telnet testbroker 1414
testbroker/1414: Name or service not known |
Found your problem.
fooey wrote: |
But that's trying to telnet to itself, so should that even work? |
If it's configured to. I think the idea was to try telneting from wherever you're trying to run the client, to see if that could connect..... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fooey |
Posted: Fri Jun 10, 2011 12:02 pm Post subject: |
|
|
Newbie
Joined: 10 Jun 2011 Posts: 7
|
Vitor wrote: |
You're missing a parameter |
I'm using the default queue manager, so isn't that parameter optional? Anyway, here's the result including the queue manager name:
[root@testbroker bin]# ./amqsgetc TESTQ1 QM_DEFAULT
Sample AMQSGET0 start
MQCONN ended with reason code 2058
Same result, unless I'm just wildly confused and that's not the parameter I was missing
Vitor wrote: |
I think the idea was to try telneting from wherever you're trying to run the client, to see if that could connect..... |
Well my client is a Windows machine. I'm in the middle of reading about how telnet was stripped out of Windows after XP or something. What's the best way to telnet into something from Windows 7? Hyperterminal or putty or something? |
|
Back to top |
|
 |
fooey |
Posted: Fri Jun 10, 2011 12:09 pm Post subject: |
|
|
Newbie
Joined: 10 Jun 2011 Posts: 7
|
Ok, I installed Window's command line telnet option
It hangs for like 15 seconds, then:
Connecting To testbroker...Could not open connection to the host, on port 1414:
Connect failed
Ok, so there's my problem. Now how do I go about addressing it? |
|
Back to top |
|
 |
Vitor |
Posted: Fri Jun 10, 2011 12:27 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fooey wrote: |
Ok, so there's my problem. Now how do I go about addressing it? |
Look for firewall software that blocks port 1414 on the box where the listener is running.
Rerun the command using the IP address rather than the hostname.
And speak to your network people. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri Jun 10, 2011 7:18 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Vitor wrote: |
fooey wrote: |
Ok, so there's my problem. Now how do I go about addressing it? |
Look for firewall software that blocks port 1414 on the box where the listener is running.
Rerun the command using the IP address rather than the hostname.
And speak to your network people. |
And make sure the firewall that's blocking you is not the windows firewall...
I noticed also in your previous posts that you did not specify any environment variable setting.
You should look at the client manual in the infocenter...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
exerk |
Posted: Sat Jun 11, 2011 2:28 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
fjb_saper wrote: |
...I noticed also in your previous posts that you did not specify any environment variable setting... |
Buried in the middle of the original post  _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jun 11, 2011 8:53 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
exerk wrote: |
fjb_saper wrote: |
...I noticed also in your previous posts that you did not specify any environment variable setting... |
Buried in the middle of the original post  |
For windows yes but when trying a client connect on the linux box?  _________________ MQ & Broker admin |
|
Back to top |
|
 |
PeterPotkay |
Posted: Sat Jun 11, 2011 9:05 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
fooey wrote: |
Vitor wrote: |
You're missing a parameter |
I'm using the default queue manager, so isn't that parameter optional? |
That parameter is optional for MQ Clients, whether connecting to a default QM or a non default QM.
fooey, eliminate any bad channel tables or bad environmental variables from the mix by trying to connect using the amqscnxc sample app and providing the channel name and the hostname directly. Post the results.
Code: |
amqscnxc -c YouChannelNameHere -x YourHostName(Port#) |
If that fails with an MQ Reason Code that says you can't connect to the QM because its not available, try connecting to that port with a telnet test and post the results.
Code: |
telnet <YourHostNameHere> <YourMQportNumberHere> |
And looking at your first post, DEFAULT_CHANNEL is not the same as default_channel. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
fooey |
Posted: Mon Jun 13, 2011 6:46 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2011 Posts: 7
|
exerk wrote: |
fjb_saper wrote: |
...I noticed also in your previous posts that you did not specify any environment variable setting... |
Buried in the middle of the original post  |
I said in my original post I set MQSERVER=DEFAULT_CHANNEL/TCP/TESTBROKER. Is that the environment variable you're talking about? I also tried setting MQ_USER_ID and MQ_PASSWORD to the root login on the linux box. Is that the username and password that I should be putting there? Anyway, when I tried that, I got the exact same error.
PeterPotkay wrote: |
fooey, eliminate any bad channel tables or bad environmental variables from the mix by trying to connect using the amqscnxc sample app and providing the channel name and the hostname directly. Post the results.
Code: |
amqscnxc -c YouChannelNameHere -x YourHostName(Port#) |
If that fails with an MQ Reason Code that says you can't connect to the QM because its not available, try connecting to that port with a telnet test and post the results.
Code: |
telnet <YourHostNameHere> <YourMQportNumberHere> |
And looking at your first post, DEFAULT_CHANNEL is not the same as default_channel. |
Specifying the channel and host in the amqscnxc command yielded the same thing.
Code: |
C:\Users\Matt>amqscnxc -c DEFAULT_CHANNEL -x testbroker
Sample AMQSCNXC start
Connecting to the default queue manager
using the server connection channel DEFAULT_CHANNEL
on connection name testbroker.
MQCONNX ended with reason code 2538 |
Trying to telnet in failed also, as I said to Vitor earlier, but I can successfully ping it at least.
Code: |
C:\Users\Matt>telnet testbroker 1414
Connecting To testbroker...Could not open connection to the host, on port 1414:
Connect failed |
I know default_channel and DEFAULT_CHANNEL are not the same, except when entering MQSC commands. Without quotes everything defaults to all caps, so I lazily just type default_channel, since really it's the exact same thing. The real name of the channel is in all caps though, and when typing it anywhere other than an MQSC command, I type it in all caps. I wish that had been my problem though! Easy fix.
So right now, I'm talking to our network people and trying to figure out if there are any firewalls running. On the server I scanned with nmap and it says port 1414 is open. I also looked at the iptables which seem to say communications on that port should be accepted, if I'm reading the iptables correctly. If our network people come back and say there is no firewall there, any advice on a next point of action? |
|
Back to top |
|
 |
fooey |
Posted: Mon Jun 13, 2011 6:52 am Post subject: |
|
|
Newbie
Joined: 10 Jun 2011 Posts: 7
|
Oh and also as Vitor suggested, I tried all of this (telnet, amqscnxc, MQSERVER variable, etc.) using the IP address instead of the host name, but it behaved identically in all cases. amqscnxc still gives me an error with reason code 2538. |
|
Back to top |
|
 |
Vitor |
Posted: Mon Jun 13, 2011 7:00 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
fooey wrote: |
I know default_channel and DEFAULT_CHANNEL are not the same, except when entering MQSC commands |
No, even then. The wrapping of names without quotes just explains the convention to have things in upper case.
This is more for the benefit of future readers, who I'd hate to gain the false impression that naming rules differ in different places.
fooey wrote: |
So right now, I'm talking to our network people and trying to figure out if there are any firewalls running. |
This seems like the next place to look. If you can't telnet to port 1414, nothing else is likely to make it either. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|