Using the TCP/IP listener

To start channels on UNIX and Linux®, the /etc/services file and the inetd.conf file must be edited

Follow these instructions:
  1. Edit the /etc/services file:
    Note: To edit the /etc/services file, you must be logged in as a superuser or root. You can change this, but it must match the port number specified at the sending end.
    Add the following line to the file:
    
    MQSeries 1414/tcp
    
    where 1414 is the port number required by IBM® MQ. The port number must not exceed 65535.
  2. Add a line in the inetd.conf file to call the program amqcrsta, where MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed:
    
    MQSeries stream tcp nowait mqm MQ_INSTALLATION_PATH/bin/amqcrsta amqcrsta
    [-m Queue_Man_Name]
    
The updates are active after inetd has reread the configuration files. To do this, issue the following commands from the root user ID:
  • On AIX®:
    
    refresh -s inetd
    
  • On HP-UX, from the mqm user ID:
    
    inetd -c
    
  • On Solaris 10 or later:
    
    inetconv
    
  • On other UNIX and Linux systems (including Solaris 9):
    
    kill -1 < process number >
    
When the listener program started by inetd inherits the locale from inetd, it is possible that the MQMDE is not honored (merged) and is placed on the queue as message data. To ensure that the MQMDE is honored, you must set the locale correctly. The locale set by inetd might not match that chosen for other locales used by IBM MQ processes. To set the locale:
  1. Create a shell script which sets the locale environment variables LANG, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME, and LC_MESSAGES to the locale used for other IBM MQ process.
  2. In the same shell script, call the listener program.
  3. Modify the inetd.conf file to call your shell script in place of the listener program.
It is possible to have more than one queue manager on the server. You must add a line to each of the two files, for each of the queue managers. For example:

MQSeries1   1414/tcp
MQSeries2   1822/tcp

MQSeries2 stream tcp nowait mqm MQ_INSTALLATION_PATH/bin/amqcrsta amqcrsta -m QM2
Where MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.

This avoids error messages being generated if there is a limitation on the number of outstanding connection requests queued at a single TCP port. For information about the number of outstanding connection requests, see Using the TCP listener backlog option.