ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexIBM MQ API Support[C][MQSERIES 6.0] Reason Code 2058

Post new topicReply to topic Goto page Previous  1, 2, 3  Next
[C][MQSERIES 6.0] Reason Code 2058 View previous topic :: View next topic
Author Message
Vitor
PostPosted: Wed Jun 13, 2007 6:41 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bahan wrote:
In fact it looks enough complex to me.
It speaks about some kind of channels like MQI channels or message channels.

If I have both my client and my server on the same computer, if I have to connect to this server by using C, what I have to do ? ^_^


You must either link it as a sever side program or correctly set up a client connection (not just create a SVRCONN channel and leave it there!). There are other client connection methods to a TAB file (though that works fine), all of which are documented.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jun 13, 2007 7:11 am Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

jefflowrey wrote:
Answer the following questions:
1) Is the queue manager you want to connect to on the SAME machine or a DIFFERENT machine than the one you want to run your program on?
2) Based on the answer to #1, what type of MQ connection do you need your program to establish - a "server" connection or a "client" connection?
3) Based on the answer to #2, you need to compile and link your application against different LIBRARIES. Which library did you compile and link your application against?
4) Based on the answer to #2, you may also have to do additional setup in the environment to allow your program to know where the queue manager is. Did you do that setup?
5) Based on the answer to #4, can you re-read the error message you just posted and figure out what's missing?

Also, again. If you don't know the difference between an INCLUDE and a LIBRARY, then you're trying to do too many things that are outside your experience. You should stop what you're doing, and go back and do some remedial learning on a) writing and building C programs, b) the section in the Application Programming Guide that tells you how to compile and build MQ applications.

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Bahan
PostPosted: Wed Jun 13, 2007 7:40 am Post subject: Reply with quote

Apprentice

Joined: 16 Jul 2006
Posts: 47
Location: France

Quote:
1) Is the queue manager you want to connect to on the SAME machine or a DIFFERENT machine than the one you want to run your program on?


This is the SAME machine.

Quote:
2) Based on the answer to #1, what type of MQ connection do you need your program to establish - a "server" connection or a "client" connection?


Hum, I think this is a server connection.

Quote:
3) Based on the answer to #2, you need to compile and link your application against different LIBRARIES. Which library did you compile and link your application against?


Here are the libraries i'm compiling :
Code:
libimqb23ia.a
libimqb23ia_r.a
libimqc23ia.a
libimqc23ia_r.a
libimqs23ia.a
libimqs23ia_r.a
libmqic.a
libmqic_r.a
libmqicb.a
libmqicb_r.a
libmqiz.a
libmqiz_r.a
libmqm.a
libmqm_r.a
libmqmalda_r.a
libmqmaldb_r.a
libmqmax.a
libmqmax_r.a
libmqmcb.a
libmqmcb_r.a
libmqmcs.a
libmqmcs_r.a
libmqmf_r.a
libmqml_r.a
libmqmr.a
libmqmr_r.a
libmqmxa.a
libmqmxa_r.a
libmqmz0_r.a
libmqmz1_r.a
libmqmzf.a
libmqmzf_r.a
libmqmzse.a
libmqutl.a
libmqutl_r.a
libmqz.a
libmqz_r.a


In fact, everything which is in : /usr/mqm/lib64/

Quote:
4) Based on the answer to #2, you may also have to do additional setup in the environment to allow your program to know where the queue manager is. Did you do that setup?


Hum, I'm on the same machine so I don't think I have additional setup to do (I mean I don't have to use the environnement variable MQSERVER).

Quote:
5) Based on the answer to #4, can you re-read the error message you just posted and figure out what's missing?


Hum. The file AMQCLCHL.TAB is missing. But I don't understand what I can do to resolve that...

Bahan
_________________
Close the world.||.txen eht nepO
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 13, 2007 7:45 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

You may think it's a server connection, your application is trying to establish a client one (which is a perfectly valid thing for it to be doing, even if the queue manager is on the same machine).

You need to determine why it's decided to use client connection rather than a server one. The clue is in your previous post.

And you don't need MQSERVER (though you could use it). You need a TAB file. Or to review what you've posted.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Bahan
PostPosted: Wed Jun 13, 2007 7:58 am Post subject: Reply with quote

Apprentice

Joined: 16 Jul 2006
Posts: 47
Location: France

Quote:
You may think it's a server connection, your application is trying to establish a client one (which is a perfectly valid thing for it to be doing, even if the queue manager is on the same machine).

You need to determine why it's decided to use client connection rather than a server one. The clue is in your previous post.

And you don't need MQSERVER (though you could use it). You need a TAB file. Or to review what you've posted.


Hum, ok, this is a client connection.
After all it seems normal that the local client try to connect to the local Queue manager.

But what I don't understand is the problem of the TAB file.

I'm not the administrator of the machine so i'm not the one who initially configured MQseries on it.

Why does it try to use the file :
Code:
/var/mqm/AMQCLCHL.TAB
while the TAB file for this Queue Manager is in
Code:
/var/mqm/qmgrs/MYQUEUEMANAGER/@ipcc/
?

Bahan
_________________
Close the world.||.txen eht nepO
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Jun 13, 2007 12:23 pm Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bahan wrote:
[
Why does it try to use the file :
Code:
/var/mqm/AMQCLCHL.TAB
while the TAB file for this Queue Manager is in
Code:
/var/mqm/qmgrs/MYQUEUEMANAGER/@ipcc/
?


Because (as you'd know if you'd looked at the Clients manual) the one in the queue manager folder is the one created by the MQ administrator for use by the clients. It's necessary to deploy this file onto your client, along with the client runtime install, to get the connection to work. The working location of the TAB file must therefore be on the client, in a location which can be controlled by the environment variables.

All this is documented.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Jun 13, 2007 12:25 pm Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Vitor wrote:
The working location of the TAB file must therefore be on the client, in a location which can be controlled by the environment variables.

And the *default* value, used when the variables are not set, will necessarily not know anything about MYQUEUEMANAGER, and not be dependant on a location under a server install.

Vitor wrote:
All this is documented.

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Bahan
PostPosted: Thu Jun 14, 2007 12:22 am Post subject: Reply with quote

Apprentice

Joined: 16 Jul 2006
Posts: 47
Location: France

Hi, everyone.

Quote:
p120 Client MQseries manual

To create a new channel, you have to create two channel definitions, one for each end of the connection, using the same channel name and compatible channel types. In this case, the channel types are server-connection and client-connection.


I'm in the case of the second method to define MQI channels p121 of the Client MQseries Manual.

When I looked the script I'm using to create my MQseries objects, there is only one channel definition which correspond to the p125 of the Client MQseries Manual.
Code:
define channel(CHANNEL_NAME) chltype(SVRCONN) trptype(TCP) replace


But, it seems to be only the first step of the process.

Quote:
p125, Client MQseries Manual, Defining the client-connection channel

Define a channel with the same name and a channel type of client-connection. You must state the connection name (CONNAME). For TCP/IP this is the network address of the server machine. It is also advisable to specify the queue manager name (QMNAME) to which you want your MQSeries application, running in the client environment, to connect. See “Chapter 12. Running applications on MQSeries clients” on page 151.


I think I forget this part in my "creating MQseries object" script. So I have to use this code I think.

Code:
DEFINE CHANNEL(CHANNEL_NAME) CHLTYPE(CLNTCONN) TRPTYPE(TCP)


But, as my client and server MQseries are on the same machine, do I have to add the following code in the definition of the client connection channel ?

Code:
 + CONNAME(IP) QMNAME(MYQUEUEMANAGER) DESCR('Client-connection to Server')


Finally I don't know if I need the MQseries environment variables cause my client is on the same machine than my server :

Quote:
p126 of the MQseries Client Manual

On the MQSeries client machine, use the environment variables MQCHLLIB and MQCHLTAB to allow the MQSeries application to access the file containing the client channel definition table on the server (but not a server on OS/390).


If I think that, it is because we have another machine where both MQseries server and client are installed and these environment variables are not there. I have only these ones :

Code:
IMQCONFIGCL=/etc/IMNSearch/dbcshelp
IMQCONFIGSRV=/etc/IMNSearch


Is there a way to list the existing channels of a Queue Manager please ? Cause I would see on my other machine if I have these two channels definition.

Thank you.

Bahan
_________________
Close the world.||.txen eht nepO
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 14, 2007 1:13 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bahan wrote:

I think I forget this part in my "creating MQseries object" script. So I have to use this code I think.

Code:
DEFINE CHANNEL(CHANNEL_NAME) CHLTYPE(CLNTCONN) TRPTYPE(TCP)


But, as my client and server MQseries are on the same machine, do I have to add the following code in the definition of the client connection channel ?

Code:
 + CONNAME(IP) QMNAME(MYQUEUEMANAGER) DESCR('Client-connection to Server')



Think this through for a moment. You know the client is on the same machine as the queue manager. I know that the client is on the same machine as the queue manager. How will the client know that? How will the client know that the server it needs to client onto is localhost?


Bahan wrote:

Finally I don't know if I need the MQseries environment variables cause my client is on the same machine than my server :


You don't need them at all. They're only used to override defaults.

Bahan wrote:

If I think that, it is because we have another machine where both MQseries server and client are installed and these environment variables are not there.


See above. The client has a default name and location. The variables only change them.

Bahan wrote:

Is there a way to list the existing channels of a Queue Manager please ? Cause I would see on my other machine if I have these two channels definition.


You could try the DISPLAY CHANNELS command. You'll find it in the Command Reference, in the same place you've clearly now found the Clients manual.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Bahan
PostPosted: Thu Jun 14, 2007 5:53 am Post subject: Reply with quote

Apprentice

Joined: 16 Jul 2006
Posts: 47
Location: France

I executed the following command :
Code:
DEFINE channel(MYCHANNEL) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME(MYIP) QMNAME(MYQM)


with MYCHANNEL which is the same than when I defined the server connection channel.

But I have always the same error code in my program and in the log of MQseries.

By the way, when I connect like this to the QM :
Code:
runmqsc MYQM
5724-H72 (C) Copyright IBM Corp. 1994, 2005.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager MYQM.

START CHANNEL(MYCHANNEL)
AMQ8018: Start WebSphere MQ channel accepted.

STOP CHANNEL(MYCHANNEL)
    11 : stop channel(MYCHANNEL)
AMQ9533: Channel 'MYCHANNEL' is not currently active.


When I look to the documentation about this error AMQ9533, I don't find any issue to activate the Channel.

Do you have any idea or information about that ?

Thank you.

Bahan
_________________
Close the world.||.txen eht nepO
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 14, 2007 6:28 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bahan wrote:
By the way, when I connect like this to the QM :
Code:
runmqsc MYQM
5724-H72 (C) Copyright IBM Corp. 1994, 2005.  ALL RIGHTS RESERVED.
Starting MQSC for queue manager MYQM.

START CHANNEL(MYCHANNEL)
AMQ8018: Start WebSphere MQ channel accepted.

STOP CHANNEL(MYCHANNEL)
    11 : stop channel(MYCHANNEL)
AMQ9533: Channel 'MYCHANNEL' is not currently active.



That's not connecting to a queue manager, that's issuing a command.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 14, 2007 6:29 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bahan wrote:
I executed the following command :
Code:
DEFINE channel(MYCHANNEL) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME(MYIP) QMNAME(MYQM)


with MYCHANNEL which is the same than when I defined the server connection channel.

But I have always the same error code in my program and in the log of MQseries.


If that's all you did, why are you surprised you're getting the same error?

Follow the instructions in the Client manual. If that's too much trouble, look back at my previous posts......
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Bahan
PostPosted: Thu Jun 14, 2007 7:28 am Post subject: Reply with quote

Apprentice

Joined: 16 Jul 2006
Posts: 47
Location: France

Hum,

Quote:
If that's all you did, why are you surprised you're getting the same error?

Follow the instructions in the Client manual. If that's too much trouble, look back at my previous posts......


The client manual doesn't tell me anything about that... My main problem is (it seems) the missing of the .TAB files for the client as you said before.

In the MQseries Client Manual, in the paragraph about the Client channel definition table p126, it is said that I have to not delete the file .TAB (but it never existed so...), but if this arrived, I have to set up the server (cf. p106 of the MQseries Client Manual).

And in p106, I already did all the steps they said to do... I create the queue manager, I started it, I... I followed all the instructions in "Creating both definitions on the server" and it doesn't change anything...

I'm sorry, but I don't find the solution...

Bahan

NB : maybe I missed something in the 213 pages of the MQseries Client Manual or in the 567 pages of the administration guide or in the 723 pages of the MQseries Interconnection, or again in the 331 pages of the commands reference manual...
_________________
Close the world.||.txen eht nepO
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jun 14, 2007 7:46 am Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Bahan wrote:
I'm sorry, but I don't find the solution


Vitor wrote:
It's necessary to deploy this file onto your client, along with the client runtime install, to get the connection to work. The working location of the TAB file must therefore be on the client, in a location which can be controlled by the environment variables.


So what you're telling me is you've followed all the steps to create the TAB file, deployed this file to the default location on the client (or the location defined by the environment variables), and are still getting the 2058? And have rechecked that all the steps have been followed correctly?

Then you need to relink your code as server side. And raise a PMR with IBM to indicate their client linking code is failing.

Bahan wrote:
NB : maybe I missed something in the 213 pages of the MQseries Client Manual or in the 567 pages of the administration guide or in the 723 pages of the MQseries Interconnection, or again in the 331 pages of the commands reference manual...


I think all you've missed is the Application Developer's training course. And the advice offered in this post.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Bahan
PostPosted: Thu Jun 14, 2007 7:59 am Post subject: Reply with quote

Apprentice

Joined: 16 Jul 2006
Posts: 47
Location: France

Quote:
So what you're telling me is you've followed all the steps to create the TAB file, deployed this file to the default location on the client (or the location defined by the environment variables), and are still getting the 2058? And have rechecked that all the steps have been followed correctly?


Hum, the thing is, if I understand well, the default location on the client (there is no environment variables) is certainly /var/mqm. But how can I be sure ? Is there a configuration file somewhere where the default values are specified ?

What you're telling me is to copy the file :
Code:
/var/mqm/qmgrs/MYQUEUEMANAGER/@ipcc/AMQCLCHL.TAB
to
Code:
/var/mqm/AMQCLCHL.TAB
?

I ask you this cause I'm not finding another .TAB file at all. (sorry if I am misunderstanding)

Sorry for the joke I made, it was inappropriate cause you helped me very much.

Bahan
_________________
Close the world.||.txen eht nepO
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page Previous  1, 2, 3  Next Page 2 of 3

MQSeries.net Forum IndexIBM MQ API Support[C][MQSERIES 6.0] Reason Code 2058
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.