Red Hat Bugzilla – Bug 817100
Agent PID file cannot be created during startup (RPM installation - EC2)
Last modified: 2013-09-03 11:12:34 EDT
Description of problem:
The agent service cannot create the PID file during startup due to inssuficient file permissions to write to /var/run. The agent is started under a non-root username (created during the installation process).
Steps to Reproduce:
1. Install JON Agent RPM for EC2
2. Try to start the service
The agent gets started but cannot create the PID file and is reporting an error.
The agent gets started and the PID file gets created.
The solution is to create a subfolder under /var/run that has write permissions for the agent user.
triaged 4/30/2012 by loleary, ccrouch, mfoley
The EC2 startup script does not implement recent changes that force the agent to run under a non-root username when started as a service. When the EC2 RPM is installed, the agent service runs with root privileges. For comparison, the non-EC2 version of the RPM uses 'su' to switch to a pre-configured non-privileged account at startup.
This issue will be applicable to the EC2 RPM once the transition is made from root to non-root accounts. The folder to store PID files if the agent is not run with root privileges is /var/run/jboss-on/agent.
As long as the startup script for EC2 RPM starts the agent service with root-privileges this is a non-issue.
Updated ec2 agent init script to match functionality implemented in the regular init script with regards to PID file location, downgrading the executing user, and file ownership. The ec2 specific functionality was not touched or changed.
The pid file for the ec2 installation will be stored in /var/run/jboss-on/agent-ec2 to distinguish from the regular agent installation. This will prevent confusion regarding which service is running at any given time.
Bulk closing of old issues in VERIFIED state.