[Linux]

Example: setting up IBM MQ cross-platform communication on Linux

This example shows how to set up communication links from IBM® MQ on Linux® to IBM MQ on another platform and establish a working channel to that platform.

Before you begin

For background information about this example and how to use it, see Example: setting up cross-platform communication for IBM MQ and How to use the cross-platform communication examples.

About this task

This example covers setting up cross platform communication from IBM MQ on Linux to the following platforms:
  • [Windows]Windows
  • [AIX]AIX®
  • [IBM i]IBM i
  • [z/OS]z/OS®

MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.

Establish a network connection using either LU 6.2 or TCP.
Note: For TCP, some Linux distributions now use the extended inet daemon (XINETD) instead of the inet daemon (INETD). The following instructions tell you how to establish a TCP connection using either the inet daemon or the extended inet daemon.

Procedure

  1. Establish a network connection using LU6.2
    Note: The information in this section applies only to IBM MQ for Linux (x86 platform). It does not apply to IBM MQ for Linux (x86-64 platform), IBM MQ for Linux ( zSeries s390x platform), or IBM MQ for Linux ( Power platform).

    For the latest information about configuring SNA over TCP/IP, refer to the the Administration Guide for your version of Linux from the following documentation: Communications Server for Data Center Deployment on Linux library.

  2. Establish a TCP connection using the inet daemon (INETD)
    1. Edit the file /etc/services.
      If you do not have the following line in the file, add it as shown:
      MQSeries    1414/tcp   # MQSeries channel listener
      
      Note: To edit this file, you must be logged in as a superuser or root.
    2. Edit the file /etc/inetd.conf.
      If you do not have the following line in that file, add it as shown:
      MQSeries stream tcp nowait mqm MQ_INSTALLATION_PATH/bin/amqcrsta amqcrsta
      [-m queue.manager.name ]
      
    3. Find the process ID of the inetd with the command:
      ps -ef | grep inetd
      
    4. Run the command:
      kill -1 inetd processid
      

      If you have more than one queue manager on your system, and therefore require more than one service, you must add a line for each additional queue manager to both /etc/services and inetd.conf.

      For example:
      MQSeries1   1414/tcp
      MQSeries2   1822/tcp
      
      MQSeries1 stream tcp nowait mqm MQ_INSTALLATION_PATH/bin/amqcrsta amqcrsta -m QM1
      MQSeries2 stream tcp nowait mqm MQ_INSTALLATION_PATH/bin/amqcrsta amqcrsta -m QM2
      

      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.

      The inetd process on Linux can limit the rate of inbound connections on a TCP port. The default is 40 connections in a 60 second interval. If you need a higher rate, specify a new limit on the number of inbound connections in a 60 second interval by appending a period (.) followed by the new limit to the nowait parameter of the appropriate service in inetd.conf. For example, for a limit of 500 connections in a 60 second interval use:
      MQSeries stream tcp nowait.500 mqm / MQ_INSTALLATION_PATH/bin/amqcrsta amqcrsta -m QM1
      
      MQ_INSTALLATION_PATH represents the high-level directory in which IBM MQ is installed.
  3. Establish a TCP connection using the extended inet daemon (XINETD)

    The following instructions describe how the extended inet daemon is implemented on Red Hat Linux. If you are using a different Linux distribution, you might have to adapt these instructions.

    1. Edit the file /etc/services.
      If you do not have the following line in the file, add it as shown:
      MQSeries    1414/tcp   # MQSeries channel listener
      
      If you do not have the following line in the file, add it as shown:
      MQSeries    1414/tcp   # MQSeries channel listener
      
    2. Create a file called IBM MQ in the XINETD configuration directory, /etc/xinetd.d by adding the following stanza to the file:
      # IBM MQ service for XINETD
      service MQSeries
      {
        disable         = no
        flags           = REUSE
        socket_type     = stream
        wait            = no
        user            = mqm
        server          = MQ_INSTALLATION_PATH/bin/amqcrsta
        server_args     = -m queue.manager.name
        log_on_failure += USERID
      }
      
    3. Restart the extended inet daemon by issuing the following command:
      /etc/rc.d/init.d/xinetd restart
      

      If you have more than one queue manager on your system, and therefore require more than one service, you must add a line to /etc/services for each additional queue manager. You can create a file in the /etc/xinetd.d directory for each service, or you can add additional stanzas to the IBM MQ file you created previously.

      The xinetd process on Linux can limit the rate of inbound connections on a TCP port. The default is 50 connections in a 10 second interval. If you need a higher rate, specify a new limit on the rate of inbound connections by specifying the 'cps' attribute in the xinetd configuration file. For example, for a limit of 500 connections in a 60 second interval use:
      cps = 500 60
      
  4. Complete the configuration now that the TCP/IP connection is established.