Author |
Message
|
jsware |
Posted: Tue Feb 18, 2014 10:16 am Post subject: mqsicreateexecutiongroup java not found |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
Hi,
I am trying to create an execution group using mqsicreateexecutiongroup. The command cannot find java because my PATH is changed by the mqsicreateexecutiongroup command:
After logging on as mqm (MQ is starting the broker as a service, so the broker runs under the mqm user Id which is a member of mqbrkrs):
Code: |
-bash-4.1$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/mqm/bin
-bash-4.1$ source /opt/mqm/bin/setmqenv -s
-bash-4.1$ echo $PATH
/opt/mqm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/mqm/bin
-bash-4.1$ source /opt/mqm/mqsi/8.0.0.3/bin/mqsiprofile
MQSI 8.0.0.3
/opt/mqm/mqsi/8.0.0.3
-bash-4.1$ echo $PATH
/opt/mqm/mqsi/8.0.0.3/jre16/bin:/opt/mqm/mqsi/8.0.0.3/bin:/opt/mqm/mqsi/8.0.0.3/isadc:/opt/mqm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/mqm/bin
-bash-4.1$ which java
/opt/mqm/mqsi/8.0.0.3/jre16/bin/java
-bash-4.1$ mqsicreateexecutiongroup
/opt/mqm/mqsi/8.0.0.3/bin/mqsicreateexecutiongroup: line 63: java: command not found
-bash-4.1$
|
I've traced the mqsicreateexecutiongroup which calls mqsisetmqenv. This calls setmqenv which calls crtmqenv to get a list of environment variables to set up. These environment variables remove any reference to mqsi from the path, meaning mqsicreateexecutiongroup cannot find java:
Code: |
CLASSPATH=/var/mqsi/common/wsrr:/opt/mqm/java/lib/com.ibm.mq.jar:/opt/mqm/java/lib/com.ibm.mqjms.jar:/opt/mqm/samp/wmqjava/samples:/opt/mqm/samp/jms/samples
LD_LIBRARY_PATH=
MANPATH=/opt/mqm/man:/usr/share/man
MQ_DATA_PATH=/var/mqm
MQ_ENV_MODE=64
MQ_INSTALLATION_NAME=Installation1
MQ_INSTALLATION_PATH=/opt/mqm
MQ_JAVA_DATA_PATH=/var/mqm
MQ_JAVA_INSTALL_PATH=/opt/mqm/java
MQ_JAVA_JVM_FLAG=
MQ_JAVA_LIB_PATH=/opt/mqm/java/lib64
MQ_JRE_PATH=/opt/mqm/java/jre64/jre
PATH=/opt/mqm/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/mqm/bin
|
Other commands such as mqsilist and mqsicreatebroker work fine. Its only the ones that are wrappers for java such as mqsicreateexecutiongroup, mqsimode etc.
Any ideas on whether this is a bug or am I missing something? _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Feb 18, 2014 6:26 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
mqsicreatesxecutiongroup does strange things on Windows as well.
make sure you spawn a subprocess before calling it. That way the setup of the caller should remain the same.
On windows you can't call it inline from a .bat file. If you do, the processing of the .bat will end there and then after the create completes. You have to call it as a function in another .bat file and wrap that with a setlocal/endlocal
Sigh, the wonders of Java and the hoops we have to go through to get around its inherrent messiness. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
fjb_saper |
Posted: Tue Feb 18, 2014 9:54 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you tried calling from a cmd file instead of a bat file?
Bat files seem to have some weird extra restrictions that do not apply to cmd files...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
mqsiuser |
Posted: Tue Feb 18, 2014 11:39 pm Post subject: Re: mqsicreateexecutiongroup java not found |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
jsware wrote: |
-bash-4.1$ mqsicreateexecutiongroup
/opt/mqm/mqsi/8.0.0.3/bin/mqsicreateexecutiongroup: line 63: java: command not found |
(I think) I ran into the same problem. I had installed MQSeriesRuntime and MQSeriesServer:
Code: |
rpm -ivh MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm |
After that I installed IIB9 and then the same problem.
To fix it I installed "MQ Java" (just run it now, it will add MQ-Java and (I guess) mqsicreateexecutiongroup works after this):
Code: |
rpm -ivh MQSeriesJava-*.rpm MQSeriesJRE-*.rpm |
This is the "all in one" command:
Code: |
rpm -ivh MQSeriesRuntime-*.rpm MQSeriesServer-*.rpm MQSeriesJava-*.rpm MQSeriesJRE-*.rpm |
_________________ Just use REFERENCEs |
|
Back to top |
|
 |
jsware |
Posted: Wed Feb 19, 2014 1:06 am Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
fjb_saper wrote: |
Have you tried calling from a cmd file instead of a bat file?
Bat files seem to have some weird extra restrictions that do not apply to cmd files...  |
I think with .bat and .cmd files if you use "call mqsicreateexecutiongroup" then the batch file is called whereas the default is to transfer execution to the called batch file  _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
jsware |
Posted: Wed Feb 19, 2014 1:12 am Post subject: Re: mqsicreateexecutiongroup java not found |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
mqsiuser wrote: |
(I think) I ran into the same problem. I had installed MQSeriesRuntime and MQSeriesServer:
To fix it I installed "MQ Java" (just run it now, it will add MQ-Java and (I guess) mqsicreateexecutiongroup works after this):
|
I've already got MQSeriesJava installed:
Code: |
rpm -qa |grep -i java
MQSeriesJava-7.5.0-0.x86_64
MQSeriesJava-U200400-7.5.0-2.x86_64
|
_________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
mqsiuser |
Posted: Wed Feb 19, 2014 2:11 am Post subject: Re: mqsicreateexecutiongroup java not found |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
Hey, look. I had exactly the same problem, like you!
Creation of broker (integration node) "mqsicreatebroker" worked and then the creation of the execution group failed "because no java found".
Probably I did a reset of the VM and reinstalled (can't exactly remember)
I think that it is unlikely that you have a different problem  _________________ Just use REFERENCEs |
|
Back to top |
|
 |
Gralgrathor |
Posted: Wed Feb 19, 2014 2:53 am Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
Possibly an architecture issue? Have you installed 32-bit libs on your Linux machine? |
|
Back to top |
|
 |
mqsiuser |
Posted: Wed Feb 19, 2014 4:42 am Post subject: Re: mqsicreateexecutiongroup java not found |
|
|
 Yatiri
Joined: 15 Apr 2008 Posts: 637 Location: Germany
|
jsware wrote: |
rpm -qa |grep -i java
MQSeriesJava-7.5.0-0.x86_64
MQSeriesJava-U200400-7.5.0-2.x86_64 |
Code: |
rpm -qa | grep -i java
java-1_6_0-ibm-1.6.0_sr12.0-0.5.1 (/usr/bin/java)
MQSeriesJava-7.5.0-2 (/opt/mqm/java) |
_________________ Just use REFERENCEs |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Feb 19, 2014 9:35 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
32-bit CentOS libs, not 32-bit MQ libs.
You probably need to configure CentOS to support 32bit applications, which it might not do with a default 64bit OS install. |
|
Back to top |
|
 |
jsware |
Posted: Wed Feb 19, 2014 1:50 pm Post subject: |
|
|
 Chevalier
Joined: 17 May 2001 Posts: 455
|
mqjeff wrote: |
32-bit CentOS libs, not 32-bit MQ libs.
You probably need to configure CentOS to support 32bit applications, which it might not do with a default 64bit OS install. |
Hmmm interesting. I did notice the MQSI jre appears to be 32-bit.
I'll investigate that.
Have also opened PMR with IBM.
Regards
John. _________________ Regards
John
The pain of low quaility far outlasts the joy of low price. |
|
Back to top |
|
 |
Ayshine |
Posted: Wed Feb 19, 2014 11:23 pm Post subject: |
|
|
Newbie
Joined: 19 Feb 2014 Posts: 4
|
|
Back to top |
|
 |
Esa |
Posted: Thu Feb 20, 2014 12:39 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
smdavies99 wrote: |
On windows you can't call it inline from a .bat file. If you do, the processing of the .bat will end there and then after the create completes. You have to call it as a function in another .bat file and wrap that with a setlocal/endlocal
|
A simpler alternative:
cmd /c mqsicreateexecutiongroup <broker> -e <eg>
On unix you can do the same thing with exec |
|
Back to top |
|
 |
Gralgrathor |
Posted: Thu Feb 20, 2014 12:57 am Post subject: |
|
|
Master
Joined: 23 Jul 2009 Posts: 297
|
Running into similar problems installing WMQ7.5-Linux-on-X86-64 + IIB9.0.0.1-Linux-on-X86-64 to Ubuntu 12.04LTS 64b.
I'm using the wizard in the MQ/IB Explorer to create the default configuration (consisting of an IB9QMGR + IB9NODE + attributes). The Explorer calls a wizard.sh script with consecutive instructions. The script calls setmqenv for each step and the parameters for each step include mqsiprofile. Unaltered, however, this script fails at the mqsicreatebroker step because it cannot *find* the mqsicreatebroker command. *After* having executed setmqenv and mqsiprofile, directly before calling the mqsicreatebroker command.
I must say I'm slightly flummoxed. |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Feb 20, 2014 4:01 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Esa wrote: |
smdavies99 wrote: |
On windows you can't call it inline from a .bat file. If you do, the processing of the .bat will end there and then after the create completes. You have to call it as a function in another .bat file and wrap that with a setlocal/endlocal
|
A simpler alternative:
cmd /c mqsicreateexecutiongroup <broker> -e <eg>
On unix you can do the same thing with exec |
Windows will also allow you to use
With the cmdfile having either a .bat or .cmd extension. This will resume execution in the calling file after the call has ended. You might want to check %errorlevel% before continuing execution.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|