APMIA - MQActivityQueueReader.run Could not connect to configuration instance ERROR


Article ID: 211775


Updated On:


CA Application Performance Management SaaS


Installed APMIA with root on one server and want to connect the Agent to MQ servers to have QMGR monitoring.

It is a client-server configuration that we are using and have installed APMIA with root.

Now trying to connect to MQ QMGRs with other user name as apmuser,

But, it it is not connecting  .To solve this, I tried to provide the wrapper.conf file and followed the below URL:



Getting "Failing to connect to Queue manager."


Release : SAAS



Here are two options as explained below
1. Create a new user Test on the linux box where MQ is running. Test  is not part of any group
sudo useradd Test
[[email protected] apmia]# groups Test
Test : Test
2. Then copy the apmia to the home directory of Test. (Important)
cd /home/Test
cp -r /root/smith/apmia ./
3. Make sure that the non-root user(Test) owns the apmia directory and files.
chown Test:Test -R apmia/
4. As Test user is not part of mqm, run authentication commands to provide authentication for the queue manager.(Run manually using /opt/mqm/bin/setmqaut or use RunMQCommands.sh script). In this case,  apmuser is already having required authentication. so you can skip this step.
5. Then as root user, install apmia by passing username 
[[email protected] Test]# pwd
[[email protected] Test]# whoami
[[email protected] Test]# cd apmia/
[[email protected] apmia]# ./APMIACtrl.sh install user=Test
APM Infrastructure Agent Installation In Progress...
APM Infrastructure Agent Installation Completed.
[[email protected] apmia]# ./APMIACtrl.sh status
APM Infrastructure Agent (installed with systemd) is running: PID:176949, Wrapper:STARTED, Java:STARTED
With this, able to connect to Queue Manager with Test user and have not passed username from wrapper.conf
2. If wanting to install apmia  from a non-root user, then one way is to add the user to the sudo group and install using sudo command. 
For example, create a new user Test1  and in the Linux group wheel that has ALL privileges. then add the user Test1 to that wheel group
usermod -aG wheel Test1
[[email protected] apmia]# groups Test1
Test1 : Test1 wheel
In this case first login as Test1 user and install apmia with sudo command.
[[email protected] apmia]# su - Test1
Last login: date on pts/0
[[email protected] ~]$ pwd
[[email protected] ~]$ cd apmia/
[[email protected] apmia]$ sudo ./APMIACtrl.sh install user=Test1
[sudo] password for Test1:
APM Infrastructure Agent Installation In Progress...
APM Infrastructure Agent Installation Completed.
In your case, please copy the apmia folder to /home/apmuser and run the commands as root user.

This was shown for Test user.Remove -Duser.name from wrapper.conf and also do not replace any jars.