Author |
Message
|
lowellmather |
Posted: Thu Nov 19, 2009 2:05 pm Post subject: How to automate checking status of a service & start it |
|
|
Novice
Joined: 16 Jul 2009 Posts: 14
|
We have several Qmgrs which have associated Services that need to be started to run a TriggerMonitor utility.
The Service Control on the Services are configured as Queue Manager Start (to start when the QMgr starts because we reboot the box nightly). The Service Types are defined as Server Type.
The problem is not all of the Services start when the box gets rebooted. Some do and some don't. I have tried to find a command that would allow me to schedule a batch file to check the status of each Service, and if it is stopped to start it, but have not had much luck.
If we go into MQExplorer, we can start the Services successfully. We are running MQ6.0 under WinServer 2003.
Any ideas?
Thanks! |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 19, 2009 2:09 pm Post subject: Re: How to automate checking status of a service & start |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
lowellmather wrote: |
Any ideas? |
- Check the event log to see why these services don't start
- Ensure you're on the latest maintenance of WMQv6
It's possible to have the queue manager start a batch file to check these, but then if something's preventing the queue manager starting these services (or preventing it attempting to start these services) then the same problem could affect this batch file. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Nov 19, 2009 2:12 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
|
Back to top |
|
 |
lowellmather |
Posted: Thu Nov 19, 2009 2:51 pm Post subject: Re: How to automate checking status of a service & start |
|
|
Novice
Joined: 16 Jul 2009 Posts: 14
|
Yes, it's configured correctly - with the exception of:
"In the Service Type field, select the type of service to run:
If you select Command, you can run multiple instances of the service but you cannot view the status of the service in WebSphere MQ Explorer.
If you select Server, you can run only one instance of the service but you can view the status of the service in WebSphere MQ Explorer. "
We run the service type as Server under all of our QMgrs and the majority of them start up fine - it's usually those lower down the line (QMgr1, QMgr2, QMgr3 start okay, but QMgr4, 5, etc. don't).
As far as the log, here's LITERALLY what I see and couldn't find anywhere where the name of the service is "TriggerMonitor.exe" was mistyped and it probably isn't since we can start the service manually.
Here's the log entry (host, ip and user removed):
11/19/2009 00:09:17 - Process(11908.1) User(xx) Program(iggerMonitor.exe)
AMQ9202: Remote host 'xx (xxx.xx.xxx.xx) (1609)' not available, retry
later.
EXPLANATION:
The attempt to allocate a conversation using TCP/IP to host 'xxx
(xxx.xx.xxx.xx) (1609)' was not successful. However the error may be a
transitory one and it may be possible to successfully allocate a TCP/IP
conversation later.
ACTION:
Try the connection again later. If the failure persists, record the error
values and contact your systems administrator. The return code from TCP/IP is
10061 (X'274D'). The reason for the failure may be that this host cannot reach
the destination host. It may also be possible that the listening program at
host 'xx (xxx.xx.xxx.xx) (1609)' was not running. If this is the
case, perform the relevant operations to start the TCP/IP listening program,
and try again.
----- amqccita.c : 1087 ------------------------------------------------------- |
|
Back to top |
|
 |
exerk |
Posted: Thu Nov 19, 2009 3:26 pm Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
TCP 10061: WSAECONNREFUSED -- Connection refused. You will usually see this error when a server refuses a connection from a client, because the server is not listening on that port; no connection could be made because the target machine actively refused it. _________________ 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 |
|
 |
Vitor |
Posted: Thu Nov 19, 2009 6:39 pm Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
exerk wrote: |
TCP 10061: WSAECONNREFUSED -- Connection refused. You will usually see this error when a server refuses a connection from a client, because the server is not listening on that port |
Or there's a firewall or other security measure denying access. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Nov 19, 2009 6:55 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Why / How is Triggermonitor.exe trying to connect to another system? With a name like that I assume it would be a local Trigger Monitor that would connect to the local QM in bindings mode. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
lowellmather |
Posted: Fri Nov 20, 2009 6:40 am Post subject: |
|
|
Novice
Joined: 16 Jul 2009 Posts: 14
|
Thank you all for your feedback - it is appreciated because this has stumped all our experts as well...
I don't think it can be a firewall issue because 1) all of the QMgrs are configured the same way and not all of the same Services are stopped every day (if that makes sense) and 2) all of the QMgrs/connections are on the same box.
The name of the server and the IP/Port address listed in the message are on that server.
Since we've been stymied every other way, that's why I was trying to figure out a way to verify the status and automate the Service if it is stopped. |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Nov 20, 2009 7:37 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
The name of the server and the IP/Port address listed in the message are on that server. |
Are you saying that you've created an application message with a service name, ipaddress and port, as the message application payload? And that you have a consuming application (triggermonitor.exe) that consumes the message to start the service?
Do you have some automation software (Tivoli, for example) that could do this for you? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
lowellmather |
Posted: Fri Nov 20, 2009 7:45 am Post subject: |
|
|
Novice
Joined: 16 Jul 2009 Posts: 14
|
"The name of the server and the IP/Port address listed in the message are on that server. "
MESSAGE (alone by itself) was a poor choice of words. The IP/Port address listed in the "error message displayed in the log file" are on that server.
Each of the Qmgrs has its own port on the same IP. All the Qmgrs start okay (with the errors displayed) but the Services for some do not. I've started to keep track of them everyday to see if there is any pattern.
Even if for the short term there were a way to start the services automatically, if they were stopped, without human intervention, would be a step up. We have to check them every morning and start them thru MQExplorer...
Thanks again for your help! |
|
Back to top |
|
 |
exerk |
Posted: Fri Nov 20, 2009 8:02 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
It sounds like there may be a distinct possibility that resource issues are the cause, so what about delaying start of the services until after all queue managers have started, e.g. a batch file that issues a start service command, with appropriate 'sleep' periods between each command? _________________ 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 |
|
 |
lowellmather |
Posted: Fri Nov 20, 2009 8:09 am Post subject: |
|
|
Novice
Joined: 16 Jul 2009 Posts: 14
|
"sounds like there may be a distinct possibility that resource issues [...] what about a batch file that issues a start service command"
The server is a VM so we're trying to get more resources allocated on it, but until that happens (and there's no guarantee more resources will solve the problem) I have been trying to figure out what batch command to use. That's what I haven't been able to figure out how to do... |
|
Back to top |
|
 |
bruce2359 |
Posted: Fri Nov 20, 2009 8:15 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9471 Location: US: west coast, almost. Otherwise, enroute.
|
Quote: |
We have several Qmgrs which have associated Services that need to be started to run a TriggerMonitor utility. |
[I'm confused. Exactly what service is it that is failing to start? Can you post the service definition here? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Last edited by bruce2359 on Fri Nov 20, 2009 8:16 am; edited 1 time in total |
|
Back to top |
|
 |
exerk |
Posted: Fri Nov 20, 2009 8:16 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
A set of RUNMQSC commands with the START SERVICE (SERVICE NAME) piped in perhaps? _________________ 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 |
|
 |
PeterPotkay |
Posted: Fri Nov 20, 2009 11:36 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Why is Triggermonitor.exe trying to access a hostname and port #, even if its the hostname / port of the box it is running on? If its a trigger monitor it should be connecting in bindings mode and not relying on hostname resolution or the MQ Listener, both of which may not be fully functional at the time the QM is attempting to fire up this Service called TriggerMonitor.exe. After reboot you maybe in a race condition and sometimes this Service starts up before all the things it relies on have. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|