CA API Gateway Agent Permissions Issue
search cancel

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:

      [<user>@myServer ~]# uname -a

      Linux myServer 2.6.32-642.6.1.el6.x86_64 #1 SMP Wed <date> <time> x86_64 x86_64 x86_64 GNU/Linux

      [<user>@myServer apmia]# umask

      0022

      [<user>@myServer apmia]# for O in $(find . -user <user>); do ls -al $O; done

      -rw-r--r--. 1 <user> <user>49961 ./core/config/IntroscopeAgent.profile

      -rwxr-xr-x. 1 <user> <user>92396  ./bin/APMIAgent.sh

      -rw-r--r--. 1 <user> <user>26  ./bin/java_heap

      -rw-r--r--. 1 <user> <user>12 ./bin/apmia.user

      -rw-r--r--. 1 <user> <user>3777./conf/wrapper.conf

 

 

APIGateway (bad install):

      [<user>@localhost ~]# 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

      [<user>@localhost apmia]# umask

      0077

      [<user>@localhost apmia]# for O in $(find . -user <user>); do ls -al $O; done

      -rwx------ 1 <user> <user>92386 ./bin/APMIAgent.sh

      -rw------- 1 <user> <user>3777  ./conf/wrapper.conf

      -rw------- 1 <user> <user>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.