Closed MohanKopalle closed 1 month ago
I am able to create and test the connectivity separately following this guide: https://developer.ibm.com/learningpaths/ibm-mq-badge/write-run-first-mq-app but not with the https://developer.ibm.com/tutorials/mq-badge-mq-dev-challenge/
Looks like you are using the image - ibm-mqadvanced-server-dev:9.4.0.0-r1.20240607053012.53e6ab1-amd64
IE. You are not on an Apple M1 / M2 ARM64 machine. Is this correct?
What was the command you issued to build the image? What was the command you used to start it? Reason for asking is that I would expect you have used.
docker build . -t mqbadge:latest
In which case the image would be called mqbadge:latest
That's correct I have used above command and got the mqbadge:latest image built via docker running on Microsoft WSL2 (reference of 'Linux kernel version: 5.15.153.1-microsoft-standard-WSL2' from above logs I shared earlier).
Later, I ran this command to start the container:
docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e LOG_FORMAT=json -e MQ_APP_PASSWORD=passw0rd -p 1414:1414 -p 9443:9443 --detach -ti --name mqebs mqbadge:latest
@shreeya1510 could you take a look and see if you can reproduce this error on a AMD64 Windows machine. It looks as though the queue manager is failing to start. You might need to clear our all existing images, to make sure that a base of ibm-mqadvanced-server-dev:9.4.0.0-r1
is being pulled using icr.io/ibm-messaging/mq:latest
@MohanKopalle Please provide more architecture and OS details for the windows machine that you are trying to build and run the images on.
@shreeya1510 could you take a look and see if you can reproduce this error on a AMD64 Windows machine. It looks as though the queue manager is failing to start. You might need to clear our all existing images, to make sure that a base of
ibm-mqadvanced-server-dev:9.4.0.0-r1
is being pulled usingicr.io/ibm-messaging/mq:latest
@MohanKopalle Please provide more architecture and OS details for the windows machine that you are trying to build and run the images on.
OS Name: Microsoft Windows 11 Pro
OS Version: 10.0.22621 N/A Build 22621
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Total Physical Memory: 16,249 MB
Docker Desktop information
Client:
Cloud integration: v1.0.35+desktop.13
Version: 26.1.1
API version: 1.45
Go version: go1.21.9
Git commit: 4cf5afa
Built: Tue Apr 30 11:48:43 2024
OS/Arch: windows/amd64
Context: default
Server: Docker Desktop 4.30.0 (149282)
Engine:
Version: 26.1.1
API version: 1.45 (minimum version 1.24)
Go version: go1.21.9
Git commit: ac2de55
Built: Tue Apr 30 11:48:28 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.31
GitCommit: e377cd56a71523140ca6ae87e30244719194a521
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
@MohanKopalle what command did you run after docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e LOG_FORMAT=json -e MQ_APP_PASSWORD=passw0rd -p 1414:1414 -p 9443:9443 --detach -ti --name mqebs mqbadge:latest
?
@MohanKopalle what command did you run after
docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e LOG_FORMAT=json -e MQ_APP_PASSWORD=passw0rd -p 1414:1414 -p 9443:9443 --detach -ti --name mqebs mqbadge:latest
?
Hello @shreeya1510 , before I ran the docker build command only, I have commented out the ticket generator specific line from startApp.sh and then executed the docker run command. I just waited for the container to come up clean. Was just monitoring the logs during the MQ container launch before issuing the Java command to run the Ticket generator locally.
But the MQ container never came up clean as it kept stopping almost all the times around 20seconds of launch attempt.
Only on one such attempt randomly it sustained for more than 36seconds and then I ran the
java -cp target/TicketGenerator-1.4.jar: com.ibm.mq.badge.Manager
It generated 6events as expected from the app and then MQ container got terminated.
Hi, can you try this instead java -cp target/TicketGenerator-1.4.jar com.ibm.mq.badge.Manager
So, after you run this command to start your container docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e LOG_FORMAT=json -e MQ_APP_PASSWORD=passw0rd -p 1414:1414 -p 9443:9443 --detach -ti --name mqebs mqbadge:latest
, try waiting for a bit then run the command above
@MohanKopalle have you got the latest version of the Dockerfile and StartApp.sh file? You can check this by making sure you have this line in the Dockerfile:
RUN if [ "$platformArch" == "amd64" ]; then \ sed -i 's/\r$//' /data/startApp.sh; \ fi
Thankyou for the input @shreeya1510 , I tried the below again:
- cd ~/MQTicketService/TicketGenerator
- mvn clean package
- cd ..
- docker build . -t mqbadge:latest
- docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e LOG_FORMAT=json -e MQ_APP_PASSWORD=passw0rd -p 1414:1414 -p 9443:9443 --detach -ti --name mqebs mqbadge:latest
Then Waited for couple of seconds and got the below logs.
2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.670Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"CPU architecture: amd64","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.690Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Linux kernel version: 5.15.153.1-microsoft-standard-WSL2","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.699Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Base image: Red Hat Enterprise Linux 9.4 (Plow)","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.700Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Running as user ID 1001 with primary group 0, and supplementary groups 0","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.700Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Capabilities (bounding set): chown,dac_override,fowner,fsetid,kill,setgid,setuid,setpcap,net_bind_service,net_raw,sys_chroot,mknod,audit_write,setfcap","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.700Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"seccomp enforcing mode: filtering","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.700Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Process security attributes: none","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.700Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"No volume detected. Persistent messages may be lost","type":"mq_containerlog"} 2024-08-13 19:15:13 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:13.700Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Environment variable LOG_FORMAT is deprecated. Use MQ_LOGGING_CONSOLE_FORMAT instead.","type":"mq_containerlog"} 2024-08-13 19:15:23 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:23.569Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Environment variable MQ_APP_PASSWORD is deprecated, use secrets to set the passwords","type":"mq_containerlog"} 2024-08-13 19:15:24 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:24.721Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Using queue manager name: QM1","type":"mq_containerlog"} 2024-08-13 19:15:28 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:28.804Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Created directory structure under /var/mqm","type":"mq_containerlog"} 2024-08-13 19:15:28 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:28.804Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Image created: 2024-07-18T15:30:43+00:00","type":"mq_containerlog"} 2024-08-13 19:15:28 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:28.804Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Image tag: ibm-mqadvanced-server-dev:9.4.0.0-r3.20240718152536.ff62130-amd64","type":"mq_containerlog"} 2024-08-13 19:15:28 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:28.840Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"MQ version: 9.4.0.0","type":"mq_containerlog"} 2024-08-13 19:15:28 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:28.840Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"MQ level: p940-L240605.1","type":"mq_containerlog"} 2024-08-13 19:15:28 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:28.840Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"MQ license: Developer","type":"mq_containerlog"} 2024-08-13 19:15:35 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:35.584Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"FIPS cryptography is not enabled.","type":"mq_containerlog"} 2024-08-13 19:15:35 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:35.584Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Creating queue manager QM1","type":"mq_containerlog"} 2024-08-13 19:15:35 {"host":"ff5fce0d01b6","ibm_datetime":"2024-08-13T13:45:35.584Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Starting web server","type":"mq_containerlog"} 2024-08-13 19:15:39 {"type":"liberty_message","host":"ff5fce0d01b6","ibm_userDir":"\/mnt\/mqm\/data\/web\/installations\/Installation1\/","ibm_serverName":"mqweb","message":"product = WebSphere Application Server 24.0.0.3 (wlp-1.0.87.cl240320240311-1901)\nwlp.install.dir = \/opt\/mqm\/web\/\nserver.config.dir = \/mnt\/mqm\/data\/web\/installations\/Installation1\/servers\/mqweb\/\njava.home = \/opt\/mqm\/java\/jre64\/jre\njava.version = 1.8.0_411\njava.runtime = Java(TM) SE Runtime Environment (8.0.8.25 - pxa6480sr8fp25-20240328_01(SR8 FP25))\nos = Linux (5.15.153.1-microsoft-standard-WSL2; amd64) (en_US)\nprocess = 1047@172.17.0.2\nClasspath = \/opt\/mqm\/web\/bin\/tools\/ws-server.jar:\/opt\/mqm\/web\/bin\/tools\/ws-javaagent.jar\nJava Library path = \/opt\/mqm\/java\/jre64\/jre\/lib\/amd64\/compressedrefs:\/opt\/mqm\/java\/jre64\/jre\/lib\/amd64:\/opt\/mqm\/java\/lib64:\/opt\/mqm\/lib64:\/opt\/mqm\/lib:\/usr\/lib64:\/usr\/lib\n","ibm_datetime":"2024-08-13T13:45:38.874+0000","ibm_sequence":"1723556738917_0000000000001"} 2024-08-13 19:15:39 {"type":"liberty_message","host":"ff5fce0d01b6","ibm_userDir":"\/mnt\/mqm\/data\/web\/installations\/Installation1\/","ibm_serverName":"mqweb","message":"CWWKE0001I: The server mqweb has been launched.","ibm_threadId":"00000001","ibm_datetime":"2024-08-13T13:45:39.271+0000","ibm_messageId":"CWWKE0001I","module":"com.ibm.ws.kernel.launch.internal.FrameworkManager","loglevel":"AUDIT","ibm_sequence":"1723556739271_0000000000001","ext_thread":"main"} 2024-08-13 19:15:50 [2024-08-13 13:45:49]-[Main ]: Logger initialised 2024-08-13 19:15:50 [2024-08-13 13:45:50]-[Main ]: ----- 2024-08-13 19:15:50 [2024-08-13 13:45:50]-[Main ]: Creating Events 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Venue created at location 'Royal Albert Hall' at time '19:30' at date '2019-03-12' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Bookable event created with eventID '0' with name of 'European Summit' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Event Created: European Summit ID=0 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Venue created at location '99 Columbia road' at time '21:30' at date '2020-09-19' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Bookable event created with eventID '1' with name of 'Glasto' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Event Created: Glasto ID=1 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Venue created at location 'Hursley' at time '08:00' at date '2020-09-11' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Bookable event created with eventID '2' with name of 'IBM Think' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Event Created: IBM Think ID=2 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Venue created at location 'KOKO' at time '14:30' at date '2020-07-01' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Bookable event created with eventID '3' with name of 'Beta Workshop' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Event Created: Beta Workshop ID=3 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Venue created at location 'Trent Country Park' at time '10:00' at date '2020-07-27' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Bookable event created with eventID '4' with name of 'Share' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Event Created: Share ID=4 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Venue created at location 'The O2' at time '09:00' at date '2020-02-07' 2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Bookable event created with eventID '5' with name of 'MQTC'
$${\color{green}2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Event Created: MQTC ID=5 }$$\ $${\color{green}2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: New total of 6 events }$$\ $${\color{green}2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: ----- }$$\ $${\color{green}2024-08-13 19:15:51 [2024-08-13 13:45:51]-[Main ]: Creating connection factory }$$\ $${\color{green}2024-08-13 19:15:55 [2024-08-13 13:45:55]-[Main ]: Connection factory has been created }$$\ $${\color{green}2024-08-13 19:15:55 [2024-08-13 13:45:55]-[Main ]: Setting connection factory properties }$$\ $${\color{green}2024-08-13 19:15:55 [2024-08-13 13:45:55]-[Main ]: Connection factory properties have been set }$$\ $${\color{green}2024-08-13 19:15:55 [2024-08-13 13:45:55]-[Main ]: Creating connection session }$$\ $${\color{yellow}2024-08-13 19:15:56 [2024-08-13 13:45:56]-[Main ]: Couldn't create connection session}$$\ $${\color{yellow}2024-08-13 19:15:56 com.ibm.msg.client.jms.DetailedIllegalStateException.getUnchecked(DetailedIllegalStateException.java:274)}$$\ $${\color{yellow}2024-08-13 19:15:56 com.ibm.msg.client.jms.internal.JmsErrorUtils.convertJMSException(JmsErrorUtils.java:173)}$$\ $${\color{yellow}2024-08-13 19:15:56 com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createContext(JmsConnectionFactoryImpl.java:577)}$$\ $${\color{yellow}2024-08-13 19:15:56 com.ibm.mq.badge.EnvSetter.connect(EnvSetter.java:120)}$$\ $${\color{yellow}2024-08-13 19:15:56 com.ibm.mq.badge.AdvertManager.connect(AdvertManager.java:83)}$$\ $${\color{yellow}2024-08-13 19:15:56 com.ibm.mq.badge.Manager.main(Manager.java:63)}$$\
I haven't run this command yet: java -cp target/TicketGenerator-1.4.jar com.ibm.mq.badge.Manager
I can't see any errors identifying errors starting up MQ. I think the ticket generator is starting before MQ is ready. How many CPU cores are being allocated to the WSL ?
Could you increase the sleep in startApp.sh.
OOB its
sleep 30
try
sleep 90
I noticed that you - mvn clean package
the ticket generator outside of the image. Don't do that. Remove the ./target
directory that gets generated. So it doesn't get copied into the image.
All of this is being done inside the docker image, and doesn't need to be done on the windows host.
Apologies @chughts, did a clean attempt again.
History of commands executed on my WSL2:
Still the logs are coming up as below
2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.908Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"CPU architecture: amd64","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.928Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Linux kernel version: 5.15.153.1-microsoft-standard-WSL2","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.929Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Base image: Red Hat Enterprise Linux 9.4 (Plow)","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.929Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Running as user ID 1001 with primary group 0, and supplementary groups 0","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.929Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Capabilities (bounding set): chown,dac_override,fowner,fsetid,kill,setgid,setuid,setpcap,net_bind_service,net_raw,sys_chroot,mknod,audit_write,setfcap","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.929Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"seccomp enforcing mode: filtering","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.929Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Process security attributes: none","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.930Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"No volume detected. Persistent messages may be lost","type":"mq_containerlog"} 2024-08-13 20:57:48 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:48.930Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Environment variable LOG_FORMAT is deprecated. Use MQ_LOGGING_CONSOLE_FORMAT instead.","type":"mq_containerlog"} 2024-08-13 20:57:57 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:57.856Z","ibm_processId":"7","ibm_processName":"runmqdevserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Environment variable MQ_APP_PASSWORD is deprecated, use secrets to set the passwords","type":"mq_containerlog"} 2024-08-13 20:57:58 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:27:58.701Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Using queue manager name: QM1","type":"mq_containerlog"} 2024-08-13 20:58:02 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:02.139Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Created directory structure under /var/mqm","type":"mq_containerlog"} 2024-08-13 20:58:02 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:02.139Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Image created: 2024-07-18T15:30:43+00:00","type":"mq_containerlog"} 2024-08-13 20:58:02 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:02.139Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Image tag: ibm-mqadvanced-server-dev:9.4.0.0-r3.20240718152536.ff62130-amd64","type":"mq_containerlog"} 2024-08-13 20:58:02 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:02.172Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"MQ version: 9.4.0.0","type":"mq_containerlog"} 2024-08-13 20:58:02 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:02.173Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"MQ level: p940-L240605.1","type":"mq_containerlog"} 2024-08-13 20:58:02 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:02.173Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"MQ license: Developer","type":"mq_containerlog"} 2024-08-13 20:58:07 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:07.525Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"FIPS cryptography is not enabled.","type":"mq_containerlog"} 2024-08-13 20:58:07 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:07.525Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Creating queue manager QM1","type":"mq_containerlog"} 2024-08-13 20:58:07 {"host":"eb5d0b408b12","ibm_datetime":"2024-08-13T15:28:07.525Z","ibm_processId":"7","ibm_processName":"runmqserver","ibm_serverName":"QM1","ibm_userName":"","loglevel":"INFO","message":"Starting web server","type":"mq_containerlog"} 2024-08-13 20:58:12 {"type":"liberty_message","host":"eb5d0b408b12","ibm_userDir":"\/mnt\/mqm\/data\/web\/installations\/Installation1\/","ibm_serverName":"mqweb","message":"product = WebSphere Application Server 24.0.0.3 (wlp-1.0.87.cl240320240311-1901)\nwlp.install.dir = \/opt\/mqm\/web\/\nserver.config.dir = \/mnt\/mqm\/data\/web\/installations\/Installation1\/servers\/mqweb\/\njava.home = \/opt\/mqm\/java\/jre64\/jre\njava.version = 1.8.0_411\njava.runtime = Java(TM) SE Runtime Environment (8.0.8.25 - pxa6480sr8fp25-20240328_01(SR8 FP25))\nos = Linux (5.15.153.1-microsoft-standard-WSL2; amd64) (en_US)\nprocess = 1047@172.17.0.2\nClasspath = \/opt\/mqm\/web\/bin\/tools\/ws-server.jar:\/opt\/mqm\/web\/bin\/tools\/ws-javaagent.jar\nJava Library path = \/opt\/mqm\/java\/jre64\/jre\/lib\/amd64\/compressedrefs:\/opt\/mqm\/java\/jre64\/jre\/lib\/amd64:\/opt\/mqm\/java\/lib64:\/opt\/mqm\/lib64:\/opt\/mqm\/lib:\/usr\/lib64:\/usr\/lib\n","ibm_datetime":"2024-08-13T15:28:11.422+0000","ibm_sequence":"1723562891474_0000000000001"} 2024-08-13 20:58:12 {"type":"liberty_message","host":"eb5d0b408b12","ibm_userDir":"\/mnt\/mqm\/data\/web\/installations\/Installation1\/","ibm_serverName":"mqweb","message":"CWWKE0001I: The server mqweb has been launched.","ibm_threadId":"00000001","ibm_datetime":"2024-08-13T15:28:11.876+0000","ibm_messageId":"CWWKE0001I","module":"com.ibm.ws.kernel.launch.internal.FrameworkManager","loglevel":"AUDIT","ibm_sequence":"1723562891876_0000000000001","ext_thread":"main"} 2024-08-13 20:58:27 [2024-08-13 15:28:26]-[Main ]: Logger initialised 2024-08-13 20:58:27 [2024-08-13 15:28:27]-[Main ]: ----- 2024-08-13 20:58:27 [2024-08-13 15:28:27]-[Main ]: Creating Events 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Venue created at location 'Royal Albert Hall' at time '19:30' at date '2019-03-12' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Bookable event created with eventID '0' with name of 'European Summit' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Event Created: European Summit ID=0 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Venue created at location '99 Columbia road' at time '21:30' at date '2020-09-19' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Bookable event created with eventID '1' with name of 'Glasto' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Event Created: Glasto ID=1 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Venue created at location 'Hursley' at time '08:00' at date '2020-09-11' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Bookable event created with eventID '2' with name of 'IBM Think' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Event Created: IBM Think ID=2 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Venue created at location 'KOKO' at time '14:30' at date '2020-07-01' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Bookable event created with eventID '3' with name of 'Beta Workshop' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Event Created: Beta Workshop ID=3 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Venue created at location 'Trent Country Park' at time '10:00' at date '2020-07-27' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Bookable event created with eventID '4' with name of 'Share' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Event Created: Share ID=4 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Venue created at location 'The O2' at time '09:00' at date '2020-02-07' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Bookable event created with eventID '5' with name of 'MQTC' 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Event Created: MQTC ID=5 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: New total of 6 events 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: ----- 2024-08-13 20:58:28 [2024-08-13 15:28:28]-[Main ]: Creating connection factory 2024-08-13 20:58:34 [2024-08-13 15:28:34]-[Main ]: Connection factory has been created 2024-08-13 20:58:34 [2024-08-13 15:28:34]-[Main ]: Setting connection factory properties 2024-08-13 20:58:34 [2024-08-13 15:28:34]-[Main ]: Connection factory properties have been set 2024-08-13 20:58:34 [2024-08-13 15:28:34]-[Main ]: Creating connection session $${\color{yellow}2024-08-13 20:58:37 [2024-08-13 15:28:37]-[Main ]: Couldn't create connection session}$$\ $${\color{yellow}2024-08-13 20:58:37 com.ibm.msg.client.jms.DetailedIllegalStateException.getUnchecked(DetailedIllegalStateException.java:274)}$$\ $${\color{yellow}2024-08-13 20:58:37 com.ibm.msg.client.jms.internal.JmsErrorUtils.convertJMSException(JmsErrorUtils.java:173)}$$\ $${\color{yellow}2024-08-13 20:58:37 com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createContext(JmsConnectionFactoryImpl.java:577)}$$\ $${\color{yellow}2024-08-13 20:58:37 com.ibm.mq.badge.EnvSetter.connect(EnvSetter.java:120)}$$\ $${\color{yellow}2024-08-13 20:58:37 com.ibm.mq.badge.AdvertManager.connect(AdvertManager.java:83)}$$\ $${\color{yellow}2024-08-13 20:58:37 com.ibm.mq.badge.Manager.main(Manager.java:63) }$$\
Also, I tried the steps by excluding mvn clean package
step before building the docker image as the same is being done inside the container as per Dockerfile. Still the same errors seen.
@chughts / @shreeya1510
Apologies for the chase with comments but I wanted to let you know trying the recommendation of "sleep 90" in startApp.sh has given me some new information this time, seems to be a problem with MQSC command that stops the active listener and then tries to define the QM objects along with new listener on the same port 1414 where the listener 'SYSTEM.LISTENER.TCP.1' was active earlier.
2024-08-14 11:19:16 [2024-08-14 05:49:16]-[Main ]: Venue created at location 'The O2' at time '09:00' at date '2020-02-07' 2024-08-14 11:19:16 [2024-08-14 05:49:16]-[Main ]: Bookable event created with eventID '5' with name of 'MQTC' 2024-08-14 11:19:16 [2024-08-14 05:49:16]-[Main ]: Event Created: MQTC ID=5 2024-08-14 11:19:16 [2024-08-14 05:49:16]-[Main ]: New total of 6 events 2024-08-14 11:19:16 [2024-08-14 05:49:16]-[Main ]: ----- 2024-08-14 11:19:16 [2024-08-14 05:49:16]-[Main ]: Creating connection factory 2024-08-14 11:19:22 {"ibm_messageId":"AMQ8940E","ibm_arithInsert1":1,"ibm_arithInsert2":3234,"ibm_commentInsert1":"STOP LISTENER('SYSTEM.LISTENER.TCP.1')","ibm_commentInsert2":"AMQ8731W: Listener not active.","ibm_datetime":"2024-08-14T05:49:22.249Z","ibm_serverName":"QM1","type":"mq_log","host":"6659d0aa30a7","loglevel":"ERROR","module":"amquopra.c:2447","ibm_sequence":"1723614562_249991042","ibm_qmgrId":"QM1_2024-08-14_05.48.09","ibm_processId":"1354","ibm_threadId":"28","ibm_version":"9.4.0.0","ibm_processName":"amqzmuc0","ibm_userName":"mqm","ibm_installationName":"Installation1","ibm_installationDir":"/opt/mqm","message":"AMQ8940E: An automatic MQSC command was not successful."}} 2024-08-14 11:19:23 [2024-08-14 05:49:23]-[Main ]: Connection factory has been created 2024-08-14 11:19:23 [2024-08-14 05:49:23]-[Main ]: Setting connection factory properties 2024-08-14 11:19:23 [2024-08-14 05:49:23]-[Main ]: Connection factory properties have been set 2024-08-14 11:19:23 [2024-08-14 05:49:23]-[Main ]: Creating connection session 2024-08-14 11:19:28 [2024-08-14 05:49:28]-[Main ]: Couldn't create connection session 2024-08-14 11:19:28 com.ibm.msg.client.jms.DetailedIllegalStateException.getUnchecked(DetailedIllegalStateException.java:274) 2024-08-14 11:19:28 com.ibm.msg.client.jms.internal.JmsErrorUtils.convertJMSException(JmsErrorUtils.java:173) 2024-08-14 11:19:28 com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createContext(JmsConnectionFactoryImpl.java:577) 2024-08-14 11:19:28 com.ibm.mq.badge.EnvSetter.connect(EnvSetter.java:120) 2024-08-14 11:19:28 com.ibm.mq.badge.AdvertManager.connect(AdvertManager.java:83) 2024-08-14 11:19:28 com.ibm.mq.badge.Manager.main(Manager.java:63)
2024-08-14 11:19:22 {"ibm_messageId":"AMQ8940E","ibm_arithInsert1":1,"ibm_arithInsert2":3234,"ibm_commentInsert1":"STOP LISTENER('SYSTEM.LISTENER.TCP.1')","ibm_commentInsert2":"AMQ8731W: Listener not active.","ibm_datetime":"2024-08-14T05:49:22.249Z","ibm_serverName":"QM1","type":"mq_log","host":"6659d0aa30a7","loglevel":"ERROR","module":"amquopra.c:2447","ibm_sequence":"1723614562_249991042","ibm_qmgrId":"QM1_2024-08-14_05.48.09","ibm_processId":"1354","ibm_threadId":"28","ibm_version":"9.4.0.0","ibm_processName":"amqzmuc0","ibm_userName":"mqm","ibm_installationName":"Installation1","ibm_installationDir":"/opt/mqm","message":"AMQ8940E: An automatic MQSC command was not successful."}}
One of the for windows change was to convert from windows line endings to linux line endings for the .sh file. I am wondering if the same is needed for 20-config.mqsc
.
@MohanKopalle Could you please remove all images and rebuild to make sure the recent changes to the docker file are active.
@shreeya1510 Are you able to reproduce this on your windows machine?
@MohanKopalle could you try starting your container again with this command instead docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e LOG_FORMAT=json -e MQ_APP_PASSWORD=passw0rd -p 1414:1414 -p 9443:9443 --name mqebs mqbadge:latest
and check if the adverts show up in the logs.
@chughts - thankyou for the suggestion on below, I have performed the same using dos2unix utility against this file and then ran the container. I worked like charm.
One of the for windows change was to convert from windows line endings to linux line endings for the .sh file. I am wondering if the same is needed for 20-config.mqsc.
This yielded me the expected behavior
[2024-08-14 17:04:43]-[Cashier]: JMS session connection initialised successfully
[2024-08-14 17:04:43]-[Cashier]: Connection for cashier has been created
[2024-08-14 17:04:43]-[Cashier]: Starting to listen for ticket requests
{"loglevel":"INFO", "ibm_datetime":"2024-08-14T17:04:43.523Z", "ibm_processId":"1307", "host":"c3ee7cb91c07", "module":"src/simpleauth.c:97", "message":"Environment variable MQ_APP_PASSWORD is deprecated, use secrets to set the passwords"}
{"loglevel":"INFO", "ibm_datetime":"2024-08-14T17:04:43.532Z", "ibm_processId":"1307", "host":"c3ee7cb91c07", "module":"src/simpleauth.c:97", "message":"Environment variable MQ_APP_PASSWORD is deprecated, use secrets to set the passwords"}
[2024-08-14 17:04:44]-[Main ]: -----
[2024-08-14 17:04:44]-[Main ]: Publishing advert...
[2024-08-14 17:04:44]-[Main ]: Advert for 'European Summit' has been published
[2024-08-14 17:04:44]-[Main ]: Waiting for 30 seconds before publishing next advert
[2024-08-14 17:04:44]-[Main ]: -----
[2024-08-14 17:05:14]-[Main ]: -----
[2024-08-14 17:05:14]-[Main ]: Publishing advert...
[2024-08-14 17:05:14]-[Main ]: Advert for 'Glasto' has been published
[2024-08-14 17:05:14]-[Main ]: Waiting for 30 seconds before publishing next advert
[2024-08-14 17:05:14]-[Main ]: -----
[2024-08-14 17:05:44]-[Main ]: -----
[2024-08-14 17:05:44]-[Main ]: Publishing advert...
[2024-08-14 17:05:44]-[Main ]: Advert for 'IBM Think' has been published
[2024-08-14 17:05:44]-[Main ]: Waiting for 30 seconds before publishing next advert
[2024-08-14 17:05:44]-[Main ]: -----
[2024-08-14 17:06:14]-[Main ]: -----
[2024-08-14 17:06:14]-[Main ]: Publishing advert...
[2024-08-14 17:06:14]-[Main ]: Advert for 'Beta Workshop' has been published
[2024-08-14 17:06:14]-[Main ]: Waiting for 30 seconds before publishing next advert
[2024-08-14 17:06:14]-[Main ]: -----
[2024-08-14 17:06:44]-[Main ]: -----
[2024-08-14 17:06:44]-[Main ]: Publishing advert...
[2024-08-14 17:06:44]-[Main ]: Advert for 'Share' has been published
[2024-08-14 17:06:44]-[Main ]: Waiting for 30 seconds before publishing next advert
[2024-08-14 17:06:44]-[Main ]: -----
[2024-08-14 17:07:14]-[Main ]: -----
[2024-08-14 17:07:14]-[Main ]: Publishing advert...
[2024-08-14 17:07:14]-[Main ]: Advert for 'MQTC' has been published
[2024-08-14 17:07:14]-[Main ]: Waiting for 30 seconds before publishing next advert
[2024-08-14 17:07:14]-[Main ]: -----
[2024-08-14 17:07:44]-[Main ]: Closing connections and stopping threads
[2024-08-14 17:07:44]-[Main ]: Close flag set for cashier to signal for the connections to close
[2024-08-14 17:07:53]-[Cashier]: Stopped listening to responses
[2024-08-14 17:07:53]-[Main ]: Connections for cashier have closed
[2024-08-14 17:07:53]-[Main ]: Attempting to close all open connections for EnvSetter
[2024-08-14 17:07:53]-[Main ]: Closed all connections
@shreeya1510 - I don't see any specific difference in the docker run command you've provided vs what I've been running.
Thankyou very much for the guidance @chughts and @shreeya1510 -
This issue can be marked as closed. Will raise new one if any issues arise