ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » Display the log of started services

Post new topic  Reply to topic
 Display the log of started services « View previous topic :: View next topic » 
Author Message
Peter329
PostPosted: Thu Oct 03, 2013 1:39 am    Post subject: Display the log of started services Reply with quote

Newbie

Joined: 27 Sep 2013
Posts: 9

Hi,

I have created a service to start the triggermonitor:

define service ('TriggerMonitor') +
control(QMGR) servtype(SERVER) +
startcmd ('+MQ_INSTALL_PATH+/bin/runmqtrm') +
startarg ('-m QM1 –q SYSTEM.DEFAULT.INITIATION.QUEUE')

Then I start the service:

start service ('TriggerMonitor')

The status displays "active" ... but after a second it shows "stopped" ...

When I start the triggermonitor as a command from a DOS box

runmqtrm -m host1.QM1 -q SYSTEM.DEFAULT.INITIATION.QUEUE

it is running without any problems.

What's wrong with the service?

Where do I get a LOG from the service?

Kind regards
Peter
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Oct 03, 2013 3:16 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Try...

Code:
DEFINE SERVICE ('TriggerMonitor') +
       DESCR('Trigger Monitor for...') +
       STARTCMD('+MQ_INSTALL_PATH+/bin/runmqtrm') +
       STARTARG('-m QM1 –q SYSTEM.DEFAULT.INITIATION.QUEUE') +
       STOPCMD('/opt/mqm/bin/amqsstop') +
       STOPARG('-m +QMNAME+ -p +MQ_SERVER_PID+') +
       STDOUT('/tmp/+QMNAME+_tm_SDIQ_stdout.log') +
       STDERR('/tmp/+QMNAME+_tm_SDIQ_stderr.log') +
       CONTROL(STARTONLY) +
       SERVTYPE(SERVER) +
       REPLACE

I would suggest though that you define a specific INITQ rather than use the one you originally intended, and if using multiple trigger monitors then differentiate their logs (as in the example above), and note the change of control.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Peter329
PostPosted: Thu Oct 03, 2013 5:54 am    Post subject: Reply with quote

Newbie

Joined: 27 Sep 2013
Posts: 9

Suuuper ... thanks a lot!

My triggermonitor now starts up fine!

But when I try to stop the triggermonitor from MQ-Explorer, then the status changes to STOPPING .... but it does not change to STOPPED!

When I disable GET on the INIT-QUEUE, then the triggermonitor terminates as expected.

So it seems, that after the stop-command from MQ-Explorer, the triggermonitor seems to be waiting for some event or some action to complete.

How can I find out, what it is waiting for? The STDERR log is empty, the STDOUT log looks normal! Also the MQS system log has no clue as to what is going wrong!

By the way, for the time being, I did not start any Triggering .... so the INIT-QUEUE is empty.

kind regards
Peter
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Oct 03, 2013 6:12 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

The amqsstop command should do the trick. Restart the service, identify the PID of the trigger monitor, and submit the command from the command line to see what happens is my suggestion.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Peter329
PostPosted: Thu Oct 03, 2013 6:26 am    Post subject: Reply with quote

Newbie

Joined: 27 Sep 2013
Posts: 9

Stopping the triggermonitor from the command line works perfectly fine:

C:\d-disk\bat>amqsstop -m host1.QM1 -p 2592
Stopped connection 0x414D5143686F7374312E514D31202020756E4D5220004E01

But how can I specify that in the service? This is what I have specified currently in the service:

Stop-Command: +MQ_INSTALL_PATH+bin/amqsstop

Stop-Argument: -m +host1.QM1 + -p +MQ_SERVER_PID+

And this does not complete ... it displays "STOPPING" forever.

kind regards
Peter
Back to top
View user's profile Send private message
exerk
PostPosted: Thu Oct 03, 2013 6:31 am    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

Peter329 wrote:
-m +host1.QM1 + -p +MQ_SERVER_PID+

Is that correct or do you actually have +QMNAME+ specified?
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Peter329
PostPosted: Thu Oct 03, 2013 6:53 am    Post subject: Reply with quote

Newbie

Joined: 27 Sep 2013
Posts: 9

ok, you found the error. The plus signs have to be removed!

Stop-Argument: -m host1.QM1 -p +MQ_SERVER_PID+

This is why the stop command did not work!

Its now working perfectly fine! Thank you so much!

kind regards
Peter
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Oct 03, 2013 7:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Peter329 wrote:
ok, you found the error. The plus signs have to be removed!


Err. You should leave it as exactly "+QMNAME+". MQ will automatically fill in the real queue manager name.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Display the log of started services
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.