Description of problem:
Start installation using rhqctl install --start
Console error during agent installation
INFO [org.rhq.server.control.command.Install] Configuring the RHQ agent with default configuration file: /opt/jboss/jon/rhq-agent/conf/agent-configuration.xml
ERROR [org.rhq.server.control.command.Install] An error occurred while configuring the agent: Couldn't get file lock.
ERROR [org.rhq.server.control.RHQControl] Couldn't get file lock.
Full agent console log snippet
===== RHQ AGENT INSTALL =====
Installing Agent To: /opt/jboss/jon
Build Number: 734bd56
Jar File: /opt/jboss/jon/jon-server-3.2.0.GA/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-downloads/rhq-agent/rhq-enterprise-agent-4.9.0.JON320GA.jar
[install] [echo] Extract the agent distro zip from the agent update binary
[install] [unjar] Expanding: /opt/jboss/jon/jon-server-3.2.0.GA/modules/org/rhq/server-startup/main/deployments/rhq.ear/rhq-downloads/rhq-agent/rhq-enterprise-agent-4.9.0.JON320GA.jar into /opt/jboss/jon/jon-server-3.2.0.GA
[install] [echo] Unzip the agent distro into the new installation directory
[install] [unzip] Expanding: /opt/jboss/jon/jon-server-3.2.0.GA/rhq-enterprise-agent-4.9.0.JON320GA.zip into /opt/jboss/jon
[install] [echo] chmod +x on executables under /opt/jboss/jon/rhq-agent
[install] [echo] Remove the agent distro zip
[install] [delete] Deleting: /opt/jboss/jon/jon-server-3.2.0.GA/rhq-enterprise-agent-4.9.0.JON320GA.zip
[install] [echo] DONE! Agent version 4.9.0.JON320GA (build number=734bd56) has been installed to /opt/jboss/jon
10:47:23,003 INFO [org.rhq.server.control.command.Install] The agent installer finished running with exit value 0
10:47:23,004 INFO [org.rhq.server.control.command.Install] Configuring the RHQ agent with default configuration file: /opt/jboss/jon/rhq-agent/conf/agent-configuration.xml
10:47:24,579 ERROR [org.rhq.server.control.command.Install] An error occurred while configuring the agent: Couldn't get file lock.
10:47:24,581 ERROR [org.rhq.server.control.RHQControl] Couldn't get file lock.
10:47:24,582 WARN [org.rhq.server.control.command.Install] UNDO: Removing agent install directory
10:47:24,599 WARN [org.rhq.server.control.command.Install] UNDO: Removing server-installed marker file and management user
10:47:24,600 WARN [org.rhq.server.control.command.Install] UNDO: Stopping component: --server
Trying to stop the RHQ Server...
RHQ Server (pid=11557) is stopping..
Version-Release number of selected component (if applicable):
***Steps to Reproduce:***
1) Create directory in /opt
2) Add group called jboss
3) Add user jbossadmin without home directory and assign user to group jboss
useradd -r -s /bin/false -g jboss jonadmin
4) Grant group jboss rwx /opt/jboss and su jonadmin
5) Unzip JON 3.2.0 to /opt directory
rhqctl install --start
Agent install fails
If agent install fails the log entry should contain sufficient information to allow the user to fix the problem.
Workaround is to set RHQ_CONTROL_ADDITIONAL_JAVA_OPTS="-Djava.util.prefs.userRoot=/some-path/ but this is not obvious from the console error message
Author: Libor Zoubek <firstname.lastname@example.org>
Date: Mon Jun 30 17:58:15 2014 +0200
[BZ 1074610] JON 3.2.0 install fails if the install user account has no home
Log error message with possible hint when we fail to write agent
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993
Verified on JON 3.3 DR01 build.
Agent install fails with below message:
19:16:02,812 ERROR [org.rhq.server.control.command.Install] Failed to store agent preferences, for Linux systems we require writable user.home [/home/jonadmin]. You can also set different location for agent preferences by setting "-Djava.util.prefs.userRoot=/some/path/" java system property. You may need to put this property to RHQ_CONTROL_ADDIDIONAL_JAVA_OPTS and RHQ_AGENT_ADDIDIONAL_JAVA_OPTS env variables.