Author |
Message
|
$ureshWMB |
Posted: Tue Apr 15, 2014 9:39 pm Post subject: 2538 (09EA) (RC2538): MQRC_HOST_NOT_AVAILABLE |
|
|
Apprentice
Joined: 06 Apr 2014 Posts: 36
|
Hi Everyone.
I am trying to establish a connection between MQ client and server.
set QMG=UATQMGR
Set PORT=6014
set ql=IN
set dlq=%QMG%.DLQ
set flowq=XXXIN
crtmqm -u %dlq% %QMG%
strmqm %QMG%
echo def listener(%QMG%.LIST) trptype(TCP) port(%PORT%) control(QMGR) replace >%QMG%.in
echo start listener(%QMG%.LIST) >>%QMG%.in
echo def ql(%dlq%) >>%QMG%.in
echo DEFINE QALIAS(%ql%) TARGQ(%flowq%) >>%QMG%.in
echo def ql(%flowq%) >>%QMG%.in
echo DEFINE CHL(TO.%QMG%) CHLTYPE(SVRCONN) TRPTYPE(TCP) MCAUSER('Sxx') >>%QMG%.in
echo START CHL(TO.%QMG%) >>%QMG%.in
runmqsc %QMG% <%QMG%.in >%QMG%.out
type %QMG%.out
OS:Windows 7 64bit
Note:I have both client and server on same system
When i am trying to put a message on queue using client i am getting following error.
C:\Windows\system32>"D:\IBM\WebSphere MQ\bin\amqsputc.exe" TWD.ALL.FLOW.IN UATQM
GR
Sample AMQSPUT0 start
MQCONN ended with reason code 2538
Error Reason:
2538 (09EA) (RC2538): MQRC_HOST_NOT_AVAILABLE
Explanation
An MQCONN call was issued from a client to connect to a queue manager but the attempt to allocate a conversation to the remote system failed. Common causes of this reason code are:
The listener has not been started on the remote system.
The connection name in the client channel definition is incorrect.
The network is currently unavailable.
Completion Code
MQCC_FAILED
Programmer Response
Examine the client error log for messages explaining the cause of the problem.
Listener is in running state.
Should i should create a CLNTCONN channel with the same as SVRCONN channel??
Last edited by $ureshWMB on Wed Apr 16, 2014 1:05 am; edited 1 time in total |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Apr 15, 2014 11:49 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
you appear to be using the CLIENT version of amqsput, namely amqsputc
As you have not defined either the MQSERVER or the MQ Channel table environment variables the error you are seeing is 'working as designed'.
If you really want to run as a client then I humbly suggest that you read about MQ Clients in the documentation.
If you want to run as a server connection just try the command without the 'c' on the end of the executable name _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
exerk |
Posted: Tue Apr 15, 2014 11:54 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
1. You cannot start a SVRCONN like a SDR - SVRCONNs are passive;
2. All channels have two ends and as smdavies99 has pointed out, you have defined only one end;
3. Third option, other than those mentioned by smdavies99, is setting the necessary information in an mqclient.ini file. _________________ 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 |
|
 |
$ureshWMB |
Posted: Wed Apr 16, 2014 12:49 am Post subject: |
|
|
Apprentice
Joined: 06 Apr 2014 Posts: 36
|
smdavies99 wrote: |
you appear to be using the CLIENT version of amqsput, namely amqsputc
As you have not defined either the MQSERVER or the MQ Channel table environment variables the error you are seeing is 'working as designed'.
If you really want to run as a client then I humbly suggest that you read about MQ Clients in the documentation.
If you want to run as a server connection just try the command without the 'c' on the end of the executable name |
I have created an environment variable MQSERVER with SVRCONN channel details.
MQSERVER=channelname/TCP/conname
eg:MQSERVER=TO.UATQMGR/TCP/'IPaddress(port)' |
|
Back to top |
|
 |
exerk |
Posted: Wed Apr 16, 2014 12:55 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
Which version of WMQ are you using? Bear in mind that if > V7.0 then channel authorities will come into the equation. _________________ 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 |
|
 |
$ureshWMB |
Posted: Wed Apr 16, 2014 1:03 am Post subject: |
|
|
Apprentice
Joined: 06 Apr 2014 Posts: 36
|
exerk wrote: |
Which version of WMQ are you using? Bear in mind that if > V7.0 then channel authorities will come into the equation. |
I am using MQ 7.5.0.1
In channel definition i have used MCAUSER option and provided user details.
DEFINE CHL(TO.%QMG%) CHLTYPE(SVRCONN) TRPTYPE(TCP) MCAUSER('Sxx') |
|
Back to top |
|
 |
exerk |
Posted: Wed Apr 16, 2014 2:12 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
$ureshWMB wrote: |
exerk wrote: |
Which version of WMQ are you using? Bear in mind that if > V7.0 then channel authorities will come into the equation. |
I am using MQ 7.5.0.1
In channel definition i have used MCAUSER option and provided user details.
DEFINE CHL(TO.%QMG%) CHLTYPE(SVRCONN) TRPTYPE(TCP) MCAUSER('Sxx') |
So you've set up the required authorities for that user etc.? _________________ 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: Wed Apr 16, 2014 3:45 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
|
Back to top |
|
 |
$ureshWMB |
Posted: Wed Apr 16, 2014 7:00 am Post subject: |
|
|
Apprentice
Joined: 06 Apr 2014 Posts: 36
|
For testing purpose i have disabled CHLAUTH
ALTER QMGR CHLAUTH(DISABLED)
1 : ALTER QMGR CHLAUTH(DISABLED)
AMQ8005: WebSphere MQ queue manager changed.
DISPLAY CHLAUTH('SYSTEM.DEF.SVRCONN') MATCH(RUNCHECK) ALL ADDRESS('127.0.0.1') C
LNTUSER('hughson')
2 : DISPLAY CHLAUTH('SYSTEM.DEF.SVRCONN') MATCH(RUNCHECK) ALL ADDRESS('127.
0.0.1') CLNTUSER('hughson')
AMQ8898: Display channel authentication record details - currently disabled.
CHLAUTH(SYSTEM.*) TYPE(ADDRESSMAP)
DESCR(Default rule to disable all SYSTEM channels)
CUSTOM( ) ADDRESS(*)
USERSRC(NOACCESS) WARN(NO)
ALTDATE(2014-04-16) ALTTIME(20.19.50)
end
then restarted the Queue Manager.
C:\IBM\WebSphere MQ\bin>amqsput.exe TWD.ALL.FLOW.IN UATQMGR
Sample AMQSPUT0 start
target queue is TWD.ALL.FLOW.IN
HELLO
Sample AMQSPUT0 end
C:\IBM\WebSphere MQ\bin>amqsgetc.exe TWD.ALL.FLOW.IN UATQMGR
Sample AMQSGET0 start
MQCONN ended with reason code 2058
Still i have the same problem. |
|
Back to top |
|
 |
PaulClarke |
Posted: Wed Apr 16, 2014 7:12 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
Have you looked for any errors reported in the client error log (AMQERR01.LOG) file. Usually, the client will put a more meaningful message in the error log explaining what you did wrong. It could be as simple as a typo in the MQSERVER variable.
Cheers,
Paul. _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
$ureshWMB |
Posted: Wed Apr 16, 2014 8:10 am Post subject: |
|
|
Apprentice
Joined: 06 Apr 2014 Posts: 36
|
PaulClarke wrote: |
Have you looked for any errors reported in the client error log (AMQERR01.LOG) file. Usually, the client will put a more meaningful message in the error log explaining what you did wrong. It could be as simple as a typo in the MQSERVER variable.
Cheers,
Paul. |
C:\IBM\WebSphere MQ\errors\AMQERR01.LOG
this is file doesn't any information regarding CHLAUTH |
|
Back to top |
|
 |
PaulClarke |
Posted: Wed Apr 16, 2014 8:52 am Post subject: |
|
|
 Grand Master
Joined: 17 Nov 2005 Posts: 1002 Location: New Zealand
|
I am curious, what makes you think it should contain anything to do with CHLAUTH. I thought you were getting a 2538 reason code ?
Looking at this thread again I am wondering why you have specified
Quote: |
MQSERVER=TO.UATQMGR/TCP/'IPaddress(port)' |
rather than
Quote: |
MQSERVER=TO.UATQMGR/TCP/IPaddress(port) |
or
Quote: |
MQSERVER='TO.UATQMGR/TCP/IPaddress(port)' |
Cheers,
Paul _________________ Paul Clarke
MQGem Software
www.mqgem.com |
|
Back to top |
|
 |
|