ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

CA API Gateway Agent Permissions Issue

book

Article ID: 187325

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management

Issue/Introduction

 

 

Here is why the installer APMIA fails on the APIGateway. It is due to the umask value for the root user on the Gateway. When the apmia-ca-installer.sh script runs, it updates entries in the files below and the file permissions change due to the umask. Because permissions deny the non-root user from accessing  the files, the install fails and roll back begins.

 

Good Install on another server:

      [[email protected] ~]# uname -a

      Linux myServer 2.6.32-642.6.1.el6.x86_64 #1 SMP Wed Oct 5 00:36:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

      [[email protected] apmia]# umask

      0022

      [[email protected] apmia]# for O in $(find . -user root); do ls -al $O; done

      -rw-r--r--. 1 root root 49961 ./core/config/IntroscopeAgent.profile

      -rwxr-xr-x. 1 root root 92396  ./bin/APMIAgent.sh

      -rw-r--r--. 1 root root 26  ./bin/java_heap

      -rw-r--r--. 1 root root 12 ./bin/apmia.user

      -rw-r--r--. 1 root root 3777./conf/wrapper.conf

 

 

APIGateway (bad install):

      [[email protected] ~]# uname -a

      Linux localhost.localdomain 2.6.32-754.3.5.el6.centos.plus.x86_64 #1 SMP... x86_64 x86_64 x86_64 GNU/Linux

      [[email protected] apmia]# umask

      0077

      [[email protected] apmia]# for O in $(find . -user root); do ls -al $O; done

      -rwx------ 1 root root 92386 ./bin/APMIAgent.sh

      -rw------- 1 root root 3777  ./conf/wrapper.conf

      -rw------- 1 root root 50438  ./core/config/IntroscopeAgent.profile

 

 

Environment

Release : 11.1.3

Component : APM Agents

Resolution

Workaround:

 

      - Edit ./apmia/apim-pm-gw/saas_configscript.sh:

            + Line 190

              From: sh apmia-ca-installer.sh install

              To:  sh apmia-ca-installer.sh install user=$EPAGENT_USER

              Note: otherwise we are just calling the apmia-ca-installer.sh script and it would install as root. The problem comes in that the files and DB permissions updated by the apmia-ca-installer.sh script were created for the user we passed the script (or apmusr (default)). So monitoring some API components would fail.

            + Line 195

              From: APMIA_PID=$(cat bin/APMIAgent.pid)

              To:  APMIA_PID=$(cat bin/apmia.pid)

      - Edit apmia-ca-installer.sh and add the below as line 1159:

            + Add: eval chown -R $change_user:$change_user $APMIA_HOME

              Note: Workaround for the unmask issue. This change is okay to keep, in the APMIA install scripts for any deployment.