Solved

MQSeries: can't detect queue manager

Posted on 2001-07-05
14
18,248 Views
Last Modified: 2012-06-22
hi Experts,

I've installed MQSeries on different client and server machines.

I've got this error while I try to put a message on the queue using the amqsputc sample program:

http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF1Q.HTM

C:\Program Files\MQSeries Client\bin>amqsputc outfile.out infile.in QM1 QUEUE1
Sample AMQSPUT0 start
MQCONN ended with reason code 2059


Have you meet with this problem b4?

Thanks ..

Dawn.

0
Comment
Question by:Dawn_rico
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 4
14 Comments
 

Author Comment

by:Dawn_rico
ID: 6255183
I've been following this MQSeries Clients tutorial in this web site and get stuck in this pb -
http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF1Q.HTM


On my server, I've run my queue manager. I've also created the channel, queue and client connection. It's my only default queue.manager. I've also run other things like channel initiator, command server, listener.

On my client, I've set the client connection channel using:
C:\>SET MQSERVER=CHAN2/TCP/130.34.13.65(1414)

I've also verify it using:
C:\>SET MQSERVER
MQSERVER=CHAN2/TCP/130.34.13.65(1414)
==========================================================
I've checked my reason code - 2059 at this web site:

http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzak/CSQZAK1V.HTM

I still can't find the something that I've missed. Can you pls offer me suggestions if you've tried this code b4, thanks.
==========================================================
Web Reason:
On MVS/ESA, for CICS applications, this reason can occur on any call if the original connect specified a queue manager whose name was recognized, but which is not available.

My response:
What do they mean by CISC applications? I've checked that MVS is a stand-alone MVS subsystem. If MVS/ESA refers to a platform, then this will cause no pb to me. I'm working on Windows 2000 on Server and Win NT on Server.
=====================================================================================================================
Web Reason:
On OS/400, this reason can also be returned by the MQOPEN and MQPUT1 calls, when MQHC_DEF_HCONN is specified for the Hconn parameter.
If the connection is from an MQ client application, this reason code can occur if there is an error with the client-connection or the corresponding server-connection channel definitions.

My response:
I've set the channel name the same as server's.  I've also verify it.

     > Define client connection channel
       http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF1P.HTM#Header_151
          # create a client-connection channel by setting the MQSERVER environment variable
          # define channel name, transport type and channel connection name
               C:\>SET MQSERVER=CHAN2/TCP/130.34.13.65(1414)

          # Verify channel definition by displaying the current setting
               C:\>SET MQSERVER
               MQSERVER=CHAN2/TCP/130.34.13.65(1414)

=====================================================================================================================
Web Reason:
On MVS/ESA, this reason code can also occur if the optional MVS/ESA client attachment feature has not been installed.

My response:
I think I won't be involved with anything associated with MVS/ESA.
=====================================================================================================================
Web Reason:
This reason also occurs if an application attempts to connect to a queue manager within a group (see the QMgrName parameter of MQCONN), when none of the queue managers in the group is available for connection at this time.

My response:
I've created only one queue manager and made it my default one. It's also connected at that time.
=====================================================================================================================
Web Reason:
Corrective action: Ensure that the queue manager has been started. If the connection is from a client application, check the channel definitions.

My response:
The channel holds the same name as declared in server.

=====================================================================================================================

Dawn.
0
 
LVL 1

Expert Comment

by:viswa081400
ID: 6257879
Did you try connecting to the QueueManager from command prompt and run few MQ commands.
I mean did u try running >runmqsc <qmgr>
If you do not pass qmgr parameter, u connect to the default queue manager. And see if you are able to connect.
Incase it says your queuemanager is not running. start your queuemanager using >strmqm
and then try running >runmqsc


0
 
LVL 1

Expert Comment

by:viswa081400
ID: 6257915
And i guess 'amqsputc' takes only 2 parameters.

Extract from help file:

Running the amqsput and amqsputc samples
These programs each take 2 parameters:

The name of the target queue (required)
The name of the queue manager (optional)
If a queue manager is not specified, amqsput connects to the default queue manager and amqsputc connects to the queue manager identified by an environment variable or the client channel definition file. To run these programs, enter one of the following:

amqsput myqueue qmanagername

amqsputc myqueue qmanagername

where myqueue is the name of the queue on which the messages are going to be put, and qmanagername is the queue manager that owns myqueue.




Running the amqsputw sample
 
This program has no visible interface; all messages are put in the output file.

This program takes 4 parameters:

The name of the output file (required)
The name of the input file (required)
The name of the queue manager (required)
The name of the target queue (optional)
To run amqsputw from the Windows program manager:


Select File and click on Run...

On the run dialog, enter into the command line entry field the program name followed by the parameters.
For example:

  amqsputw outfile.out infile.in qmanagername myqueue

where:

outfile.out is used to hold the messages generated when the program runs.

infile.in contains the data to be put onto the target queue. Each line of data is put as a message. This must be an ASCII file.

qmanagername is the queue manager that owns myqueue.

myqueue is the name of the target queue on which the messages are going to be put. If you don't enter a queue name, the default queue for the queue manager is used.

0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:Dawn_rico
ID: 6257983
hi viswa ,

Thanks for ur help ... I really need to solve this asap.


This is my process:

>> Configure Server machine
      > Creating a queue manager and starting MQSC on the server
        http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF27.HTM#HDRUCH1ST
             # create a queue manager
                  C:\>crtmqm QM1
                  There are 52 days left in the trial period for this copy of MQSeries.
                  MQSeries queue manager created.
                  Creating or replacing default objects for QM1.
                  Default objects statistics : 29 created. 0 replaced. 0 failed.
                  Completing setup.
                  Setup completed.

             # start queue manager
                  C:\>strmqm QM1
                  There are 52 days left in the trial period for this copy of MQSeries.
                  MQSeries queue manager 'QM1' started.

      > Start MQSeries commands (MQSC)
        http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF27.HTM#HDRUCH1ST
            # start MQSeries commands
                  C:\>runmqsc QM1
                  0784726, 5639-B43 (C) Copyright IBM Corp. 1994, 2000.  ALL RIGHTS RESERVED.
                  Starting MQSeries Commands.

      > Defining the server connection
        http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF25.HTM#HDRUCHTAB
            # define a channel with chosen name and channel type of server connection (using first line and third line)
                  DEFINE CHANNEL(CHAN2) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
                  DESCR('Server connection to Client_2')
                  ---
                  DEFINE CHANNEL(CHAN2) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
                       1 : DEFINE CHANNEL(CHAN2) CHLTYPE(SVRCONN) TRPTYPE(TCP) +
                  DESCR('Server connection to Client_2')
                         : DESCR('Server connection to Client_2')
                  AMQ8014: MQSeries channel created.

                         :

                         :

      > Defining the client connection
        http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF25.HTM#HDRUCHTAB
            # define a channel with the same name and a channel type of client connection.
            # state the connection name (CONNAME). For TCP/IP this is the network address of the server machine.
            # specify the queue manager name (QMNAME) to let MQSeries application on client to connect to.
                  DEFINE CHANNEL(CHAN2) CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
                  CONNAME(130.34.24.56) QMNAME(QM_dcpc721s) DESCR('Client connection to Server_2')
                  ---
                  DEFINE CHANNEL(CHAN2) CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
                       2 : DEFINE CHANNEL(CHAN2) CHLTYPE(CLNTCONN) TRPTYPE(TCP) +
                  CONNAME(130.34.24.56) QMNAME(QM1) DESCR('Client connection to Server_2')
                         : CONNAME(130.34.24.56) QMNAME(QM1) DESCR('Client connection to Server_2'
                  )
                  AMQ8014: MQSeries channel created.

      > Run the listener to start MQI channels
            # run listener
                  C:\>RUNMQLSR -t tcp -m QM1 -p 1414
                  0784726, 5639-B43 (C) Copyright IBM Corp. 1994, 2000.  ALL RIGHTS RESERVED.            
==========================================================================================
>> Configure Client machine
      > Check that MQSeries client and server TCP/IP sessions are initialized
        http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF1P.HTM#Header_151
            # use ping commands
                  C:\>ping 130.34.24.56

                  Pinging 130.34.24.56 with 32 bytes of data:

                  Reply from 130.34.24.56: bytes=32 time<10ms TTL=128
                  Reply from 130.34.24.56: bytes=32 time<10ms TTL=128
                  Reply from 130.34.24.56: bytes=32 time<10ms TTL=128
                  Reply from 130.34.24.56: bytes=32 time<10ms TTL=128

      > Define client connection channel
        http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF1P.HTM#Header_151
            # create a client-connection channel by setting the MQSERVER environment variable
            # define channel name, transport type and channel connection name
                  C:\>SET MQSERVER=CHAN2/TCP/130.34.24.56(1414)

            # Verify channel definition by displaying the current setting
                  C:\>SET MQSERVER
                  MQSERVER=CHAN2/TCP/130.34.24.56(1414)


      > Set MQSERVER environment variable to connect to your queue manager
            set MQSERVER=SYSTEM.DEF.SVRCONN/TCP/130.34.24.56
            amqsputc QUEUE1 QM_dcpc721s

            set MQSERVER=SYSTEM.DEF.SVRCONN/TCP/<ip-address-of-your-QM>
            amqsputc <queue-name> <queue-manager-name>

      > Putting a message on the queue
        http://www-4.ibm.com/software/ts/mqseries/library/manuals/csqzaf/CSQZAF1Q.HTM
            # put a message on the queue using the amqsputc sample program
                  C:\>cd c:\Program Files\MQSeries Client\bin

                  C:\Program Files\MQSeries Client\bin>amqsputc QUEUE1 QM1
                  Sample AMQSPUT0 start
                  MQCONN ended with reason code 2059

                  C:\Program Files\MQSeries Client\bin>amqsputc outfile.out infile.in QM1 QUEUE1
                  Sample AMQSPUT0 start
                  MQCONN ended with reason code 2059
0
 

Author Comment

by:Dawn_rico
ID: 6261966
hi viswa ,

I've managed to solve this problem.

I've finally executed the java MQIVP !

C:\Program Files\MQSeries Client\bin>java MQIVP
MQSeries for Java Installation Verification Program
5639-B43 (C) Copyright IBM Corp. 1997, 1998. All Rights Reserved.
===========================================================

Please enter the type of connection (MQSeries or VisiBroker)  : (MQSeries)
Please enter the IP address of the MQSeries server            :130.66.13.95
Please enter the port to connect to                           : (1414)
Please enter the server connection channel name               :CHANNEL1
Please enter the queue manager name                           :queue.manager.1
Success: Connected to queue manager.
Success: Opened SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Put a message to SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Got a message from SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Closed SYSTEM.DEFAULT.LOCAL.QUEUE
Success: Disconnected from queue manager


Tests complete -
SUCCESS: This MQSeries Transport is functioning correctly.
Press Enter to continue ...

================================================================

what I did:
followed amqtac02.pdf docu in MQSeries v5.2 under chapter 7: verifying client installation.

I should have set my execution path to the bin directory of MQSeries too. Eg. C:\Program Files\MQSeries Client\bin

Dawn :)
0
 

Author Comment

by:Dawn_rico
ID: 6261967
Thanks for your response when I really need it ...

Dawn.
0
 

Author Comment

by:Dawn_rico
ID: 6262854
May I ask you another question instead?

Do I need "Visual Age for Java" program to create and run a Java program that is similar to MQIVP to test client and server message sending? Or JDK 1.2 and MS-DOS are the only 2 things that I need? Can the Java program that I create also be referred as a Java Message Service Application?

thanks ..

Dawn.
0
 
LVL 1

Expert Comment

by:viswa081400
ID: 6262938
Hi,
Sorry that I couldn't respond in between.
To create a MQ app JDK should do along with the MQ api. You have two options while using java.
As given in the programming reference guide
1. Using base MQ java. This app uses the base MQ api.
2. Using the MQ-Jms api. If you use JMS architecture, the app can be ported to a different messaging system in future with very little changes.

So if your java program needs to be referred as a JMS app it has to be designed using JMS.

-viswa
0
 

Author Comment

by:Dawn_rico
ID: 6263495
hi viswa ,

Thanks for your early response :) I really need this information very much to code a "MQIVP similar" java application ...

For 1.
I'll refer to link - http://www-4.ibm.com/software/ts/mqseries/library/manualsa/csqzaw04/csqzaw0l.htm 

I've chosen to use
On Server
- MQSeries for the server
- Lightweight Directory Access Protocol (LDAP)  
  May I ask if this LDAP is available in the MQSeries v5.2 trial s/w?

On Client
- MQSeries Client for client
- Java Developers Kit (JDK)
- MA88: MQSeries classes for Java and MQSeries classes for Java Message Service

Can you pls kindly tell me if this is enough? I'm confused by using "VisualAge for Java" to code a Java Message Service application (consists MQSeries and Java codes).
They've shown a complete setup process in http://www.developer.ibm.com/library/articles/programmer/farrell1.html / Or do you refer this as 2. "Using the MQ-Jms api." ?

Will their coding be different too?

Thanks for helpping me :)

Dawn.


 
0
 

Author Comment

by:Dawn_rico
ID: 6263513
gee ... I've found that LDAP is available in the MQSeries v5.2 trial s/w ...
0
 

Author Comment

by:Dawn_rico
ID: 6263699
but I still need to know the other above info from you please ...
0
 
LVL 1

Accepted Solution

by:
viswa081400 earned 100 total points
ID: 6263829
I guess that is all you require on server and client end. I'm not much sure abt LDAP. I guess coding for 'Visualage for jar' is no different since you use the same classes and jars.

I glanced thru the setup limk, and i see they step u thru, how to access the jars and stuff. So the code is going to be the same.
0
 

Author Comment

by:Dawn_rico
ID: 6263847
mm.. thanks, ok ..
0
 

Author Comment

by:Dawn_rico
ID: 6301799
thanks, viswa  ..
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question