Glad to hear it worked, and I think the error you saw on Windows is down to different newlines: the Unix/Linux standard is to just use LF (ctrl-J, or ^J) while Windows expects CRLF (^M^J).
In your case, it looks like the Windows git clone has pulled the files down with Windows CRLF line endings which then confuses the Docker build: the Docker build is trying to run a Linux shell and so it complains about seeing ^M at the end of the line, calling the resulting /bin/bash^M
a "bad interpreter" because the CR character is throwing it off.
It doesn't sound like you need to run your docker build on Windows (you already have a working solution), but in case you or others hit this again, the solution is to clone the repo without newline conversion. This is described in various places including https://stackoverflow.com/questions/2517190/how-do-i-force-git-to-use-lf-instead-of-crlf-under-windows and comes down to running git config --global core.autocrlf false
before cloning the repo. This isn't always a good idea because it might break other things (it's a global config setting) but would allow the ace-docker repo to be built on Windows. I can't test it locally end-to-end because my Windows system is set to use Windows containers not Linux ones, but git is definitely extracting files correctly with that setting.
-- Trevor D.
Original Message:
Sent: Sat November 11, 2023 12:41 AM
From: Arnold Julian Herrera Quiñones
Subject: MQRC 2012 Error in the attempt to connect App Connect Enterprise to MQ Manager on Docker
Hi, Trevor,
I want to thank you for your piece of advice, it was extremely helpful, and it worked.
I built the image following your instructions. However, in order to build the image from the Dockerfile, I had to run the file on a Linux system because it did not work when I tried to run it on a Windows System.
When I tried on the Windows system, it throw the following error:

Thanks for your help.
Best Regards!!
------------------------------
Arnold Julian Herrera Quiñones
Original Message:
Sent: Mon November 06, 2023 05:22 PM
From: Trevor Dolby
Subject: MQRC 2012 Error in the attempt to connect App Connect Enterprise to MQ Manager on Docker
Hello,
Yes, I think the issue is that installing MQ is a little more complicated than running an ADD command, so that's likely to be the cause of the problem. You have a partial install, and MQ is therefore returning MQRC_ENVIRONMENT_ERROR
.
The Dockerfile at ace-docker/samples/mqclient/Dockerfile at main · ot4i/ace-docker (github.com) would be a better place to start, and you can build that with 12.0.9 or 12.0.10 easily enough. That Dockerfile goes through an actual install of the MQ client and I've tried it with 12.0.10 recently (and have a PR open to update ot4i) so it should give you what you need.
Once you have a working image with an actual MQ client installed properly then you could add the policy (which looks fine to me) and the server should work as expected.
-- Trevor D.
------------------------------
Trevor Dolby
IBM Expert Labs
Original Message:
Sent: Mon November 06, 2023 12:49 PM
From: Arnold Julian Herrera Quiñones
Subject: MQRC 2012 Error in the attempt to connect App Connect Enterprise to MQ Manager on Docker
Hi Trevor,
To build arnold9810/ace12v9r1 imagen, first I build a container from te following image
icr.io/ibm-messaging/mq:latest
From the container I downloaded the /opt/mqm/ folder on my computer and generate the following docker file, taking into account the images provided here:
Building a sample or supported IBM App Connect Enterprise image using Docker - IBM Documentation
FROM cp.icr.io/cp/appc/ace:12.0.9.0-r1@sha256:0e03de28d175e15238896b1ae00b54ddda6a46b793173f9a7707187d6b58202eUSER rootADD mqm /opt/mqm/
And the dockerfile generates the image arnold9810/ace12v9r1 that I used to connect ACE and MQ using MQ Policy with this policy:
<?xml version="1.0" encoding="UTF-8"?><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>
And I do the following steps once I have the containers running:
- I deployed the policy on the ACE container.
- I run the followings commands on the ACE container using docker exec -it aceserver sh
- . /opt/ibm/ace-12/server/bin/mqsiprofile to enable de ACE commands
- mqsisetdbparms -w /home/aceuser/ace-server/ -n mq::DSN_MQDEV -u admin -p passw0rd to set the Security Identity (DSN) in the Integration Server.
- I set the policy in the server.conf.yaml in the ACE container replacing:
remoteDefaultQueueManager: '{MQ_POLICY}:MQ_DEV'
- I restart the ace container and when it starts throw the following error:
IBM App Connect Enterprise internal error: diagnostic information 'Fatal Error; exception thrown before initialisation completed', 'MQ default CCSID', '1', '1', '43', '42'. 2023-11-06 11:36:30 2023-11-06 16:36:30.898450: BIP2203E: An integration server has encountered a problem whilst starting. 2023-11-06 11:36:30 2023-11-06 16:36:30.898500: BIP2677E: Failed to make a client connection to queue manager 'MQDEV' using hostname 'host.docker.internal' on port '1414': MQCC=2; MQRC=2012. 2023-11-06 11:36:31 2023-11-06 16:36:31.852944: BIP1992I: Integration server 'ACESERVER' stopped.
I have tried to use versions before to 12.0.9.0 r1 but none of them have the /opt/mqm folder when I upload the container and when I do not copy that folder I get the following error:
BIP2684E: A component was configured to use IBM MQ, but the required MQ libraries are not available.
Can you help me with this situation?
I am trying to only connect the ACE with the MQ when they are in different containers, with ACE in a version higher than 12.0.7.0 using docker, until about 3 months ago this process worked for me, but I don't know what happened, it even took the step step by step in a notepad so that this doesn't happen to me.
------------------------------
Arnold Julian Herrera Quiñones
Original Message:
Sent: Tue October 31, 2023 02:08 PM
From: Trevor Dolby
Subject: MQRC 2012 Error in the attempt to connect App Connect Enterprise to MQ Manager on Docker
Hello,
It sounds like something hasn't quite worked in the MQ installation during the arnold9810/ace12v9r1 container build. Can you try using something like the ot4i example referenced above and see what happens? If it still doesn't work, then if you could post the Dockerfile then that might also help.
-- Trevor D.
------------------------------
Trevor Dolby
IBM Expert Labs
Original Message:
Sent: Sat October 28, 2023 02:17 PM
From: Arnold Julian Herrera Quiñones
Subject: MQRC 2012 Error in the attempt to connect App Connect Enterprise to MQ Manager on Docker
Hi Trevor!
Thanks for your answer.
The image arnold9810/ace12v9r1 is an image that I built because the original does not have any MQ files that allow implementing MQ solutions, I obtained these from the MQ image and loaded them into a clean ACE container and built the image so I wouldn't have to do it every time build a new image.
The files that not have the ACE12V9 and later are located under opt/mqm/
------------------------------
Arnold Julian Herrera Quiñones
Original Message:
Sent: Mon October 23, 2023 10:21 AM
From: Trevor Dolby
Subject: MQRC 2012 Error in the attempt to connect App Connect Enterprise to MQ Manager on Docker
Hello Arnold,
MQRC 2012 is MQRC_ENVIRONMENT_ERROR
and normally indicates something wrong in the local system. Lots of customers are running with ACE and MQ in containers, so at a high level it definitely can be made to work.
You seem to be using an image called arnold9810/ace12v9r1:V0
and it's not clear how that image is built - is it based on known-good examples such as https://github.com/ot4i/ace-docker/tree/main/samples/mqclient or is it something else?
-- Trevor D.
------------------------------
Trevor Dolby
IBM Expert Labs
Original Message:
Sent: Sat October 21, 2023 11:45 AM
From: Arnold Julian Herrera Quiñones
Subject: MQRC 2012 Error in the attempt to connect App Connect Enterprise to MQ Manager on Docker
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-netvolumes: 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:
<?xml version="1.0" encoding="UTF-8"?><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/mqsiprofilemqsisetdbparms -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?
------------------------------
Arnold Julian Herrera Quiñones
------------------------------