mq-container icon indicating copy to clipboard operation
mq-container copied to clipboard

MQ console is not accessed after repeated MQ1 container launching - maybe bug

Open ltorok opened this issue 2 years ago • 13 comments

See this tutorial: https://developer.ibm.com/tutorials/mq-connect-app-queue-manager-containers/

  1. first create and run MQ1 container by tutorial above
  2. go to web https://localhost:9443 and You are redirected to https://localhost:9443/ibmmq/console/login.html (after accept of exception with selfsigned certificate)
  3. Log in and then Logout from MQ console
  4. stop and delete current MQ1 container
  5. run again new QM1 container with original Volume qm1data
  6. web page https://localhost:9443/ibmmq/console/login.html, example through Refresh this web page (MQ console is not accessed more) - http response code is PR_END_OF_FILE_ERROR

Extract from logs of MQ1 container: ... 2023-05-04 16:55:30 2023-05-04T14:55:30.167Z Removing existing ServiceComponent configuration 2023-05-04 16:55:30 2023-05-04T14:55:30.168Z Starting queue manager 2023-05-04 16:55:30 2023-05-04T14:55:30.549Z Started queue manager 2023-05-04 16:55:30 2023-05-04T14:55:30.549Z Metrics are disabled 2023-05-04 16:55:30 2023-05-04T14:55:30.734Z Error 1 starting web server: 2023-05-04 16:55:30 Server mqweb is already running. 2023-05-04 16:55:30 2023-05-04 16:55:30 2023-05-04T14:55:30.734Z Error starting web server: exit status 1 ...

ltorok avatar May 04 '23 15:05 ltorok

Seeing this issue too. I think signals.go needs to call /opt/mqm/bin/endmqweb when shutting everything down. If you open a terminal into the container and do that yourself before stopping the container, the web server comes back next time OK

sichapman avatar Jun 05 '23 10:06 sichapman

see this reported issue: https://github.com/ibm-messaging/mq-container/issues/448

khaki86 avatar Jun 15 '23 18:06 khaki86

@ltorok hi there. Can you retry again by pulling the latest image from icr.io? I tried. I followed the steps you have mentioned in your post and it is running clean. The MQ version on the latest image must read MQ level: p933-L230531 in container console logs.

Please do let me know about what was the observation.

Thanks, Avinash

vgavinash avatar Jun 19 '23 12:06 vgavinash

@ltorok hi there. Can you retry again by pulling the latest image from icr.io? I tried. I followed the steps you have mentioned in your post and it is running clean. The MQ version on the latest image must read MQ level: p933-L230531 in container console logs.

Please do let me know about what was the observation.

Thanks, Avinash

@khaki86 @sichapman could also please give above a try.

vgavinash avatar Jun 20 '23 05:06 vgavinash

Same error

2023-06-20T08:42:03.676Z MQ level: p933-L230531
2023-06-20T08:42:04.475Z Error 1 starting web server:
Server mqweb is already running.

2023-06-20T08:42:04.475Z Error starting web server: exit status 1

sichapman avatar Jun 20 '23 08:06 sichapman

@sichapman thank you for the response.

  1. Do you do a docker stop <image_id> and docker rm <image_id> for removing the running container?
  2. Can you share the steps you follow?
  3. Can you share OS and related details of your environment?
  4. Also would need the complete container console log file of failure
  5. Could you change the Queue Manager name and give it a try, say like MQ_QMGR_NAME=QM5?

Cheers!

vgavinash avatar Jun 20 '23 09:06 vgavinash

@sichapman @khaki86 @ltorok

Hi all, when you retry could you please add the below to the docker run command, --env MQ_LOGGING_CONSOLE_SOURCE="qmgr,web"

This is required to gather extra logs from the liberty server. Requesting you to share the container console logs afterwards.

Thanks in advance, Avinash

Cc: @arthurbarr

vgavinash avatar Jun 22 '23 07:06 vgavinash

@ltorok I am interested to know how you do this, mentioned in your comment.

stop and delete current MQ1 container

What commands do you use? Would it be possible to paste the chain of commands you have run in command prompt to achieve the entire flow you have mentioned in comment 1?

vgavinash avatar Jun 22 '23 07:06 vgavinash

Same issue with latest MQ version: 9.3.3.0 / MQ level: p933-L230531

Always been running a custom MQ_QMGR_NAME

I use docker-compose usually, but equivalent normal docker commands exhibit the same behaviour:

A stop followed by a start triggers the issue. No web server.

A stop followed by rm followed by run (or up with docker-compose), works fine, web server available.

The workaround I use of overriding the ENTRYPOINT to be my own shell script with these contents, allows: the web server to start ok even in the stop then start scenario:

#!/bin/bash

cleanup() {
    /opt/mqm/bin/endmqweb
    exit
}

trap cleanup INT TERM

runmqdevserver

(the above is just a slightly more elegant version of the workaround in https://github.com/ibm-messaging/mq-container/issues/448#issuecomment-1459706593)

So I believe my original suggestion above of signals.go needs to call /opt/mqm/bin/endmqweb when shutting everything down (maybe via a new stopWebServer in webserver.go) is likely to be the solution

(edit: I also use tini to ensure sigterm is actually passed into the workaround script)

sichapman avatar Aug 21 '23 10:08 sichapman

@sichapman thank you for inputs. Please note that it has been found out that this is an existing issue with the WAS Liberty server specifically for WSLs (Windows Subsystems for Linux).

And having said that, we have already raised the concern to the Liberty support team and they have confirmed the same. And they will soon be rolling out their next release inclusive of fix to this. Which, then will be incorporated in IBM MQ and subsequently it will propagate to mq-container as well. This may happen in coming CD releases of IBM MQ. Please watch out.

Until then, instead, you can try out the mq-container in non-WSL actual Linux platforms or any other virtual machines and you will not see the problem.

Hope this information helps.

Thanks, Avinash

Cc: @arthurbarr

vgavinash avatar Aug 30 '23 06:08 vgavinash

@ltorok @sichapman @khaki86 please note that the issue wrt WSL & liberty web server has been fixed in IBM MQ v9.3.5. Please have a go with the latest version and let us know. Thanks!

Cc: @arthurbarr @RamSubbarao

vgavinash avatar Mar 04 '24 05:03 vgavinash

Yes it does seem to be fixed now

sichapman avatar Mar 04 '24 15:03 sichapman

@sichapman great! Thank you for confirming.

vgavinash avatar Mar 06 '24 07:03 vgavinash

@ltorok can you please close this issue since its fixed now?

vgavinash avatar Jul 26 '24 07:07 vgavinash