JON agent will not start if previous instance was not shutdown gracefully and new process is running using its old PID
Issue
- Remnant pid files can cause start scripts to exit prematurely
- The agent startup checks for the presence of a PID file
- The agent startup checks if a process with a PID exists
- The agent will not start
- Start script will not execute if process is already running
Environment
- Red Hat JBoss Operations Network (ON) 3.1
- Red Hat Enterprise Linux (RHEL) 5, 6
- Starting JBoss ON agent as a service -- for example
rhq-agent-wrapper.sh start - Agent process had previously been running
- Agent process is not currently running
- Existing
rhq-agent.pidfile exists in the agent'sbindirectory or in/var/run - Previously running agent crashed or was not shutdown correctly
- An unrelated process, using the same process id as the one stored in the agent's pid file, is running
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.