Closed ksiv closed 2 years ago
The error is
The TCP/IP listener program could not bind to port number 1414
which implies the you already have something occupying port 1414. If you run docker ps
you will get a list of all active containers.
docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
I removed any other containers, volumes and images. Only one image and one container atm
My platform is Docker Desktop 4.7.0 (77141) is currently the newest version available. In Linux containers mode Windows 10 Pro
Based on you having had a MQ container running, and you still getting
The TCP/IP listener program could not bind to port number 1414
and there are no running containers locking 1414, I think you might have hit a Windows / Hyper-V bug.
Based on similar issues raised on other repos, try running these commands.
netstat -ano
This will show any ports in use.
If 1414 isn't mentioned then try running
netsh interface ipv4 show excludedportrange protocol=tcp
that will show excluded port ranges. I suspect that 1414 might show up there.
netstat -ano there is no 1414 port in there netsh interface ipv4 show excludedportrange protocol=tcp
Protocol tcp Port Exclusion Ranges there is no 1414 port in there
if I reinstall docker container from step https://developer.ibm.com/learningpaths/ibm-mq-badge/create-configure-queue-manager/
and execute compiled test from step
https://developer.ibm.com/learningpaths/ibm-mq-badge/write-run-first-mq-app/
javac -cp .\com.ibm.mq.allclient-9.2.4.0.jar;.\javax.jms-api-2.0.1.jar;.\json-20211205.jar com\ibm\mq\samples\jms\JmsPut.java
it works fine D:\my\ibmmq>java -cp .\com.ibm.mq.allclient-9.2.4.0.jar;.\javax.jms-api-2.0.1.jar;.\json-20211205.jar;. com.ibm.mq.samples.jms.JmsPutGet Sent message:
JMSMessage class: jms_text JMSType: null JMSDeliveryMode: 2 JMSDeliveryDelay: 0 JMSDeliveryTime: 1649696634033 JMSExpiration: 0 JMSPriority: 4 JMSMessageID: ID:414d5120514d31202020202020202020645e5462012a0040 JMSTimestamp: 1649696634033 JMSCorrelationID: null JMSDestination: queue:///DEV.QUEUE.1 JMSReplyTo: null JMSRedelivered: false JMSXAppID: JmsPutGet (JMS) JMSXDeliveryCount: 0 JMSXUserID: app JMS_IBM_PutApplType: 28 JMS_IBM_PutDate: 20220411 JMS_IBM_PutTime: 17035405 Your lucky number today is 15
Received message: Your lucky number today is 15 SUCCESS
D:\my\ibmmq> the port 1414 is present in this case in state listening TCP 0.0.0.0:1414 0.0.0.0:0 LISTENING 10188
UPD: I redone all the routine with following versions Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f) Maven home: D:\SDK\apache-maven-3.6.3\bin.. Java version: 11.0.14.1, vendor: International Business Machines Corporation, runtime: D:\Java\jdk-11.0.14.101-openj9 Default locale: en_US, platform encoding: Cp1252 OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" the java version is set as recommended here: https://developer.ibm.com/learningpaths/ibm-mq-badge/write-run-first-mq-app/
Ok. localized. this project is not Win compatible. Workaround:
Have fun!
Symlinks in java sources? Seriously? What a joke,
One never knows with maven, I thought it's a new feature. Nevertheless, "listener program could not bind to port number 1414."}" - seems a "proper" behavior. I mean it's a bug irrelevant to this ticket as DEV.LISTENER.TCP works fine at least I see it in the console as working and an example from https://developer.ibm.com/learningpaths/ibm-mq-badge/write-run-first-mq-app/ works, I still getting my lucky numbers - this would not work without any listener.
So the take away is make this repo, windows compatible. I'll close this issue, and raise a specific one.
@chughts, It would be nice for dev juniors as the idea of the project to get into MQ JMS development and the variety of desktop systems is still dominated by Windows. Thanks a lot!
Docker is built from MQTicketService by execution of "docker build . -t mqbadge:latest" result is FINISHED 16/16
"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 -ti --name mqebs mqbadge:latest" results in :
p.s. docker run from https://developer.ibm.com/learningpaths/ibm-mq-badge/create-configure-queue-manager/ works fine