Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ltorok opened this issue May 4, 2023 · 13 comments

Comments

@ltorok
Copy link

ltorok commented May 4, 2023

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
...

@sichapman
Copy link

sichapman commented Jun 5, 2023

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

@khaki86
Copy link

khaki86 commented Jun 15, 2023

see this reported issue: #448

@vgavinash
Copy link

vgavinash commented Jun 19, 2023

@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
Copy link

@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.

@sichapman
Copy link

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

@vgavinash
Copy link

vgavinash commented Jun 20, 2023

@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
Copy link

vgavinash commented Jun 22, 2023

@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
Copy link

@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?

@sichapman
Copy link

sichapman commented Aug 21, 2023

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 #448 (comment))

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)

@vgavinash
Copy link

@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

JEFFLUFC pushed a commit that referenced this issue Dec 13, 2023
* Remove ioutil dependency

* Add IBM copyright to amicontained
@vgavinash
Copy link

@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

@sichapman
Copy link

Yes it does seem to be fixed now

@vgavinash
Copy link

@sichapman great! Thank you for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants