MQ

 View Only
  • 1.  mqweb auto restart after server reboot

    Posted Mon December 05, 2022 05:53 PM
    Edited by Praveen Mon December 05, 2022 07:51 PM


  • 2.  RE: mqweb auto restart after server reboot

    Posted Wed December 07, 2022 05:36 AM
    Hi Praveen,

    I presume you are asking how to automatically start the web console, this post might help,

    https://community.ibm.com/community/user/integration/discussion/startstop-all-qm-with-systemd#bmbd8bb063-0c86-4f44-9b7b-d1b4868e7f1f

    ------------------------------
    Regards,

    Martin Evans
    IBM MQ Technical Product Manager
    ------------------------------



  • 3.  RE: mqweb auto restart after server reboot

    Posted Thu December 08, 2022 09:07 AM

    You can also let the QM manage the web service:


    For Linux:

    echo "DEFINE SERVICE('MQWeb_Service') CONTROL(QMGR) DESCR('MQ Web Server') SERVTYPE(COMMAND) STARTCMD('/opt/mqm/bin/strmqweb') STOPCMD('/opt/mqm/bin/endmqweb') REPLACE "|runmqsc <QMNAME>

    For AIX:

    echo "DEFINE SERVICE('MQWeb_Service') CONTROL(QMGR) DESCR('MQ Web Server') SERVTYPE(COMMAND) STARTCMD('/usr/mqm/bin/strmqweb') STOPCMD('/usr/mqm/bin/endmqweb') REPLACE "|runmqsc <QMNAME>

    But read the manual, there are some gotcha's when using this method



    ------------------------------
    Rob Simons
    ------------------------------



  • 4.  RE: mqweb auto restart after server reboot
    Best Answer

    Posted Fri December 09, 2022 06:36 PM
    In addition to Rob's suggestion, I would also recommend that the STDOUT() and STDERR() attributes be specified so that messages generated by starting and stopping the service are saved to specific files in known locations.  For example, something like this perhaps:


    For Linux:

    echo "DEFINE SERVICE('MQWeb_Service') CONTROL(QMGR) DESCR('MQ Web Server') SERVTYPE(COMMAND) STARTCMD('/opt/mqm/bin/strmqweb') STOPCMD('/opt/mqm/bin/endmqweb') STDOUT('/var/mqm/errors/MQWeb_Service.stdout') STDERR('/var/mqm/errors/MQWeb_Service.stderr') REPLACE " | runmqsc <QMNAME>

    For AIX:

    echo "DEFINE SERVICE('MQWeb_Service') CONTROL(QMGR) DESCR('MQ Web Server') SERVTYPE(COMMAND) STARTCMD('/usr/mqm/bin/strmqweb') STOPCMD('/usr/mqm/bin/endmqweb') STDOUT('/var/mqm/errors/MQWeb_Service.stdout') STDERR('/var/mqm/errors/MQWeb_Service.stderr') REPLACE " | runmqsc <QMNAME>



    ------------------------------
    Bob Gibson
    Advisory Software Engineer
    IBM
    ------------------------------



  • 5.  RE: mqweb auto restart after server reboot

    Posted Sat December 10, 2022 05:31 AM
    Thank you Bob working with me, mqweb is working now as expected after server reboot.

    ------------------------------
    Praveen
    ------------------------------



  • 6.  RE: mqweb auto restart after server reboot

    IBM Champion
    Posted Fri December 09, 2022 05:50 PM
    mqConsoleAutostart manages the starting of the mqconsole application in the mqweb server, not the starting of the mqweb.

    Here is a solution which allows the mqweb server to be started with the Windows server.
    The principle is to create a service which starts strmqweb.bat.

    Example:
    sc create MQWeb start= auto error= ignore binpath= D:\MQ_bin\strmqweb.bat obj= LocalSystem displayname= "IBM MQ - MQWeb"
    sc description MQWeb "IBM MQ - MQWeb"

    where "D:\MQ_bin\bin" is the path to strmqweb.bat.

    This is not perfect, because strmqweb is not designed to run in windows service mode, and therefore does not report its status. With an interactive launch, we get the error 1503, and the service appears as stopped.
    However, the mqweb server works correctly.

    There is surely a "cleaner" solution, knowing that mqweb is Liberty based. I didn't have the time to look at it, for the moment this solution works correctly.

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