MQ connection refused

1/17/2019

i have issues connecting my spring boot app to mq on icp so how can i define the ibm.mq.connName=mymq-ibm-mq(30803) because i always get this execption :

Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2538;AMQ9204: Connection to host ‘10.0.0.1(1414)’ rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2538;AMQ9213: A communications error for ‘TCP’ occurred. [1=java.net.ConnectException[Connection refused (Connection refused)],3=connnectUsingLocalAddress,4=TCP,5=Socket.connect]],3=10.0.0.1(1414),5=RemoteTCPConnection.connnectUsingLocalAddress]

how can i get the correct host and the port ?

this is my application.properties :

ibm.mq.queueManager=QM1
ibm.mq.channel=DEV.ADMIN.SVRCONN
ibm.mq.connName=mymq-ibm-mq(30803)
ibm.mq.user=admin
ibm.mq.password=passw0rd

this is the output of kubectl describe service

Name: mymq-ibm-mq
Namespace: lab
Labels: app=ibm-mq
chart=ibm-mqadvanced-server-dev
heritage=Tiller
release=mymq
Annotations:
Selector: app=ibm-mq,release=mymq
Type: NodePort
IP: 10.1.0.24
Port: console-https 9443/TCP
TargetPort: 9443/TCP
NodePort: console-https 32575/TCP
Endpoints: 10.2.9.53:9443
Port: qmgr 1414/TCP
TargetPort: 1414/TCP
NodePort: qmgr 30803/TCP
Endpoints: 10.2.9.53:1414
Session Affinity: None
External Traffic Policy: Cluster
-- Henda Salhi
ibm-cloud-private
ibm-mq
kubernetes

1 Answer

1/19/2019

I'm pretty sure the MQ Connection port should be 1414 and not 30803. Try this:

ibm.mq.connName=mymq-ibm-mq(1414)
-- Axel Podehl
Source: StackOverflow