MQ

 View Only
Expand all | Collapse all

Multi Instance or High Available IBM MQ support for SAP PO ?

  • 1.  Multi Instance or High Available IBM MQ support for SAP PO ?

    Posted Sat March 27, 2021 05:02 AM
    Hi,

    We are migrating to SAP and SAP PO in general. We use MQ Appliances which are High Available configured in a fail over configuration.
    Normally when I created a Java JMS app to ensure reconnection I us e a connection string like this in a comma delimited list:

    mqmanager1.corp.example.com(1414),mqmanager2.corp.example.com(1414).

    And in the Java JMS code I use this:
    setClientReconnectOptions(WMQConstants.WMQ_CLIENT_RECONNECT_Q_MGR);
    .setClientReconnectTimeout(600);

    And this always works for Java JMS apps.

    But in SAP PO it is not enough to use a connectionstring list, maybe somebody has an idea how to solve a multi instance high availability MQ reconnect config on the SAP PO Client ?
    Do I have to use some advanced parameters in SAP PO, ?

    Thanks
    Kind Regards

    ------------------------------
    Bernard Pittens
    Integration Engeneer
    Sligro Foodgroup B.V.
    Veghel
    ------------------------------


  • 2.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    IBM Champion
    Posted Sun March 28, 2021 06:11 PM

    If the SAP interfaces don't provide a way to give the connection list, may I suggest you try using a CCDT instead?

    I found this blog post about using the CCDT in what I think is the same environment, although I have to admit to not understanding the difference between SAP PO and SAP PI. The screenshots in the blog post appear to look the same as ones you have shared in the past about SAP PO.

    Hope that helps. If you need help with how to make the CCDT just shout. You can either have a comma-separated CONNAME in one CCDT entry or have two CCDT entries. Both should achieve what you need.

    Cheers,
    Morag



    ------------------------------
    Morag Hughson
    MQ Technical Education Specialist
    MQGem Software Limited
    Website: https://www.mqgem.com
    ------------------------------



  • 3.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    Posted Mon March 29, 2021 07:48 AM
    hi Morag,

    You are a great help, YES this is exactly what I am looking for. I can share this with our SAP PO consultant.
    Till now we only used serverCon channels but I have seen we can create clientConnection channels also, I have gathered some documentation.

    Brings me to the next question:
    We use MQ Appliances 2001A. Do you know how I can retrieve or download the CCDT table from the MQ Appliance?

    Thanks
    Bernard

    ------------------------------
    Bernard Pittens
    Integration Engeneer
    Sligro Foodgroup B.V.
    Veghel
    ------------------------------



  • 4.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    Posted Mon March 29, 2021 09:05 AM
    we can configure floating IP  to connect to active QMGR, Did you check this option ?

    ------------------------------
    Suresh Uppala
    Westborough MA
    ------------------------------



  • 5.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    IBM Champion
    Posted Tue March 30, 2021 12:07 AM

    Since IBM MQ V8, it has been possible, using runmqsc, to create your CCDT exactly where you need it. Rather than creating it on the MQ Appliance and then struggling to download it, simply fire up runmqsc -n on any machine with at minimum a client installation, and define all the CLNTCONN channels you need in the CCDT right there. Much easier.

    Cheers,
    Morag



    ------------------------------
    Morag Hughson
    MQ Technical Education Specialist
    MQGem Software Limited
    Website: https://www.mqgem.com
    ------------------------------



  • 6.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    IBM Champion
    Posted Tue March 30, 2021 02:03 AM
    Hi Bernard (and Morag)

    And if you are using a current (v9.2) client, you could use a JSON format CCDT and not have to use runmqsc to create it at all.

    The JSON format CCDT can be edited in any text editor, and also has additional capabilities (mostly related to uniform clusters).

    For info about the JSON format CCDT, there is the IBM manuals: https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.1.0/com.ibm.mq.con.doc/q132890_.htm

    Or MQGem (thanks Morag and Paul) have a utility (MQSCX) that provides a runmqsc like experience that can produce JSON CCDTs that are going to be valid (no mispelled data items or wrong ordering). - I'm not sure whether there are any other tools in the market that do this particular trick. :-)

    Regards,


    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-21
    +61 (0) 414 615 334
    ------------------------------



  • 7.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    Posted Tue March 30, 2021 04:27 AM
    Hi Bernard,

    Further to Morag and Neil's replies, you can generate a CCDT on the MQ Appliance by using the rcrmqobj command in the mqcli.

    rcrmqobj -m queue_manager_name -t clchltab

    A file named queue_manager_name_AMQCLCHL.TAB is generated and saved in the mqbackup:// file system, which you can then download by using either the web UI, the REST API, or SCP (the copy command).

    For more information please see Creating and downloading a CCDT file in the MQ Appliance Knowledge Center at https://www.ibm.com/support/knowledgecenter/SS5K6E_9.2.0/com.ibm.mqa.doc/administering/ad00230_.html

    Kind regards,
    Jamie

    ------------------------------
    Jamie Squibb
    ------------------------------



  • 8.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    Posted Wed March 31, 2021 02:27 AM
    Hi All,

    Thanks all for all the support, great, I have created a simple Java JMS app to test the solution.  So I have a solution where I can see in the log AMQERR01.log that my Java JMS client tries to connect with MQ. Because it gives an error

    Real name QManager = QMAN_ACC which is high available running on a temporary Linux environment. HA is tested and works when using Server connection channels in a JMS app. 
    Host1 = accimq01.example.nl(1414)
    Host2 = accimq02.example.nl(1414)

    This is the Clientchannel definition command:
    DEFINE CHANNEL(ESB.CLIENTCONN) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('accimq01.example.nl(1414),accimq02.example.nl(1414)') DEFRECON(QMGR) QMNAME(QMAN_HA) REPLACE

    Which results in  after running  runmqsc -n:

    -bash-4.2$ export MQCHLTAB=AMQCLCHL.TAB
    -bash-4.2$ runmqsc -n
    5724-H72 (C) Copyright IBM Corp. 1994, 2016.
    Starting local MQSC for 'AMQCLCHL.TAB'.


    DIS CHL(*)
    2 : DIS CHL(ESB.CLIENTCONN)
    AMQ8414: Display Channel details.
    CHANNEL(ESB.CLIENTCONN)
    CHLTYPE(CLNTCONN)
    AFFINITY(PREFERRED)
    ALTDATE(2021-03-30)
    ALTTIME(20.45.44)
    CERTLABL( )
    CLNTWGHT(0)
    COMPHDR(NONE)
    COMPMSG(NONE)
    CONNAME(accimq01.example.nl(1414),accimq02.example.nl(1414))
    DEFRECON(QMGR)
    DESCR( )
    HBINT(300)
    KAINT(AUTO)
    LOCLADDR( )
    MAXMSGL(4194304)
    MODENAME( )
    PASSWORD( )
    QMNAME(QMAN_HA)
    RCVDATA( )
    RCVEXIT( )
    SCYDATA( )
    SCYEXIT( )
    SENDDATA( )
    SENDEXIT( )
    SHARECNV(10)
    SSLCIPH( )
    SSLPEER( )
    TPNAME( )
    TRPTYPE(TCP)
    USERID( )

    Basic code to connect in Java JMS is this:

    mqConnectionFactory.setQueueManager("QMAN_HA");    // I am refering to the group name in the client connection channel. Is this correct ?
    java.net.URL chanTab1 = new URL("file:///C:/Users/bpSligro/eclipse-workspace/TestIBMMQ/AMQCLCHL.TAB");   //location of the AMQCLCHL.TAB.
    mqConnectionFactory.setCCDTURL(chanTab1);

    connection = mqConnectionFactory.createConnection();

    And this is the error I get when running the Java JMS app:

    03/31/2021 08:04:57 AM - Process(4395.6) User(mqm) Program(amqrmppa)
    Host(accimq01.example.nl) Installation(Installation1)
    VRMF(9.0.1.0) QMgr(QMAN_ACC)

    AMQ9780: Channel to remote machine '192.168.178.11' is ending due to an error.

    EXPLANATION:
    Channel 'ESB.CLIENTCONN' between this machine and the remote machine
    '192.168.178.11' encountered an error and will now end. In some cases the
    channel name can not be determined and so is shown as '????'.

    This message will be accompanied by other messages which explain the cause of
    the error.
    ACTION:
    Tell the systems administrator, who should attempt to identify the cause of the
    channel failure using problem determination techniques. For example, look for
    FFST files, and examine the error logs on the local and remote systems where
    there may be messages explaining the cause of failure. More information may be
    obtained by repeating the operation with tracing enabled.
    ----- amqrcoba.c : 1310 -------------------------------------------------------
    03/31/2021 08:04:57 AM - Process(4395.6) User(mqm) Program(amqrmppa)
    Host(accimq01.example.nl) Installation(Installation1)
    VRMF(9.0.1.0) QMgr(QMAN_ACC)

    AMQ9519: Channel 'ESB.CLIENTCONN' not found.

    EXPLANATION:
    The requested operation failed because the program could not find a definition
    of channel 'ESB.CLIENTCONN'.
    ACTION:
    Check that the name is specified correctly and the channel definition is
    available.
    ----- amqrcoba.c : 1347 -------------------------------------------------------
    03/31/2021 08:04:57 AM - Process(4395.6) User(mqm) Program(amqrmppa)
    Host(accimq01.example.nl) Installation(Installation1)
    VRMF(9.0.1.0) QMgr(QMAN_ACC)

    AMQ9999: Channel 'ESB.CLIENTCONN' to host '192.168.178.11' ended abnormally.

    EXPLANATION:
    The channel program running under process ID 4395 for channel 'ESB.CLIENTCONN'
    ended abnormally. The host name is '192.168.178.11'; in some cases the host
    name cannot be determined and so is shown as '????'.
    ACTION:
    Look at previous error messages for the channel program in the error logs to
    determine the cause of the failure. Note that this message can be excluded
    completely or suppressed by tuning the "ExcludeMessage" or "SuppressMessage"
    attributes under the "QMErrorLog" stanza in qm.ini. Further information can be
    found in the System Administration Guide.
    ----- amqrmrsa.c : 938 --------------------------------------------------------

    Any idea what I am doing wrong ??

    ------------------------------
    Bernard Pittens
    Integration Engeneer
    Sligro Foodgroup B.V.
    Veghel
    ------------------------------



  • 9.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?
    Best Answer

    IBM Champion
    Posted Wed March 31, 2021 03:06 AM
    Hi Bernard,

    it looks like you are close. You correctly use the group name in the connect request, but because this isn't the same as the queue manager name, you need to prefix it with an * (asterisk) character. This tells MQ that the queue manager name in the client connection request doesn't have to match the actual queue manager name.

    The second thing is, do you have a SVRCONN channel in the queue manager also called 'ESB.CLIENTCONN'?

    The client channel selected by the client has to have the same name as a SVRCONN channel on the queue manager that receives the connection.

    Regards,



    ------------------------------
    Neil Casey
    Senior Consultant
    Syntegrity Solutions
    Melbourne, Victoria
    IBM Champion (Cloud) 2019-21
    +61 (0) 414 615 334
    ------------------------------



  • 10.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    Posted Wed March 31, 2021 03:59 AM
    Edited by Bernard Pittens Wed March 31, 2021 04:59 AM
    Hi Neil,

    THANKS, YESSSS, that does the trick.
    Ok my local hello world is working, the big challenge is to configure this in SAP PO, but we have consultants for that who can follow the link @Morag Hughson have send.

    For anybody who is following this discussion these are the key points when creating CCDT and make it High Available(HA) via a client connection channel:
    Also some interesting link from Angel Revera (very detailed explanation) about creating CCDT with HA:
    Link Angel Rivera

    //In Java JMS you only have to point to the CCDT and you have to prefix the Qmanager group name with a *
    mqConnectionFactory.setQueueManager("*QMAN_HA");
    java.net.URL chanTab1 = new URL("file:///C:/Users/bpSligro/eclipse-workspace/TestIBMMQ/AMQCLCHL.TAB");
    mqConnectionFactory.setCCDTURL(chanTab1);

    Then you can create the CCDT binary file with this command (I have created on my temp Linux MQ server): 
    runmqsc -n 
    //In runmqsc you create the actual CCDT which holds the client connection channel setting:
    DEFINE CHANNEL(ESB.CLIENTCONN) CHLTYPE(CLNTCONN) TRPTYPE(TCP) CONNAME('accimq01.example.nl(1414),accimq02.example.nl(1414)') DEFRECON(QMGR) QMNAME(QMAN_HA) REPLACE
    //This will create the AMQCLCHL.TAB file on this system.

    //you can view the settings wit this command
    DIS CHL(ESB.CLIENTCONN)
    //next leave runmqsc with
    exit


    //On the queuemanger you have to create a client server connection channel which must have the same name as the client connection channel
    DEFINE CHANNEL(ESB.CLIENTCONN) CHLTYPE(CLNTCONN) TRPTYPE(TCP) 


    Then you can copy the
    AMQCLCHL.TAB 
    file to the client system, in my case directory:
    C:/Users/bpSligro/eclipse-workspace/TestIBMMQ/AMQCLCHL.TAB

    And when you use MQ Appliances like we do  I refer to the above note from @Jamie Squibb

    Thats all, thanks very much for supporting us and have a nice day.


    Kind regards








    ​​

    ------------------------------
    Bernard Pittens
    Integration Engeneer
    Sligro Foodgroup B.V.
    Veghel
    ------------------------------



  • 11.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    IBM Champion
    Posted Wed March 31, 2021 04:38 AM

    Yay! Glad to hear you got it working.

    I would make one addendum to your list - you only need to create the CLNTCONN channel definitions on the queue manager if you intend to export the CCDT from that queue manager machine. If you build the CCDT using runmqsc -n on a client machine and type in the DEFINE CHANNEL(...) CHLTYPE(CLNTCONN) ... command inside there, then you don't need to create them on the queue manager - you only need the SVRCONN channels on the queue manager.

    All the best.

    Cheers,
    Morag



    ------------------------------
    Morag Hughson
    MQ Technical Education Specialist
    MQGem Software Limited
    Website: https://www.mqgem.com
    ------------------------------



  • 12.  RE: Multi Instance or High Available IBM MQ support for SAP PO ?

    Posted Wed March 31, 2021 05:03 AM
    Hi Morag,

    Thanks for you comments and you are definitely right, you don't need to create the client connection channel on the MQ server, I have updated my listing above. Right now I also understand how this configuration is working. Thanks.
    Kind regards.

    ------------------------------
    Bernard Pittens
    Integration Engeneer
    Sligro Foodgroup B.V.
    Veghel
    ------------------------------