find port number of IBM MQ Queue Manager

依然范特西╮ 提交于 2019-12-24 01:13:33

问题


I have created a queue manager using these commands in a linux machine

crtmqm MQ1
strmqm MQ1
runmqsc MQ1

the queue manager is created successfully,

i wanted to know on which port is the queue manager MQ1 running, i tried all possible ways netstat -au and also ps -ef command. It looks like it is running on a different port. I am unable to find the correct port number where it is running, could anyone help?


回答1:


Use netstat as root with -p option

sudo netstat -nltp
[sudo] password for root: 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN      1362/dnsmasq        
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1580/sshd           
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      1480/cupsd

The last column gives the PID and 'Program name'. If you are running the queue manager with your user, you don't need to sudo.




回答2:


By default a new IBM MQ queue manager will not have a listener running on any port.

There is one default LISTENER object on a new queue manager which looks like this:

$echo "dis listener(SYSTEM.DEFAULT.LISTENER.TCP)"|runmqsc MQ1
....
     1 : dis listener(SYSTEM.DEFAULT.LISTENER.TCP)
AMQ8630: Display listener information details.
   LISTENER(SYSTEM.DEFAULT.LISTENER.TCP)   CONTROL(MANUAL)
   TRPTYPE(TCP)                            PORT(0)
   IPADDR( )                               BACKLOG(0)
   DESCR( )                                ALTDATE(yyyy-mm-dd)
   ALTTIME(hh.mm.ss)

If you were to start this LISTENER the PORT(0) means to start on the default port which is 1414.

Best practice is to not use SYSTEM objects and create a new object such as:

DEFINE LISTENER(LISTENER.1414.TCP) TRPTYPE(TCP) PORT(1414) CONTROL(QMGR)

The CONTROL(QMGR) tells the queue manager to start the listener when the queue manager is started and stop it when the queue manager is ended.

You can manually start and stop the above listener with the commands:

START LISTENER(LISTENER.1414.TCP)
STOP  LISTENER(LISTENER.1414.TCP)


来源:https://stackoverflow.com/questions/48255390/find-port-number-of-ibm-mq-queue-manager

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!