Topic
  • 9 replies
  • Latest Post - ‏2013-01-14T12:22:45Z by SystemAdmin
SystemAdmin
SystemAdmin
8523 Posts

Pinned topic Tutuorial: problem with client-server examples

‏2010-03-29T11:58:30Z |
I want to learn how to use WebSphere MQ so on my WinXP machine I installed WebSphere MQ for Windows 7.0.1.0.

I have completed curses about sending messages to local and remote queues.
All is working on my local machine: `QM_APPLE` on port 1416 and `QM_ORANGE` on 1417.

I started lesson about sending message in a client-server configuration,
and I have problems with sending messages.
I think I configured all as in lesson:

c:\mq_test>netstat -an | grep 141
File STDIN:
TCP 0.0.0.0:1414 0.0.0.0:0 LISTEN
TCP 0.0.0.0:1415 0.0.0.0:0 LISTEN
TCP 0.0.0.0:1416 0.0.0.0:0 LISTEN
TCP 0.0.0.0:1417 0.0.0.0:0 LISTEN
TCP 127.0.0.1:1206 127.0.0.1:1416 ESTABLISHED
TCP 127.0.0.1:1416 127.0.0.1:1206 ESTABLISHED

c:\mq_test>set | grep -i mqse
File STDIN:
MQSERVER=CLIENT.QM_ORANGE/TCP/127.0.0.1(1416)

But when I try to send message

c:\mq_test>amqsputc Q1
Sample AMQSPUT0 start
MQCONN ended with reason code 2540

and now `netstat` shows also:

TCP 127.0.0.1:1416 127.0.0.1:1719 TIME_WAIT
In MQ Explorer I see that channel `CLIENT.QM_ORANGE` is in `inactive` state
(I translated UI form Polish to English so this state name may be little different).
I clicked 'run' on this channel, but nothing changes. There is no info about what went wrong.

What can be wrong with my configuration?

Regards,
Michał Niklas
Updated on 2013-01-14T12:22:45Z at 2013-01-14T12:22:45Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2010-03-29T23:04:56Z  
    Looks like you need to define a SVRCONN type channel named "CLIENT.QM_ORANGE" on QM_APPLE.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2010-03-29T23:10:08Z  
    Looks like you need to define a SVRCONN type channel named "CLIENT.QM_ORANGE" on QM_APPLE.
    Check the MQ error log file in directory C:\P F\IBM\WebSphere MQ\errors\AMQERR01.LOG and also in the error directory under the queue manager.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2010-03-31T08:07:07Z  
    Looks like you need to define a SVRCONN type channel named "CLIENT.QM_ORANGE" on QM_APPLE.
    I cannot find such info on lesson. I created such channel but on QM_ORANGE as stated in:
    http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.explorer.tutorials.doc/bi00263_.htm

    On QM_APPLE I have only channel QM_ORANGE.QM_APPLE of Receiver type that I created on lesson about sending messages to a remote queue.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2010-03-31T08:22:25Z  
    Check the MQ error log file in directory C:\P F\IBM\WebSphere MQ\errors\AMQERR01.LOG and also in the error directory under the queue manager.
    I checked them but but I cannot find why channel CLIENT.QM_ORANGE is not active.
    Actually, after lesson about sending messages using local and remote queues,
    and after trying to send message in client-server configuration I have:
    1. QM_APPLE with:
    -Q1 local queue and
    -QM_ORANGE.QM_APPLE receiver channel

    2. QM_ORANGE with queues:
    -Q1 remote queue
    -QM_APPLE local queue
    and channels:
    -QM_ORANGE.QM_APPLE receiver channel that is running
    -CLIENT.QM_ORANGE of type "connection to server" that is not active
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2010-04-01T01:08:12Z  
    I checked them but but I cannot find why channel CLIENT.QM_ORANGE is not active.
    Actually, after lesson about sending messages using local and remote queues,
    and after trying to send message in client-server configuration I have:
    1. QM_APPLE with:
    -Q1 local queue and
    -QM_ORANGE.QM_APPLE receiver channel

    2. QM_ORANGE with queues:
    -Q1 remote queue
    -QM_APPLE local queue
    and channels:
    -QM_ORANGE.QM_APPLE receiver channel that is running
    -CLIENT.QM_ORANGE of type "connection to server" that is not active
    >-CLIENT.QM_ORANGE of type "connection to server" that is not active

    The channel will only be "active" (aka "running") while there is a MQ Client application running that is connected to the qmgr via the channel.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2010-04-01T07:12:39Z  
    >-CLIENT.QM_ORANGE of type "connection to server" that is not active

    The channel will only be "active" (aka "running") while there is a MQ Client application running that is connected to the qmgr via the channel.
    Is it possible to do from MQ Explorer?
    If so, how to do it?
  • GrzegorzPaciorek(Gregory)
    37 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2010-06-11T18:08:00Z  
    Is it possible to do from MQ Explorer?
    If so, how to do it?
    Hello,
    for client connection ypu can just use rfhutilc program.
    Also you can connect to QMgr as client if you create connection to remote QMgr from WebSphere MQ Explorer and then you can put test messages from explorer as client.

    HTH,
    Greg (Grzesiek)
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2013-01-13T19:20:06Z  
    This error code is because of TYPO while creating the 'Server-connection channel', pls correct the same
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: Tutuorial: problem with client-server examples

    ‏2013-01-14T12:22:45Z  
    I cannot find such info on lesson. I created such channel but on QM_ORANGE as stated in:
    http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=/com.ibm.mq.explorer.tutorials.doc/bi00263_.htm

    On QM_APPLE I have only channel QM_ORANGE.QM_APPLE of Receiver type that I created on lesson about sending messages to a remote queue.
    The information in the lesson that tell you to create a SVRCONN channel is here:-

    http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.explorer.tutorials.doc/bi00260_.htm

    SVRCONN is the short keyword using in MQ's scripting language to mean Server-connection Channel, which is how it is referred to in this tutorial. The instructions on that page tell you how to do this in the MQ Explorer.

    The reason code that you have be given, 2540, means MQRC_UNKNOWN_CHANNEL_NAME. You can read the full explanation here:-

    http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/topic/com.ibm.mq.amqzao.doc/fm20920_.htm

    This is why all the responses are telling you to define the channel. You must make sure that the name is spelled exactly the same way in both places:-
    • When you create the channel as the first link my reply tells you to
    • When you say
      
      set MQSERVER=CLIENT.QM_ORANGE/TCP/127.0.0.1(1416)
      
    Remember that case is important and of course having no typos is VERY important!

    It may also be worth displaying the MQSERVER environment variable just prior to running your program to make absolutely certain that it is set correctly.

    Cheers
    Morag