Use the TCP/IP listener on UNIX and Linux

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, we must be logged in as a superuser or root. We 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 other UNIX and Linux systems:
    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, we 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. We 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 Use the TCP listener backlog option on UNIX and Linux.

Parent topic: Defining a TCP connection on UNIX and Linux