ibm-messaging/mq-container

mqweb can't start after OOM murder

dariodsa opened this issue · 3 comments

Web console is the a highest consumer of a memory inside of a container so in the case of MQ pod being close to the memory limit, OOM will kill the web console process, and that is ok, it is better web console than actual MQ process. But in that case, we can't recover gui console without having a down time (stop container, start container).

Example

kill -9 $(pgrep java)  # OOM kills the gui process
strmqweb # won't start MQ console

There is a failure loading the MQWebKeyStore keystore. If an SSL configuration references the MQWebKeyStore keystore, then the SSL configuration will fail to initialize.

The reason why is quite simply, runmqserver is creating a wildcard.p12 and it is generating a keystore with some password which is saved in the environment variable of runmqserver. If I start strmqweb from the bash, mqweb can't "reach" the env variables set in the runmqserver (pid 1).
Normally mqweb is being started by the runmqserver (pid 1) and in its ENV variables has password of the keystore, otherwise it will not bind to port because it can't open the keystore.
This is the only way how we managed to manually start web gui without restarting the container, manually set env variables from the runmqserver and then strmqweb.

kill -9 $(pgrep java)
export AMQ_ADDITIONAL_JSON_LOG=1
export AMQ_WEBTRUSTSTOREREF=MQWebTrustStore
export AMQ_WEBKEYSTOREPW=************
export AMQ_DIAGNOSTIC_MSG_SEVERITY=1
export AMQ_WEBKEYSTORE=wildcard.p12
strmqweb # will start MQ console

Maybe removing those from ENV variables and setting it in some file which is readable to the strmqweb?

Looking into it

If I am correct you want to know if the environment variables can be rendered via a file for the strmqweb to pick it up.