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 » IBM MQ Installation/Configuration Support » runmqdlq service on linux

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 runmqdlq service on linux « View previous topic :: View next topic » 
Author Message
tczielke
PostPosted: Wed Apr 30, 2014 5:51 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 941
Location: Illinois, USA

If you change your service definition back to the way it was originally where runmqdlq was called directly without a script, has the stderr messages that your reported originally went away?
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 30, 2014 6:20 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Code this in the DLQ rules

Code:
WAIT(YES)

_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
cevans
PostPosted: Wed Apr 30, 2014 6:25 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2013
Posts: 26

zpat wrote:
Code this in the DLQ rules

Code:
WAIT(YES)


I have a WAIT in the rules, this is the default if not specified though so should not make any difference
Back to top
View user's profile Send private message
tczielke
PostPosted: Wed Apr 30, 2014 6:31 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 941
Location: Illinois, USA

Your STARTCMD in your service can not be:

/var/mqm/qmgrs/IB9QMGR/dlqhandler.sh

That is not an executable. It is an ASCII file. It should be something like:

ksh /var/mqm/qmgrs/IB9QMGR/dlqhandler.sh

But still, I would recommend changing it back to the way you had it. No need to invoke a script here.
Back to top
View user's profile Send private message
cevans
PostPosted: Wed Apr 30, 2014 6:34 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2013
Posts: 26

tczielke wrote:
Your STARTCMD in your service can not be:

/var/mqm/qmgrs/IB9QMGR/dlqhandler.sh

That is not an executable. It is an ASCII file. It should be something like:

ksh /var/mqm/qmgrs/IB9QMGR/dlqhandler.sh

But still, I would recommend changing it back to the way you had it. No need to invoke a script here.


what does the ksh do ? ksh /var/mqm/qmgrs/IB9QMGR/dlqhandler.sh

I'm interested to know why you are suggesting not to use a script when other references are suggesting it should run as a script.
I will try reverting it back to executing runmqdlq

Thanks
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 30, 2014 6:41 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I will post my working config here

Quote:
DEFINE SERVICE('XXX.DLQHANDLER') CONTROL(STARTONLY) SERVTYPE(SERVER) +
DESCR('Dead Letter Queue Handler') +
STARTCMD('+MQ_DATA_PATH+DLQ_start') +
STARTARG('+QMNAME+.DEAD.LETTER.QUEUE +QMNAME+ +MQ_DATA_PATH+DLQ_rules.txt') +
STDERR('+MQ_DATA_PATH+DLQ_stderr.txt') +
STDOUT('+MQ_DATA_PATH+DLQ_stdout.txt') +
REPLACE

START SERVICE('XXX.DLQHANDLER')


Quote:
#!/bin/ksh
echo $1 $2 $3

echo Started `date '+%Y%m%d %H%M%S'`

runmqdlq $1 $2 < $3 > /dev/null 2>&1

_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 30, 2014 7:01 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

zpat wrote:

Quote:
#!/bin/ksh
echo $1 $2 $3

echo Started `date '+%Y%m%d %H%M%S'`

runmqdlq $1 $2 < $3 > /dev/null 2>&1

This is working fine for Zpat now...

For the time being and until you have it working, don't redirect the output to /dev/null. Rather set it to a writable file that you can then look at and determine why what you see is happening...
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
cevans
PostPosted: Wed Apr 30, 2014 7:23 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2013
Posts: 26

zpat wrote:
I will post my working config here

Quote:
DEFINE SERVICE('XXX.DLQHANDLER') CONTROL(STARTONLY) SERVTYPE(SERVER) +
DESCR('Dead Letter Queue Handler') +
STARTCMD('+MQ_DATA_PATH+DLQ_start') +
STARTARG('+QMNAME+.DEAD.LETTER.QUEUE +QMNAME+ +MQ_DATA_PATH+DLQ_rules.txt') +
STDERR('+MQ_DATA_PATH+DLQ_stderr.txt') +
STDOUT('+MQ_DATA_PATH+DLQ_stdout.txt') +
REPLACE

START SERVICE('XXX.DLQHANDLER')


Quote:
#!/bin/ksh
echo $1 $2 $3

echo Started `date '+%Y%m%d %H%M%S'`

runmqdlq $1 $2 < $3 > /dev/null 2>&1


This config works in the same way, ie from the console but not as a service.

What version of MQ are you running this on?
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 30, 2014 7:48 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I've used this on AIX with both MQ 7.0.1.x and 7.5.0.3.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
cevans
PostPosted: Wed Apr 30, 2014 7:51 am    Post subject: Reply with quote

Apprentice

Joined: 18 Jul 2013
Posts: 26

zpat wrote:
I've used this on AIX with both MQ 7.0.1.x and 7.5.0.3.


Thanks .. I need to raise a PMR as I think this is an issue with 7.5.0.1 on Linux 64 bit
Back to top
View user's profile Send private message
zpat
PostPosted: Wed Apr 30, 2014 7:53 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

I would start by applying FP 7.5.0.3
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
tczielke
PostPosted: Wed Apr 30, 2014 7:54 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 941
Location: Illinois, USA

Sorry, I was incorrect about my statement on needing the ksh before the script on the STARTCMD. I was making the assumption that an execve system call (which is probably what MQ is doing under the covers to start your command) needed to be a binary executable. But I looked up the execve, and a script is supported, as well. So ignore that post. It is incorrect.

Quote:
execve() executes the program pointed to by filename. filename must be either a binary executable, or a script starting with a line of the form:

#! interpreter [optional-arg]
Back to top
View user's profile Send private message
tczielke
PostPosted: Wed Apr 30, 2014 8:24 am    Post subject: Reply with quote

Guardian

Joined: 08 Jul 2010
Posts: 941
Location: Illinois, USA

One last note. If your 500 (cevans) user id did not have access to open your input file to runmqdlq, I would recommend you try the service the original way you had it to see if your issue is fixed, now that your queue manager has been started under the mqm id. It at least wouldn't hurt to try this, to rule out that your current issue is more with getting your script to run correctly as a service.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » runmqdlq service on linux
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.