Author |
Message
|
Mallik |
Posted: Mon Jun 28, 2004 2:37 pm Post subject: Weird error with Clients. |
|
|
Acolyte
Joined: 29 Feb 2004 Posts: 53
|
One of our developers has a weird problem connecting to the MQ server. The MQ client with 5.3.0, he is able to connect to the queue manager where as with client 5.3.0.5 it gives 2012 error, "MQRC_ENVIRONMENT_ERROR".
Clients(5.3.0, 5.3.05) on Linux with C++ application issuing MQCONNX call.
Server on Solaris (5.3.0)
Our developer says he is using the lib 'libmqic_r.so', and I can see that lib is available on both 5.3 & 5.3.05. Not sure if we are missing anything. Has any one come across this prblem before?
This is the complete error.
***
MQRC_ENVIRONMENT_ERROR:
The call is not valid for the current environment
On z/OS, one of the following applies
An MQCONN or MQCONNX call was issued, but the application has been linked with an adapter that is not supported in the environment in which the application is running. For example, this can arise when the application is linked with the WebSphere MQ RRS adapter, but the application is running in a DB2 Stored Procedure address space. RRS is not supported in this environment. Stored Procedures wishing to use the WebSphere MQ RRS adapter must run in a DB2 WLM-managed Stored Procedure address space
An MQCMIT or MQBACK call was issued, but the application has been linked with the RRS batch adapter CSQBRSTB. This adapter does not support the MQCMIT and MQBACK calls
An MQCMIT or MQBACK call was issued in the CICS or IMS environment
The RRS subsystem is not up and running on the z/OS system that ran the application
On Compaq OpenVMS Alpha, OS/2, OS/400, Compaq NonStop Kernel, UNIX systems, and Windows, one of the following applies
The application is linked to the wrong libraries (threaded or nonthreaded)
An MQBEGIN , MQCMIT , or MQBACK call was issued, but an external unit-of-work manager is in use. For example, this reason code occurs on Windows when an MTS object is running as a DTC transaction. This reason code also occurs if the queue manager does not support units of work
The MQBEGIN call was issued in a WebSphere MQ client environment
An MQXCLWLN call was issued, but the call did not originate from a cluster workload exit
Corrective action: Do one of the following (as appropriate)
On z/OS
Link the application with the correct adapter
Modify the application to use the SRRCMIT and SRRBACK calls in place of the MQCMIT and MQBACK calls. Alternatively, link the application with the RRS batch adapter CSQBRRSI. This adapter supports MQCMIT and MQBACK in addition to SRRCMIT and SRRBACK
Modify the application to use the SRRCMIT and SRRBACK calls in place of the MQCMIT and MQBACK calls. Alternatively, link the application with the RRS batch adapter CSQBRRSI. This adapter supports MQCMIT and MQBACK in addition to SRRCMIT and SRRBACK
For a CICS or IMS application, issue the appropriate CICS or IMS call to commit or backout the unit of work
Start the RRS subsystem on the z/OS system that is running the application
In the other environments
Link the application with the correct libraries (threaded or nonthreaded)
Remove from the application the call that is not supported.
****** |
|
Back to top |
|
 |
Mallik |
Posted: Tue Jun 29, 2004 9:47 am Post subject: Fixed-- Weird error with Clients |
|
|
Acolyte
Joined: 29 Feb 2004 Posts: 53
|
The problem is fixed.
When MQCONN gives error 2012 first time, we try to re-connect again, then we have a success. Any gusses why its happening like this?
Thanks. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jun 29, 2004 12:48 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
A couple weeks ago one of our business partners had the same problem. 1st connect fails 2nd connect works. Im not at work to check my email, but I remember it had something to do with all his semaphores not being set to the limits described in the Quick Beginnings. (IBM told us this). I think it was SMHMAX was to low.
Maybe check all your settings? _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kman |
Posted: Wed Jun 30, 2004 10:42 pm Post subject: |
|
|
Partisan
Joined: 21 Jan 2003 Posts: 309 Location: Kuala Lumpur, Malaysia
|
Client 5.3.0 Server 5.3.0 OK
Client 5.3.0.5 Server 5.3.0 Not OK
I would point this to the different service levels. At first thought, with 2012 I would think using a wrong library (for client instead of server, or for server instead of client), or using an unsupported MQI call (I was thinking on something like MQBEGIN in a client kinda thing) |
|
Back to top |
|
 |
Mallik |
Posted: Sat Jul 03, 2004 10:15 pm Post subject: |
|
|
Acolyte
Joined: 29 Feb 2004 Posts: 53
|
Peter, do we need to change the kernel parameters for clients as well or you are talking about server only? My understanding is we only need to change for server.
I have done some initial research as well on our developer usage of MQI calls & he is not using MQBEGIN call, which is not supported in client environment.
Actually the same code doesn't work on another system where the MQ client is same as 5.3.0. Infact the code only works ie MQCONN succeeds 1st time on only one system. It fails 1st time on any other system irrespective of the service levels. Our developer says there is a conflict between the Tuxedo libs(which he is using) & MQ libs. But he is not sure why he is able to connect 1st time only from that system. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Tue Jul 06, 2004 4:23 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Quote: |
Peter, do we need to change the kernel parameters for clients as well or you are talking about server only? My understanding is we only need to change for server.
|
Server only. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
any2xml |
Posted: Sun Feb 27, 2005 3:50 pm Post subject: Same problem only if my client runs as a cron job (SuSE 9 ) |
|
|
Apprentice
Joined: 18 May 2004 Posts: 42
|
We are on CSD09 in SuSE 9 on z/Series. Previously MQ was running on SuSE 8 with no problem. Today I migrated it to SuSE 9. I can run my client scripts from the shell - no problem. But when I run as a cron job I get this error:
Code: |
#############MQCONN failed (Reason = 2012) (Call not valid in environment.) at /usr/lib/perl5/site_perl/5.8.3/s390-linux-thread-multi/MQSeries/Queue.pm line 91
Error: Could not create INPUT queue object for qmgr BAXP.AMS.QMGR and queue BAXP.AMS.RECEIVE.LOCAL
Unable to open queue BAXP.AMS.RECEIVE.LOCAL from qmanager BAXP.AMS.QMGR for input
|
As you can see I am using the perl MQSeries module.
As a result I have been manually running this script for some time! _________________ A Perl Hacker
http://www.goreliance.com
http://www.any2xml.com |
|
Back to top |
|
 |
any2xml |
Posted: Sun Feb 27, 2005 4:36 pm Post subject: Re: Same problem only if my client runs as a cron job (SuSE |
|
|
Apprentice
Joined: 18 May 2004 Posts: 42
|
Solved:
Called IBM. I needed to export the following env. vars in the shell script:
export LD_ASSUME_KERNEL=2.4.19
export AMQ_THREADMODEL_RESET=1
export AMQ_INHIBIT_DLCLOSE=TRUE
I will now add these to /etc/profile so it can be system-wide! _________________ A Perl Hacker
http://www.goreliance.com
http://www.any2xml.com |
|
Back to top |
|
 |
|