Author |
Message
|
dhungu |
Posted: Thu Mar 22, 2012 2:09 am Post subject: Mqseries queuemanager Name error(Reason code 2058) |
|
|
Novice
Joined: 17 Feb 2012 Posts: 14
|
Hi Team,
I am trying to connect to my local queue by using cpan mqseries lib through perl script, in solaris environment.When i am executing my script it is giving Reson code as 2058.which means Queuemanager name error.
I have done following thing to analysis this issue,but still getting the reson code 2058.
1)Stop and started the queue manager.
2)checked the queuemanager name in my code.
3)sucessfully put and get the message in my queue by using amqget and amqput command,but it not working with my script.
Could anybody please help me in this,what kind of environment i have to set or any configuration setting i am missing.
Code: |
my $qm_name="MQTEST";
my $compCode = MQCC_WARNING;
my $Reason = MQRC_UNEXPECTED_ERROR;
my $Hconn = MQCONN($qm_name,
$compCode,
$Reason,
)|| die "Unable to Connect to Queuemanager\n";
|
Thanks,
dhungu
Last edited by dhungu on Thu Mar 22, 2012 9:10 am; edited 1 time in total |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 22, 2012 5:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Did you experience any errors when installing the perl modules? Or did you not install them yourself?
I realize you've mostly said this, but I need to be clear. You ran the amqsget and amqsput samples on the exact same machine from the exact same command shell?
and you've confirmed that the name of the queue manager is 'MQTEST' and not 'mqtest'? |
|
Back to top |
|
 |
dhungu |
Posted: Thu Mar 22, 2012 6:56 am Post subject: |
|
|
Novice
Joined: 17 Feb 2012 Posts: 14
|
Hi Team,
I have fixed the garbage value issue,which i posted earliear to you.Now i am getting proper reson code and completion code after that fix.I did not got any error at the time of cpan mqseries module.
I am able to get and put message in my queue manager MQTEST by using mq command amqget and amqput.Even i have checked in my code i am passing queue manager name corect.
i have created this queue manager newly after instlation to start everything newly,by using following step.
1)crtmqm MQTEST
2)runmqsc MQTEST
define ql(TES1)
3)Then start the queue manager by using the strmqm MQTEST
I am thinking it is missing some environment setting,thats why it is not connecting.as i am new to mqseries i am not able to trace this.
So i have one question,if i am trying to connect to local queue,what is the environment setting require and the library path we need to set and is it require to create any channel and listener,server connection for this?
Please provide your suggestion regarding this.
Thanks,
Dhungu
Last edited by dhungu on Thu Mar 22, 2012 8:14 am; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Thu Mar 22, 2012 7:29 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dhungu wrote: |
i have created this queue manager newly after instlation to start everything newly,by using following step.
1)crtmqm MQTEST
2)runmqsc MQTEST
define ql(TES1)
3)Then start the queue manager by using the strmqm MQTEST |
Ok, I don't know perl from a hole in the ground, but that can't have worked. The crtmqm command only creates a queue manager, the runmqsc will fail unless the queue manager has been started.
dhungu wrote: |
if i am trying to connect to local queue,what is the environment setting require and the library path we need to set and is it require to create any channel and listener,server connection for this? |
If you're using a binding connection (like amqsput & amqsget do) then you don't. If you're using a client (like amqsget/putc) then you need a listener, server connection & the environment variables given in the client documentation. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dhungu |
Posted: Thu Mar 22, 2012 7:45 am Post subject: |
|
|
Novice
Joined: 17 Feb 2012 Posts: 14
|
Hi Sir,
Thanks for your reply.After cretating the queuemanager,i have started the quemanager then i have executed runmqsc command and create my queue.
Could you please let me know from where i can get mqclient document?
Thanks,
Dhungu |
|
Back to top |
|
 |
Vitor |
Posted: Thu Mar 22, 2012 7:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dhungu wrote: |
After cretating the queuemanager,i have started the quemanager then i have executed runmqsc command and create my queue. |
Makes much more sense
dhungu wrote: |
Could you please let me know from where i can get mqclient document? |
There's a client section in the WMQ InfoCenter.
If you're getting started with WMQ, I would recommend you stick with the binding connection for now so as to minimise the number of components you're trying to handle. If amqsput (not amqsputc) can put a message to your local queue then you can be confident the WMQ set up is correct and focus on your code.
Which as I indicated above, I'm not qualified to comment on.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Mar 22, 2012 8:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The MQ modules for perl need to be installed separately from MQ and separately from Perl.
It is possible that they did not install correctly, or that they installed correctly for your broken MQ installation but don't work for your new working install.
Again, can you confirm that you are running your program on the same machine and in the same unix shell as the amqsget/amqsput command? |
|
Back to top |
|
 |
dhungu |
Posted: Thu Mar 22, 2012 8:17 am Post subject: |
|
|
Novice
Joined: 17 Feb 2012 Posts: 14
|
Hi Mqjef,
I got some warning when the command make Install finished.I will send you detail tommrow about that warning,as i dont have that output right now.
I am running my script in same shell,where i am running amqget and amqput command.
Thanks,
Santosh |
|
Back to top |
|
 |
dhungu |
Posted: Thu Mar 22, 2012 7:40 pm Post subject: |
|
|
Novice
Joined: 17 Feb 2012 Posts: 14
|
Following is the output of my cpanmq installation-
Checking if your kit is complete...
Looks good
Warning: prerequisite Params::Validate 0.77.1 not found.
Warning: prerequisite Test::Simple 0.62 not found. We have 0.47.
Note (probably harmless): No library found for -lmqicg
Note (probably harmless): No library found for -lmqic32
Writing Makefile for MQClient::MQSeries
Writing Makefile for MQSeries::Message::DeadLetter
Writing Makefile for MQSeries::Message::PCF
Warning: Guessing NAME [MQSeries-OAM] from current directory name.
Writing Makefile for MQServer::MQSeries
Writing Makefile for MQSeries |
|
Back to top |
|
 |
mqjeff |
Posted: Fri Mar 23, 2012 3:05 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Those don't indicate issues.
Did the make complete without errors?
It's likely that it did, since you're actually receiving a real MQRC. But. |
|
Back to top |
|
 |
dhungu |
Posted: Fri Mar 23, 2012 8:31 am Post subject: |
|
|
Novice
Joined: 17 Feb 2012 Posts: 14
|
Hi Mqjev,
That issue is now resolved.Now i am able to connect to queue manager but now facing another problem,it is saying queue object not found.
Thanks,
Dhungu |
|
Back to top |
|
 |
Vitor |
Posted: Fri Mar 23, 2012 9:10 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dhungu wrote: |
That issue is now resolved. |
How?
dhungu wrote: |
Now i am able to connect to queue manager but now facing another problem,it is saying queue object not found. |
Do you mean a RC of 2085? Does it work from amqsput/amqsget? Are you specifying the name in the correct case (or combination of case)? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dhungu |
Posted: Mon Mar 26, 2012 7:46 pm Post subject: |
|
|
Novice
Joined: 17 Feb 2012 Posts: 14
|
Hi Team,
Finally i have succeed to connect to MQ through Perl,in Solaris5.10 64 bit environment by using CPAN mq series pm file.
Thanks,
Santosh |
|
Back to top |
|
 |
|