Bug 1066556

Summary: Documentation should instruct user to export environment vars in RHEL init script
Product: [Other] RHQ Project Reporter: David van Balen <dvanbale>
Component: DocumentationAssignee: Deon Ballard <dlackey>
Status: CLOSED NOTABUG QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: hrupp, loleary
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-03-28 19:29:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David van Balen 2014-02-18 15:58:31 UTC
Description of problem:

Section 2.11.2 of JON 3.2.0 Installation Guide documentation on CSP instructs user to set environment variables in /etc/init.d script as follows:

RHQ_SERVER_HOME=serverRoot/jon-server-3.2.0.GA
RHQ_JAVA_HOME=/usr/

However, when set in this fashion, the variables aren't inherited by the rhq-server.sh script when it's run via start command->apache commons exec->rhq-server.sh resulting in the error "There is no JVM available" from the rhq-server.sh script.

In order for this script to inherit the environment variables when run as a service, they must be exported:

export RHQ_SERVER_HOME=serverRoot/jon-server-3.2.0.GA
export RHQ_JAVA_HOME=/usr/


Version-Release number of selected component (if applicable):

JON 3.2.0.GA (Didn't see in version list above).
RHEL 6


How reproducible:

Seems to happen every time when configured as an init script, following instructions in Installation Guide (https://access.redhat.com/site/documentation/en-US/Red_Hat_JBoss_Operations_Network/3.2/html-single/Installation_Guide/index.html#starting-as-service-on-rhel)


Steps to Reproduce:
1. Install JON server following instructions from Installation Guide
2. Configure to run as service, following steps in 2.11.2
3. Run using 'service rhqctl start'

In this case, one of my requirements is that the server run as the root user, but I think I was also able to reproduce when running as another user as per Installation Guide suggestion.

Actual results:

RHQ_JAVA_HOME environment variable isn't inherited by rhq-server.sh script.


Expected results:

rhq-server.sh needs to inherit this variable, as per instructions in Inatallation Guide.

Additional info:

Comment 1 Larry O'Leary 2014-03-28 19:29:01 UTC
Not a valid documentation bug as the user should not be modifying the rhqctl script at all as it is part of the product distribution and user edits are not supported[1]. This issue has also been captured in the downstream product bug tracker[2] and as it is product specific, I am marking as not a bug.


https://bugzilla.redhat.com/show_bug.cgi?id=1061311
https://bugzilla.redhat.com/show_bug.cgi?id=1059235