Bug 1066556 - Documentation should instruct user to export environment vars in RHEL init script
Summary: Documentation should instruct user to export environment vars in RHEL init sc...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: RHQ Project
Classification: Other
Component: Documentation
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Deon Ballard
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-18 15:58 UTC by David van Balen
Modified: 2014-03-28 19:29 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-28 19:29:01 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1059235 0 unspecified CLOSED RHQ_JAVA_HOME is not used when set in the rhqctl script 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1061311 0 high CLOSED rhqctl contains user modifiable values that result in an unsupported rhqctl script 2021-02-22 00:41:40 UTC

Internal Links: 1059235 1061311

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


Note You need to log in before you can comment on or make changes to this bug.