MQ

 View Only
Expand all | Collapse all

Establishing a conection

  • 1.  Establishing a conection

    Posted Tue March 23, 2021 10:50 AM
    I am trying to run the SampleProducerCS program on a server where we have RFHUTIL installed.  I am running the program as wmq and using the connection information from rfhutil.  The program generates an exception 2058, meaning that it does not recognize the queue manager name.

    Here is the contents of the rsp file:
    simple
    wmq
    client
    STAGING.MCI.INTFC.QMGR
    localhost
    DELTAFEED.OUT.AOC
    test

    ------------------------------
    Martin Cohen
    ------------------------------


  • 2.  RE: Establishing a conection

    IBM Champion
    Posted Tue March 23, 2021 07:14 PM

    Do you know Fritzgerald Pierre-Louis? Because you have exactly the same queue manager as he does and exactly the same problem description.

    Here is the reply I just sent him after he replied privately with the output from the dspmq command.

    So it appears that you have two queue managers on your machine, one called STAGING.MCI.INTFC.QMGR which is the one you hope to connect to, and one called ICM. You tell the program that the hostname is just "localhost" without any port number, which will mean that it connects to localhost(1414).

    Is it possible that port 1414 is actually the port the listener for queue manager ICM is using and that you should be providing a hostname in the application with a port number for the queue manager you wish to connect to.

    If you don't know how to find out the port number in use by your queue manager, start up the runmqsc program for each queue manager in turn, and type in the following command:

    DISPLAY LSSTATUS(*) PORT

    Then change your application parameters to use localhost(nnnn) where nnnn is the port number for that queue manager.

    Cheers,
    Morag



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



  • 3.  RE: Establishing a conection

    Posted Wed March 24, 2021 08:14 AM
    Thanks for responding.  I am working with Fritzgerald Pierre-Louis.  From the command line, I entered "runmqsc".  The response was, "Starting MQSC for queue manager STAGING.MCI.INTFC.QMGR".  Then I entered "display lsstatus(port)".  The response was, "AMQ8147E: IBM MQ object PORT not found".  What does that mean?  Is the queue manager missing a port, or did I make a mistake in what I typed?

    ------------------------------
    Martin Cohen
    ------------------------------



  • 4.  RE: Establishing a conection

    IBM Champion
    Posted Wed March 24, 2021 08:25 AM
    Hello,
    "display lsstatus(port)" is not a coorect MQSC command.
    You should use:
    display lsstatus (<listener_name>) port
    To find the listener name, try :
    display listener (*)
    The default name is LISTENER.TCP, but you can name it differently.

    To see status and port of all listeners, try :
    display lsstatus (*) port

    HTH, LMD.

    ------------------------------
    Luc-Michel Demey
    DEMEY CONSULTING
    lmd@demey-consulting.fr
    ------------------------------



  • 5.  RE: Establishing a conection

    Posted Wed March 24, 2021 08:26 AM
    DISPLAY LSSTATUS(<NameOfTheListener>)

    If you are not sure of the Listener name then try below

    DISPLAY LISTENER(*) TRPTYPE(ALL) => Lists all listeners info
    DISPLAY LSSTATUS(*) => Lists all listener status

    ------------------------------
    Rajasekhar Muthamsetty
    ------------------------------



  • 6.  RE: Establishing a conection

    Posted Wed March 24, 2021 08:55 AM
    I found the port.  In runmqsc,  I entered "display lsstatus(*) port".  The response showed that for STAGING.MCI.INTFC.QMGR, the port is 1418.  I then ran the producer program, and instead of accepting the default localhost, I entered localhost(1418).  The program is still showing the 2058 error message.

    ------------------------------
    Martin Cohen
    ------------------------------



  • 7.  RE: Establishing a conection

    Posted Wed March 24, 2021 09:00 AM
    Sorry, the message is now 2538.  Does that mean that the queue must be started?

    ------------------------------
    Martin Cohen
    ------------------------------



  • 8.  RE: Establishing a conection

    IBM Champion
    Posted Wed March 24, 2021 09:11 AM
    Try "mqrc 2538"
    This will give you a hint about this error :
    2538  0x000009ea  MQRC_HOST_NOT_AVAILABLE​


    ------------------------------
    Luc-Michel Demey
    DEMEY CONSULTING
    lmd@demey-consulting.fr
    ------------------------------



  • 9.  RE: Establishing a conection

    Posted Wed March 24, 2021 09:42 AM
    Luc Michel,  I have made some progress.  I started up the destination channel and used localhost(1418) in the producer program.   I am now getting a message code of 2035, which is an authorization error.  I am a bit confused about this because from the command line I can enter runmqsc STAGING.MCI.INTFC.QMGR and do not get any error message, as the Web site for error 2035 indicates I should.  See https://www.ibm.com/support/pages/connect-queue-manager-failed-reason-code-2035-mqrcnotauthorized-amq8135-not-authorized

    ------------------------------
    Martin Cohen
    ------------------------------



  • 10.  RE: Establishing a conection

    IBM Champion
    Posted Wed March 24, 2021 10:35 AM
    mqrc 2035 --> 2035 0x000007f3 MQRC_NOT_AUTHORIZED --> The user is not allowed to use MQ.

    Two possibilities:
    - the user does not have the rights to do MQCONN / MQOPEN ... on this Queue Manager
    - the user belongs to the mqm group (= privileged user), and access via this SVRCONN channel is not allowed to privileged accounts.

    I suggest that you read some documentation on CHLAUTH subject, for example https://www.ibm.com/support/knowledgecenter/fr/SSFKSJ_9.2.0/com.ibm.mq.sec.doc/q010250_.html.

    Regards.

    ------------------------------
    Luc-Michel Demey
    DEMEY CONSULTING
    lmd@demey-consulting.fr
    ------------------------------



  • 11.  RE: Establishing a conection

    Posted Wed March 24, 2021 10:58 AM

    Luc-Michel,

         Thank you for your responses.

    When I tried to follow your link, I got an error message saying that the Web page does not exist.

     

    Martin Cohen

    Senior Programmer

     

    T 609.588.6090

    Mcohen38@GainwellTechnologies.com

     

    Gainwell Technologies

    3705 Quakerbridge Rd, Suite 101
    Trenton, NJ 08619

     

    gainwelltechnologies.com

     

     






  • 12.  RE: Establishing a conection

    IBM Champion
    Posted Wed March 24, 2021 12:54 PM
    Sorry for the type.
    There was an extra doc at the end.
    The url is :
    https://www.ibm.com/support/knowledgecenter/fr/SSFKSJ_9.2.0/com.ibm.mq.sec.doc/q010250_.htmlgainwelltechnologies.com


    ------------------------------
    Luc-Michel Demey
    DEMEY CONSULTING
    lmd@demey-consulting.fr
    ------------------------------



  • 13.  RE: Establishing a conection

    IBM Champion
    Posted Wed March 24, 2021 06:46 PM

    Hi Martin,

    Sounds like you have made some progress. I expect if you look in the AMQERR01.LOG of queue manager STAGING.MCI.INTFC.QMGR you will see an error message detailing the reason for the 2035 failure. This also proves you are now connecting to the correct queue manager!

    You ask why you can connect with runmqsc and not with your application and the short answer is the difference in security requirements between a locally bound connection which is how you are using runmqsc, and a network connected (aka client connected) application. Security requirements are much more stringent for connections coming in over the network. Specifically, these security requirements ban (by default) the use of privileged users (those in the mqm group for example).

    You have a few options here.

    • Use a non-privileged user ID and set up the access it needs instead of relying on all access which is granted to mqm
    • Use a locally bound connection for your application instead of a network/client connection
    • Remove the stringent security requirements and allow your mqm group user id to be allowed in over a client connection

    Which of these you wish to use will depend somewhat on your environment. Are you using a client connection because later you need to run this application on another machine? If so, stay with client connections, and look into a non-mqm user id, since your other machine will likely have a user ID not known to the queue manager machine. Are you just playing with things and don't really require strong security or is this a production system where security should remain strong?

    We can help you with all of the above, but prefer to advise based on what your requirements are.

    Cheers,
    Morag



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



  • 14.  RE: Establishing a conection

    IBM Champion
    Posted Wed March 31, 2021 01:57 AM

    Hi again Martin,

    Where did you get with this problem? Did you solve your 2035 by looking in the AMQERR01.LOG? Did you decide which route you wanted to go? If you need further assistance, please do just post and let us know where you got to.

    Cheers,
    Morag



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