Search code examples
ibm-mqamqp

Troubleshooring AMQP Errors (websphere mq)


Is there a way to verify if the AMQP Service is running correctly. Installation is on Linux - RHEL.

When the AMQP Service is started, command results suggests it is started, but when the channel is started in successive step, it shows error "AMQ8494: AMQP commands are not available", The error message description says service is not running. (error in STEP6 described below).

Display channel status commands show similar error as well (AMQ8494).


Current Configuration steps and verification steps followed

STEP1:Set primary instance (run as root)

/opt/mqm/bin/setmqinst -i -p /opt/mqm

Run as MQM for following STEP2: Create queue manager

/opt/mqm/bin/crtmqm QMGR_CLAIM

STEP3: Update command level

strmqm -e CMDLEVEL=801 QMGR_CLAIM

STEP4: Start queue manager

/opt/mqm//bin/strmqm QMGR_CLAIM

--Verification steps : how to check if service is running dspmq (shows status running)

STEP5: Start AMQP Service

echo "START SERVICE(SYSTEM.AMQP.SERVICE)" | runmqsc QMGR_CLAIM

--Verification steps : how to check if service is running Is there a way to verify this actually started service service SYSTEM.AMQP.SERVICE status

o/p:

   Starting MQSC for queue manager QMGR_CLAIM.
     1 : START SERVICE(SYSTEM.AMQP.SERVICE)
    AMQ8733: Request to start Service accepted.
    One MQSC command read.
    No commands have a syntax error.
    All valid MQSC commands were processed.

STEP6: Start default channel

echo "START CHANNEL (SYSTEM.DEF.AMQP)" | runmqsc QMGR_CLAIM

O//P:

Starting MQSC for queue manager QMGR_CLAIM.
     1 : START CHANNEL (SYSTEM.DEF.AMQP)
AMQ8494: AMQP commands are not available.
One MQSC command read.
No commands have a syntax error.
One valid MQSC command could not be processed.

--Verification STEPS 
Display default channel
echo "display CHANNEL(SYSTEM.DEF.AMQP) CHLTYPE(AMQP)" | runmqsc QMGR_CLAIM

O/P:
Starting MQSC for queue manager QMGR_CLAIM.

     1 : display CHANNEL(SYSTEM.DEF.AMQP) CHLTYPE(AMQP)
AMQ8414: Display Channel details.
   CHANNEL(SYSTEM.DEF.AMQP)                CHLTYPE(AMQP)
   ALTDATE(2015-11-12)                     ALTTIME(18.38.30)
   CERTLABL( )                             DESCR( )
   AMQPKA(AUTO)                            LOCLADDR( )
   MAXINST(999999999)                      MAXMSGL(4194304)
   MCAUSER( )                              PORT(5672)
   SSLCAUTH(REQUIRED)                      SSLCIPH( )
   SSLPEER( )                              USECLTID(NO)
One MQSC command read.
No commands have a syntax error.
All valid MQSC commands were processed.
Display channel status
echo "dis chstatus(SYSTEM.DEF.AMQP) chltype(AMQP) all" | runmqsc QMGR_CLAIM 
echo "display chstatus(*)" | runmqsc QMGR_CLAIM 
O/P:


 Starting MQSC for queue manager QMGR_CLAIM.


         1 : display chstatus(*)
    AMQ8420: Channel Status not found.
    One MQSC command read.
    No commands have a syntax error.
    One valid MQSC command could not be processed.

STEP7: Alter default channel , set port 5672

echo "ALTER CHANNEL(SYSTEM.DEF.AMQP) CHLTYPE(AMQP) PORT(5672)" | runmqsc QMGR_CLAIM

STEP8 Disable user authorizations Channel

echo "ALTER QMGR CHLAUTH(DISABLED)" | runmqsc QMGR_CLAIM

STEP9 Start Listener

echo "start LISTENER(SYSTEM.DEFAULT.LISTENER.TCP)" | runmqsc QMGR_CLAIM


 --Verification
    echo "DISPLAY LSSTATUS(*) STATUS" | runmqsc QMGR_CLAIM
    echo "display lsstatus(SYSTEM.DEFAULT.LISTENER.TCP)" | runmqsc QMGR_CLAIM
    ps -ef | grep runmqlsr | grep 1414

Solution

  • You can check the status of the AMQP service using the DISPLAY SVSTATUS command in runmqsc. You should get output similar to this:

    DIS SVSTATUS(SYSTEM.AMQP.SERVICE)
    
    3 : DIS SVSTATUS(SYSTEM.AMQP.SERVICE)
    
    AMQ8632: Display service status details.
    
       SERVICE(SYSTEM.AMQP.SERVICE)            STATUS(RUNNING)
    
       PID(19254)                              SERVTYPE(SERVER)
    
       STARTDA(2015-11-11)                     STARTTI(16.04.51)
    
       CONTROL(QMGR)                           STARTCMD(/opt/mqmAMQP//bin/amqp.sh)
    
       STARTARG(start -m QM1 -d "/var/mqm/qmgrs/QM1//." -g "/var/mqm//.")
       STOPCMD(/opt/mqmAMQP//bin/amqp.sh)   
    
       STOPARG(stop -m QM1 -d "/var/mqm/qmgrs/QM1//." -g "/var/mqm//.")
       DESCR(Manages clients that use the AMQP protocol)
    
       STDOUT(/var/mqm/qmgrs/QM1//amqp.stdout)
       STDERR(/var/mqm/qmgrs/QM1//amqp.stderr)
    

    You can see that the STATUS field is marked as RUNNING - so the service is up and running correctly and the JVM process ID is 19254.