Author |
Message
|
kevin |
Posted: Mon Aug 14, 2006 7:17 am Post subject: Perl MQCONNX hanging |
|
|
Newbie
Joined: 14 Aug 2006 Posts: 4
|
Hi Folks,
Sorry if this is the wrong forum. I have been landed with an issue with a script that connects to an MQ queue using the MQSeries::QueueManager object library. The basics of the code that is being used is:
Code: |
my $mgr = MQSeries::QueueManager->new(
QueueManager => 'MAGBDAU1',
ClientConn => \%mqclient,
RetryCount => 60,
RetrySleep => 10,
AutoConnect => 0
) or die "QueueManager instantiation failed\n";
$mgr->Connect() or die $mgr->CompCode() . ':' . MQReasonToText($mgr->Reason());
|
Trouble is it is hanging on the Connect and when I debug it stops at MQCONNX and I have to kill the process. Any thoughts of how to progress with this or what the issue could be would be greatly appreciated.
Thanks
Kevin |
|
Back to top |
|
 |
mvic |
Posted: Mon Aug 14, 2006 7:22 am Post subject: Re: Perl MQCONNX hanging |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
kevin wrote: |
Trouble is it is hanging on the Connect and when I debug it stops at MQCONNX and I have to kill the process. Any thoughts of how to progress with this or what the issue could be would be greatly appreciated. |
Please post which versions of: MQSeries Perl modules, MQ server, MQ client, OS, anything else important.
Has this ever worked? What changed to stop it working? |
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 14, 2006 7:24 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Disclaimer - I don't know PERL. Except as a concept.
What platform? What version of MQ? What fix level? Is this an existing script which has suddenly failed to work (in which case what changed?) or a new script which has never successfully run?
Particulally, are you certain the MQ client connections are correctly configured? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Mon Aug 14, 2006 7:40 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
What have you put in %clientConn? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevin |
Posted: Wed Aug 16, 2006 2:14 am Post subject: |
|
|
Newbie
Joined: 14 Aug 2006 Posts: 4
|
Hmm, easier said than done it seems... but....
Perl MQ Series Version is 1.23
Platform is Solaris 8
MQ Server Version is 5.8 CSD 8
ClientConn has a reference to:
Code: |
my %mqclient = (
ChannelName => $svrcon,
ConnectionName => "$mqhost($mqport)"
);
|
Thanks
Kevin |
|
Back to top |
|
 |
mvic |
Posted: Wed Aug 16, 2006 2:19 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
kevin wrote: |
MQ Server Version is 5.8 CSD 8 |
I guess you mean MQ 5.3 CSD08.
For lots of good reasons (search forums for 'CSD08') you should upgrade both client and server to CSD12. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 16, 2006 2:20 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Can you amqscnxc with the values of $svrcon and $mqhost, $mqport?
Also, did you copy/past that code? Because I think it should have been { and } and not ( and )? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
kevin |
Posted: Wed Aug 16, 2006 2:42 am Post subject: |
|
|
Newbie
Joined: 14 Aug 2006 Posts: 4
|
mvic wrote: |
For lots of good reasons (search forums for 'CSD08') you should upgrade both client and server to CSD12. |
As sensible as this might be there is absolutely no chance this will happen
jefflowrey wrote: |
Can you amqscnxc with the values of $svrcon and $mqhost, $mqport? |
Erhm 'amqscnxc'?
jefflowrey wrote: |
Also, did you copy/past that code? Because I think it should have been { and } and not ( and )? |
This was a copy and round parenthesis would be required as this is a hash definition. The hash is then dereferenced in the call to MQSeries::QueueManager. I could define mqclient as a reference then I wouldn't need to bother with the dereferencing... all a matter of style really
Thanks
Kevin |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 16, 2006 2:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
kevin wrote: |
mvic wrote: |
For lots of good reasons (search forums for 'CSD08') you should upgrade both client and server to CSD12. |
As sensible as this might be there is absolutely no chance this will happen
|
Unless they start trying to use Java....
Given that 5.3 is a back level anyway, it makes all sorts of sense to upgrade to CSD12. Bear in mind that while 5.3 is supported, any support request is likely to be answered with "upgrade to the latest CSD" and it's best to do that before something bad happens.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 16, 2006 2:59 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
kevin wrote: |
jefflowrey wrote: |
Also, did you copy/past that code? Because I think it should have been { and } and not ( and )? |
This was a copy and round parenthesis would be required as this is a hash definition. The hash is then dereferenced in the call to MQSeries::QueueManager. I could define mqclient as a reference then I wouldn't need to bother with the dereferencing... all a matter of style really  |
I did actually know it was a hash definition...
I have working code that uses the ClientConn value, and the only differences in my code are that I use an inline hash reference instead of a separate hash variable, and that I specify the transport type as TCP (explicitly stating a default value).
Are you running this on the same machine that you built the MQSeries module on? Did you have a clean build of the MQSeries module? Does both the machine that did the build and the machine you're running the code on have the MQSeries client installed?
amqscnxc is a sample program presupplied with MQ. It just connects and disconnects. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
mvic |
Posted: Wed Aug 16, 2006 3:23 am Post subject: |
|
|
 Jedi
Joined: 09 Mar 2004 Posts: 2080
|
Vitor wrote: |
any support request is likely to be answered with "upgrade to the latest CSD" and it's best to do that before something bad happens.  |
Highly likely if MQ client/server comms are having problems, and CSD08 or CSD09 is installed. Less likely otherwise.
kevin, I recommend you do some research on why CSD08 installations should be upgraded. Start with http://www.ibm.com/support/docview.wss?uid=swg21217437 |
|
Back to top |
|
 |
kevin |
Posted: Wed Aug 16, 2006 4:04 am Post subject: |
|
|
Newbie
Joined: 14 Aug 2006 Posts: 4
|
Hmm I am unlikely to be able to have an upgrade actioned... I guess I might just have to stick with calling the Java from perl.
Ah well :)Thanks for help anyway
Kevin |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Aug 16, 2006 4:13 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I would be surprised if you could not get an upgrade "actioned" when IBM clearly and forcibly states that an upgrade is required, for the most part. CSD8 is considered harmful...
Regardless, it's not clear that you are having the kind of problem that CSD8 is responsible for. Among other things, if it was a CSD8 problem, then the Java code would be experiencing it too!
Is the server on the other side at a different version than CSD8? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
|