|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
runmqtrm started on prompt vs. started by the qmgr |
« View previous topic :: View next topic » |
Author |
Message
|
HenriqueS |
Posted: Thu Feb 25, 2010 10:47 am Post subject: runmqtrm started on prompt vs. started by the qmgr |
|
|
 Master
Joined: 22 Sep 2006 Posts: 235
|
Folks,
I have the following situation here:
1) If I start the trigger monitor through the command line, the defined Process object will run OK when the queue receives a message. The Process points to the script below:
Code: |
#!/bin/bash
num=$RANDOM
whoami > /tmp/who.txt
/usr/bin/sudo /opt/mqm/samp/bin/amqsget QL.MQSC QM.SBCDF596 > /tmp/mqsc.$num.txt
|
2) But if I define a SERVICE to start the trigger monitor and start it trough MQ, the script will run somehow, but wont complete. I noticed this because the mqsc.$num.txt file is created but with 0 bytes.
File 'who.txt' in both cases gives 'root'.
DEFINE for the RUNMQTRM2 service:
Code: |
display service(runmqtrm2)
1 : display service(runmqtrm2)
AMQ8629: Display service information details.
SERVICE(RUNMQTRM2) CONTROL(QMGR)
SERVTYPE(SERVER) STARTCMD(/opt/mqm/bin/runmqtrm)
STARTARG(-m QM.SBCDF596 -q FILA.PARA.MQSC)
STOPCMD( ) STOPARG( )
STDOUT( ) STDERR( )
DESCR(Trigger Monitor da QL.MQSC) ALTDATE(2010-02-25)
ALTTIME(15.06.25)
|
Any idea of what is going on? |
|
Back to top |
|
 |
HenriqueS |
Posted: Tue Mar 02, 2010 1:59 pm Post subject: Re: runmqtrm started on prompt vs. started by the qmgr |
|
|
 Master
Joined: 22 Sep 2006 Posts: 235
|
Solved,
I directed the Standard Error output to a file (ALTER SERVICE(...) STDERR(/tmp/+MQ_SERVICE_NAME+.err)) and got the following:
Code: |
sudo: sorry, you must have a tty to run sudo
sudo: sorry, you must have a tty to run sudo
|
So I realized that my script.sh file had sudoed commands and WMQ runs the script without a terminal attached to it. Since the script did already run as root, the sudo util was not necessary, so I ripped it off and it is everything normal right now. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|