Author |
Message
|
K_A |
Posted: Tue Aug 04, 2009 8:52 am Post subject: Cannot create port listener from script |
|
|
Apprentice
Joined: 10 Nov 2004 Posts: 32
|
Hi all
Below script is meant to recreate a damaged MQ server. It removes a queue manager, recreates it an then I load the queues and channels from a backup file via RUNMQSC.
-----------
: Stop queue manager
endmqm -i WMS1421T
: Stop listener
endmqlsr -m WMS1421T
: Delete queue manager
dltmqm WMS1421T
: Recreate queue manager
crtmqm WMS1421T
: Start queue manager
strmqm WMS1421T
: Recreate port listener
runmqlsr -m WMS1421T -t TCP -p 1421
: Reload definitions from backup
RUNMQSC WMS1421T < WMS1421T.mqsc
------------
The problem is the re-create of the port listener, the runmqlsr command. Here I am stuck and I have to interrupt the script.
I have tried this on several boxes. I also try to run the runmqlsr as a single command. The result is the same - stuck.
Anyone? |
|
Back to top |
|
 |
John89011 |
Posted: Tue Aug 04, 2009 9:20 am Post subject: |
|
|
Voyager
Joined: 15 Apr 2009 Posts: 94
|
How about:
nohup runmqlsr -tTCP -p1421 -m WMS1421T &
Did you define the listener?
DEFINE LISTENER (WMS1421T) TRPTYPE (TCP) PORT (1421) CONTROL(QMGR) replace |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Aug 04, 2009 10:33 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
if you're using MQ v6 or later, you should use the MQSC "START LISTENER" in preference to runmqlsr. And you should define the listener under QMGR control in preference to using START LISTENER in the first place.
And if you're not using MQ v6 or later,  |
|
Back to top |
|
 |
K_A |
Posted: Wed Aug 05, 2009 1:25 am Post subject: |
|
|
Apprentice
Joined: 10 Nov 2004 Posts: 32
|
I get error message :
'nohup' is not recognized as an internal or external command,
operable program or batch file.
Regarding DEFINE LISTENER, I guess I need to do that under RUNMQSC: However RUNMQSC does not recognise the DEFINE LISTENER command.
I get error message:
DEFINE LISTENER (WMS1421T) TRPTYPE (TCP) PORT (1421) CONTROL(QMGR) replace;
1 : DEFINE LISTENER (WMS1421T) TRPTYPE (TCP) PORT (1421) CONTROL(QMGR) repl
ace;
AMQ8405: Syntax error detected at or near end of command segment below:-
DEFINE LISTENER
AMQ8426: Valid MQSC commands are:
DEFINE AUTHINFO
DEFINE CHANNEL
DEFINE PROCESS
DEFINE NAMELIST
DEFINE QALIAS
DEFINE QLOCAL
DEFINE QMODEL
DEFINE QREMOTE
I am running MQ v5...
Do I need to upgrade to at all have this work??
Regards |
|
Back to top |
|
 |
exerk |
Posted: Wed Aug 05, 2009 1:57 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
K_A wrote: |
I get error message :
'nohup' is not recognized as an internal or external command,
operable program or batch file. |
You're on Windows...so try:
Code: |
amqmdain crtlsr WMS1421T -t TCP -p 1421 |
K_A wrote: |
Regarding DEFINE LISTENER, I guess I need to do that under RUNMQSC: However RUNMQSC does not recognise the DEFINE LISTENER command.
I get error message:
DEFINE LISTENER (WMS1421T) TRPTYPE (TCP) PORT (1421) CONTROL(QMGR) replace;
1 : DEFINE LISTENER (WMS1421T) TRPTYPE (TCP) PORT (1421) CONTROL(QMGR) repl
ace;
AMQ8405: Syntax error detected at or near end of command segment below:-
DEFINE LISTENER
AMQ8426: Valid MQSC commands are:
DEFINE AUTHINFO
DEFINE CHANNEL
DEFINE PROCESS
DEFINE NAMELIST
DEFINE QALIAS
DEFINE QLOCAL
DEFINE QMODEL
DEFINE QREMOTE
I am running MQ v5...
Do I need to upgrade to at all have this work??
Regards |
Yes, because that only came in with V6.0! _________________ 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: Wed Aug 05, 2009 4:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
K_A wrote: |
I am running MQ v5...
Do I need to upgrade to at all have this work??
|
mqjeff wrote: |
if you're using MQ v6 or later, you should use the MQSC "START LISTENER" |
Do read the posts. And get off v5. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|