ot4i / ace-docker

73 stars 167 forks source link

Failed to make a client connection to queue manager 'MQ DEV' using hostname 'host.docker.internal' on port '1414': MQCC=2; MQRC=2012 #197

Closed Arnold0210 closed 11 months ago

Arnold0210 commented 11 months ago

Hi!,

I'm building an environment with ACE12 and IBM MQ images on Docker, that allow me to a deploy some solutions, and do unit test.

For this purpose I wrote the following docker compose file:

version: '3.9'
services:
  aceserver: 
    image: arnold9810/ace12v9r1:V0
    container_name: serverace
    ports:
      - 7600:7600
      - 7800:7800
      - 7843:7843
    depends_on:
      - mqdev
    networks:
      - ace-mq-net
    environment:
      LICENSE: accept
      ACE_SERVER_NAME: ACESERVER
    restart: always
  mqdev:
    image: icr.io/ibm-messaging/mq:latest
    container_name: MQDEV
    environment:
      LICENSE: accept
      MQ_QMGR_NAME: MQDEV
      MQ_APP_PASSWORD: passw0rd
      MQ_ADMIN_PASSWORD: passw0rd
      MQSNOAUT: 'Yes'
    ports:
      - 1414:1414
      - 9157:9157
      - 9443:9443
    volumes:
      - mqvolume:/mnt/mqm
    networks:
      - ace-mq-net
volumes:
    mqvolume:
networks:
  ace-mq-net:
   driver: bridge

When I raise up the environment, I deploy a MQ Policy on ACE container with the follow configuration:

<policies>
  <policy policyType="MQEndpoint" policyName="MQ_DEV" policyTemplate="MQEndpoint">
    <connection>CLIENT</connection>
    <destinationQueueManagerName>MQDEV</destinationQueueManagerName>
    <queueManagerHostname>host.docker.internal</queueManagerHostname>
    <listenerPortNumber>1414</listenerPortNumber>
    <channelName>DEV.ADMIN.SVRCONN</channelName>
    <securityIdentity>DSN_MQDEV</securityIdentity>
    <useSSL>false</useSSL>
    <SSLPeerName></SSLPeerName>
    <SSLCipherSpec></SSLCipherSpec>
    <SSLCertificateLabel></SSLCertificateLabel>
    <reconnectOption>default</reconnectOption>
    <CCDTUrl></CCDTUrl>
    <MQApplName></MQApplName>
  </policy>
</policies>

After it, I set de DSN Configuration using the following command on the ace container:

. /opt/ibm/ace-12/server/bin/mqsiprofile
mqsisetdbparms -w /home/aceuser/ace-server/ -n mq::DSN_MQDEV -u admin -p passw0rd

And I modified the server.conf.yaml to update the remotequeuemanager configuration (line 25 of server.conf.yaml)

remoteDefaultQueueManager: '{MQ_POLICY}:MQ_DEV' 

and restart de container where ACE is running, but when the container restarted, the logs show the following:

Failed to make a client connection to queue manager 'MQ DEV' using hostname 'host.docker.internal' on port '1414': MQCC=2; MQRC=2012.

I've been looking in the documentation about the MQRC 2012, but is not clearly about what I will be doing wrong.

Someone did that configuration before?

IBMRob commented 11 months ago

Please use the App Connect discussion forum for generic App Connect questions - https://community.ibm.com/community/user/integration/communities/community-home/digestviewer?communitykey=77544459-9fda-40da-ae0b-fc8c76f0ce18

Issues in this repo are specific to the image provided in this repo