Configure MQIPT clustering support

In this scenario, we can set up a clustering environment.


Before starting

  • Before you start to use this scenario, make sure that we have completed the prerequisite tasks listed in Getting started with IBM MQ Internet Pass-Thru.
  • On the IBM MQ server LONDON:

    • Defined a queue manager called LONDON.
    • Defined a server connection channel called MQIPT.CONN.CHANNEL.
    • Started a TCP/IP listener for LONDON on port 1414.
    • SOCKS-enabled the queue manager.

  • On the IBM MQ server NEWYORK:

    • Defined a queue manager called NEWYORK.
    • Defined a server connection channel called MQIPT.CONN.CHANNEL.
    • Started a TCP/IP listener for NEWYORK on port 1414.
    • SOCKS-enabled the queue manager.

Note: To SOCKS-enable a queue manager, enable either the whole computer or just the IBM MQ server application. Configure the SOCKS client as follows:

  • Point the client to MQIPT as the SOCKS proxy.
  • Enable SOCKS V5 support.
  • Disable user authentication.
  • Only make remote connections to the MQIPT.


About this task

Figure 1. Clustering network diagram

This diagram shows the connections from the IBM MQ clients through MQIPT to the IBM MQ servers.

Only one application can listen on a given port on the same computer. If port 1414 is already in use, choose a free port and substitute it in the examples.

You can then test the routes between the queue managers by putting a message on the local queue on the LONDON server and retrieving it from the NEWYORK server.


Procedure

To configure MQIPT clustering support, complete the following steps:

  1. Set up the LONDON server. Open a command prompt and enter the following commands:
    runmqsc
    DEFINE CHANNEL(TO.LONDON) +
           CHLTYPE(CLUSRCVR) TRPTYPE(TCP) +
           CLUSTER(INVENTORY) +
           CONNAME('10.10.6.7(1414)')
    DEFINE CHANNEL(TO.NEWYORK) +
           CHLTYPE(CLUSSDR) TRPTYPE(TCP) +
           CLUSTER(INVENTORY) +
           CONNAME('10.9.20.5(1414)')
  2. Set up the NEWYORK server Open a command prompt and enter the following commands:
    runmqsc
    ALTER QMGR REPOS(INVENTORY)
    DEFINE QLOCAL(MQIPT.LOCAL.QUEUE) +
           CLUSTER(INVENTORY)
    DEFINE CHANNEL(TO.NEWYORK) +
           CHLTYPE(CLUSRCVR) TRPTYPE(TCP) +
           CLUSTER(INVENTORY) +
           CONNAME('10.9.20.5(1414)')
    DEFINE CHANNEL(TO.LONDON) +
           CHLTYPE(CLUSSDR) TRPTYPE(TCP) +
           CLUSTER(INVENTORY) +
           CONNAME('10.10.6.7(1414)')
  3. Set up MQIPT 1. Edit mqipt.conf and add the following route definitions:
    [route]
    Name=LONDON to NEWYORK
    ListenerPort=1415
    Destination=10.9.20.5
    DestinationPort=1414
    SocksServer=true
    
    [route]
    Name=MQIPT1 to LONDON
    ListenerPort=1414
    Destination=10.7.20.2
    DestinationPort=1414
  4. Start MQIPT 1. Open a command prompt and enter:
    C:\mqipt\bin\mqipt C:\mqiptHome -n ipt1
    where C:\mqiptHome indicates the location of the MQIPT configuration file, mqipt.conf, and ipt1 is the name to be given to the instance of MQIPT. The following messages indicate that MQIPT has started successfully:
    5724-H72 (C) Copyright IBM Corp. 2000, 2020 All Rights Reserved
    MQCPI001 IBM MQ Internet Pass-Thru V9.2.0.0 starting
    MQCPI004 Reading configuration information from mqipt.conf
    MQCPI152 MQIPT name is ipt1
    MQCPI021 Password checking has been enabled on the command port
    MQCPI011 The path C:\mqiptHome\logs will be used to store the log files
    MQCPI006 Route 1415 has started and will forward messages to :
    MQCPI034 ....10.9.20.5(1414)
    MQCPI035 ....using MQ protocol
    MQCPI052 ....SOCKS server side enabled
    MQCPI078 Route 1415 ready for connection requests
    MQCPI006 Route 1414 has started and will forward messages to :
    MQCPI034 ....10.7.20.2(1414)
    MQCPI035 ....using MQ protocol
    MQCPI078 Route 1414 ready for connection requests
  5. Set up MQIPT 2. Edit mqipt.conf and add the following route definitions:
    [route]
    Name=NEWYORK to LONDON
    ListenerPort=1415
    Destination=10.10.6.7
    DestinationPort=1414
    SocksServer=true
    
    [route]
    Name=MQIPT2 to NEWYORK
    ListenerPort=1414
    Destination=10.9.1.2
    DestinationPort=1414
  6. Start MQIPT 2. Open a command prompt and enter the following commands:
    C:
    cd \mqipt\bin
    mqipt .. -n ipt2
    where .. indicates that the MQIPT configuration file, mqipt.conf, is in the parent directory, and ipt2 is the name to be given to the instance of MQIPT. The following messages indicate that MQIPT has started successfully:
    5724-H72 (C) Copyright IBM Corp. 2000, 2020 All Rights Reserved
    MQCPI001 IBM MQ Internet Pass-Thru V9.2.0.0 starting
    MQCPI004 Reading configuration information from mqipt.conf
    MQCPI152 MQIPT name is ipt2
    MQCPI021 Password checking has been enabled on the command port
    MQCPI011 The path C:\mqipt\logs will be used to store the log files
    MQCPI006 Route 1415 has started and will forward messages to :
    MQCPI034 ....10.10.6.7(1414)
    MQCPI035 ....using MQ protocol
    MQCPI052 ....SOCKS server side enabled
    MQCPI078 Route 1415 ready for connection requests
    MQCPI006 Route 1414 has started and will forward messages to :
    MQCPI034 ....10.9.1.2(1414)
    MQCPI035 ....using MQ protocol
    MQCPI078 Route 1414 ready for connection requests
  7. At a command prompt on the LONDON IBM MQ client (10.7.20.1), enter the following commands:
    1. Set the MQSERVER environment variable:
      SET MQSERVER=MQIPT.CONN.CHANNEL/tcp/10.7.20.2(1414)
    2. Put a message:
      amqsputc MQIPT.LOCAL.QUEUE LONDON
      Hello world
      Press Enter twice after typing the message string.

    This causes the LONDON queue manager to send messages to the queue on the NEW YORK queue manager.

  8. At a command prompt on the NEW YORK IBM MQ client (10.9.1.3), enter the following commands:
    1. Set the MQSERVER environment variable:
      SET MQSERVER=MQIPT.CONN.CHANNEL/TCP/10.9.1.2(1414)
    2. Get the message:
      amqsgetc MQIPT.LOCAL.QUEUE NEWYORK
      The message, "Hello world" is returned.

Parent topic: Getting started with IBM MQ Internet Pass-Thru