Author |
Message
|
rib445 |
Posted: Sat Sep 23, 2017 7:49 am Post subject: Trouble setting up a mq client access to queue 2058 |
|
|
Newbie
Joined: 23 Sep 2017 Posts: 7
|
Hi
I've followed the instructions on this page to the letter to create a QMGR, QLOCAL and Channel using MQ Series 9.0.3
www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.ins.doc/q009310_.htm
However when I write a message to the queue from a remote machine I get the error below:-
"2058 - Q Mgr Name Error"
I've found the errors directory but none of the files are updated when doing this.
Its the first time I'm setting up a new queue so I'm sure I'm just missing some step.
Thanks |
|
Back to top |
|
 |
exerk |
Posted: Sat Sep 23, 2017 8:09 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Please post how you are invoking the client channel, e.g. using the amqsputc sample programme.
At the bottom of the page the url above refers to is a link to setting up the client; did you follow the instructions in that other link? _________________ 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 |
|
 |
rib445 |
Posted: Sat Sep 23, 2017 12:36 pm Post subject: |
|
|
Newbie
Joined: 23 Sep 2017 Posts: 7
|
I was using some software developed in-house that writes/reads to queues. I can try amqsputc following the link at the bottom of the page for this.
If I try on the local machine (v9.0.3.0):
Code: |
[root@svr110 bin]# ./amqsput QUEUE1 QM_TEST
Sample AMQSPUT0 start
target queue is QUEUE1
Sample AMQSPUT0 end
|
And I'm able to read that message by using the get sample program.
But, if I try on a remote machine running MQ v7.5.0.2 I get the following error:
Code: |
[root@svr060 bin]# ./amqsputc QUEUE1 QM_TEST
Sample AMQSPUT0 start
MQCONN ended with reason code 2058
|
So either it seems there is a different response for remote connections or a compatibility problem |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Sep 23, 2017 1:33 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Did you SET MQ environment variables? MQSERVER= _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
rib445 |
Posted: Sat Sep 23, 2017 1:49 pm Post subject: |
|
|
Newbie
Joined: 23 Sep 2017 Posts: 7
|
Yes,
export MQSERVER=CHANNEL1/TCP/'svr110(1415)'
I get different error codes if I amend the above to other values |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Sep 23, 2017 2:20 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
The URL you posted is for setting up the queue manager on the server platform - not the client platform. What procedure are you following to enable a client connection on the client platform?
Please be precise. What different errors?
Amend what? What other values?
It would help if you post the entire conversation from the client shell. Post all of the ENV variables before you issue the amqsputc command? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
rib445 |
Posted: Sun Sep 24, 2017 1:03 am Post subject: |
|
|
Newbie
Joined: 23 Sep 2017 Posts: 7
|
bruce2359 wrote: |
The URL you posted is for setting up the queue manager on the server platform - not the client platform. What procedure are you following to enable a client connection on the client platform? |
I'm following the instructions on the URLs under what to do next, ie.
Connecting a WebSphere MQ MQI client to a queue manager, using the MQSERVER environment variable
Testing communication between a client and a server
Quote: |
Please be precise. What different errors? Amend what? What other values? It would help if you post the entire conversation from the client shell. |
Code: |
-bash-4.1$ export MQSERVER=CHANNEL1/TCP/'svr110(1415)'
-bash-4.1$ ./amqsputc QUEUE1 QM_TEST
Sample AMQSPUT0 start
MQCONN ended with reason code 2058
-bash-4.1$ export MQSERVER=CHANNELX/TCP/'svr110(1415)'
-bash-4.1$ ./amqsputc QUEUE1 QM_TEST
Sample AMQSPUT0 start
MQCONN ended with reason code 2540
-bash-4.1$ export MQSERVER=CHANNEL1/TCP/'svr112(1415)'
-bash-4.1$ ./amqsputc QUEUE1 QM_TEST
Sample AMQSPUT0 start
MQCONN ended with reason code 2538
|
Reason codes:
2058 - MQRC_Q_MGR_NAME_ERROR
2540 - MQRC_UNKNOWN_CHANNEL_NAME
2538 - MQRC_HOST_NOT_AVAILABLE
2540 and 2538 are expected since I entered invalid channel and host names but 2058 doesn't make sense since it worked where client and server is the same machine.
Quote: |
Post all of the ENV variables before you issue the amqsputc command? |
Code: |
BASH=/bin/bash
BASHOPTS=cmdhist:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:login_shell:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=()
BASH_SOURCE=()
BASH_VERSINFO=([0]="4" [1]="1" [2]="2" [3]="2" [4]="release" [5]="x86_64-redhat-linux-gnu")
BASH_VERSION='4.1.2(2)-release'
COLORS=/etc/DIR_COLORS
COLUMNS=171
DIRSTACK=()
EUID=497
GROUPS=()
G_BROKEN_FILENAMES=1
HISTCONTROL=ignoredups
HISTFILE=/var/mqm/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/var/mqm
HOSTNAME=svr060
HOSTTYPE=x86_64
IFS=$' \t\n'
LANG=en_US.UTF-8
LESSOPEN='||/usr/bin/lesspipe.sh %s'
LINES=48
LOGNAME=mqm
LS_COLORS=xxx
MACHTYPE=x86_64-redhat-linux-gnu
MAIL=/var/spool/mail/mqm
MAILCHECK=60
MQSERVER='CHANNEL1/TCP/svr110(1415)'
OLDPWD=/opt/mqm
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/node/bin
PIPESTATUS=([0]="234")
PPID=49049
PS1='\s-\v\$ '
PS2='> '
PS4='+ '
PWD=/opt/mqm/samp/bin
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=1
TERM=xterm
UID=497
USER=mqm
_=QM_TEST
colors=/etc/DIR_COLORS
|
Last edited by rib445 on Sun Sep 24, 2017 9:04 am; edited 1 time in total |
|
Back to top |
|
 |
exerk |
Posted: Sun Sep 24, 2017 1:36 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
rib445 wrote: |
Yes,
export MQSERVER=CHANNEL1/TCP/'svr110(1415)'
I get different error codes if I amend the above to other values |
You're on Linux, hence:
Code: |
export MQSERVER='ChannelName/TransportType/ConnectionName' |
_________________ 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 |
|
 |
rib445 |
Posted: Sun Sep 24, 2017 9:07 am Post subject: |
|
|
Newbie
Joined: 23 Sep 2017 Posts: 7
|
So you mean instead of :
Code: |
export MQSERVER=CHANNEL1/TCP/'svr110(1415)' |
I should use:
Code: |
export MQSERVER='CHANNEL1/TCP/svr110(1415)' |
I tried and I get exactly the same error.
Is there anyway to get some more verbose (or any) logging that could help diagnose what's happening? |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Sep 24, 2017 10:24 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
This syntax should work on Linux:
Code: |
export MQSERVER=channelname/TCP/'ipaddress(port)' |
Please post the results of the exp command in the same shell and just before you exec amqsputc command.
Post ALL of the conversation in the same shell:
- the export command with no parameters
- the export MQSERVER cmd
- the export command with no parameters
- the amqsputc command
You can also verify the shell variable with this command: echo $MQSERVER
From your client platform, can you successfully ping the ipaddress? Can you successfully telnet? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Sep 24, 2017 12:06 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Look for errors captured by MQ in errors directories on both client and server platforms. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
exerk |
Posted: Sun Sep 24, 2017 12:08 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
bruce2359 wrote: |
This syntax should work on Linux... |
Every day a school day...  _________________ 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 |
|
 |
bruce2359 |
Posted: Sun Sep 24, 2017 12:29 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
rib445 wrote: |
-bash-4.1$ export MQSERVER=CHANNEL1/TCP/'svr110(1415)'
-bash-4.1$ ./amqsputc QUEUE1 QM_TEST
Sample AMQSPUT0 start
MQCONN ended with reason code 2058
-bash-4.1$ export MQSERVER=CHANNELX/TCP/'svr110(1415)'
-bash-4.1$ ./amqsputc QUEUE1 QM_TEST
Sample AMQSPUT0 start
MQCONN ended with reason code 2540
-bash-4.1$ export MQSERVER=CHANNEL1/TCP/'svr112(1415)'
-bash-4.1$ ./amqsputc QUEUE1 QM_TEST
Sample AMQSPUT0 start
MQCONN ended with reason code 2538
|
Of course you received three different reason codes. You did three different tests.
First test: 2058 tells me that the qmgr you named does not exist on the server svr110.
Second test: 2540 tells me that CHANNELX doesn't exist on the qmgr. Why did you change the channel name?
Third test: 2538 tells me that the qmgr doesn't exist at svr112.
Is the qmgr really named QM_TEST? Or, is the qmgr 'qm_test'? At a shell, type this command dspmqver, and post the results here. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
rib445 |
Posted: Sun Sep 24, 2017 12:57 pm Post subject: |
|
|
Newbie
Joined: 23 Sep 2017 Posts: 7
|
I've figured out the issue. This was my second attempt at setting up a QM and my first attempt at a QM was apparently still running and listening on port 1415 (although I didn't see any errors about this), so the initial error "2058 - Q Mgr Name Error" was quite accurate. On ending this old QM and starting my new 'QM_TEST' I'm able to get and put remotely.
Thanks to everyone for helping with this. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Sep 24, 2017 3:24 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Happy to help.
But, you have not explained exactly and precisely what the problem that is now fixed. Please share with us and others who might have the same/similar problem in the future. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
|