Do not start the listener manually or script. If you have a modern queue manager, define a listener like this:
DEF LISTENER(LISTENER.1414) TRPTYPE(TCP) + CONTROL(QMGR) PORT(1414) + REPLACE START LISTENER(LISTENER.1414)
The CONTROL(QMGR) attribute CONTROL(QMGR) tells QMgr to start the listener automatically when QMgr starts and kill the listener when QMgr is turned off. This ensures that the listener will always be launched when QMgr appears, even if QMgr is started manually, and not from a regular script load. Since the listener is a child of QMgr, it will always work with QMgr, so you donβt have to worry about lost listeners warning connections after restarting QMgr.
After defining the listener, you can also use the START LISTENER or STOP LISTENER MQSC commands to manually start and stop it regardless of QMgr. In the above example, I manually started listening, not rebooting QMgr. Any of these will work, but the START command is less intrusive.
T.Rob source share