Establishing a TCP connection


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.

 

Using the inet daemon (INETD)

To establish a TCP connection, follow these steps.

  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, 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 /opt/mqm/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

 

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.

To establish a TCP connection, follow these steps.

  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, be logged in as a superuser or root.

  2. Create a file called MQSeries in the XINETD configuration directory, /etc/xinetd.d. Add the following stanza to the file:
    # WebSphere MQ service for XINETD
    service MQSeries
    {
      disable         = no
      flags           = REUSE
      socket_type     = stream
      wait            = no
      user            = mqm
      server          = /opt/mqm/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 can create a file in the /etc/xinetd.d directory for each service, or you can add additional stanzas to the MQSeries file you created previously.

 

What next?

The TCP/IP connection is now established. You are ready to complete the configuration. Go to WebSphere MQ for Linux configuration.

 

WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.

 

IBM is a trademark of the IBM Corporation in the United States, other countries, or both.