CDV ❯ SIGAR fails to load if path does not match JAVA_HOME
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
Admin Console
-
-
kkannaiy
-
Reporter: wharley
-
August 28, 2008
-
0
-
Watchers: 0
-
February 12, 2013
-
November 11, 2008
Description
Hyperic SIGAR is the library we use to get metrics like CPU usage, for the admin console. It runs in the server VM.
When I start the server, if my JAVA_HOME environment points somewhere other than to the version of java that is on the system path, I get a SigarException logged, indicating that the dynamic link library has not successfully loaded. This happens even though the dylib is in the proper place and is not missing any dependees according to otool -L.
The problem goes away if JAVA_HOME and the path are in agreement. Of course, that kind of reduces the usefulness of JAVA_HOME.
Problem exists in both 2.6.2 and 2.7.0-stable0. When the problem occurs, some metrics are unavailable - for instance, the admin console will not show CPU usage.
3147 [main] DEBUG Sigar - /Users/wharley/terracotta-2.6.2/lib/libsigar-universal-macosx-1.5.0.1.dylib:
org.hyperic.sigar.SigarException: /Users/wharley/terracotta-2.6.2/lib/libsigar-universal-macosx-1.5.0.1.dylib:
at org.hyperic.sigar.Sigar.loadLibrary(Sigar.java:160)
at org.hyperic.sigar.Sigar.
Comments
Walter Harley 2008-08-28
Steve Harris 2008-09-03
Can we get this into our test scripts
Fiona OShea 2008-09-23
Adding to Known Issues
ilevy 2008-09-30
i’ve documented this in the troubleshooting guide - http://www.terracotta.org/confluence/display/wiki/Troubleshooting+Guide
Kalai Kannaiyan 2008-11-11
Tested with Terracotta trunk-nightly, as of 20081111-111144 (Revision 10784 by cruise@su10mo5 from trunk), when JAVA_HOME and PATH are mixed, unable to view the CPU info on the admin console, but I didn’t see the exception.
Steps: on windows:
-
Navigate to Start Control Panel System -
In the System Properties window, select the Advanced tab Environment Variables and Edit System variables PATH and JAVA_HOME “System Variables - JAVA_HOME=C:\Program Files\Java\jdk1.5.0_16 PATH=C:\Program Files\Java\jdk1.6.0_10”
- Launch the sample application launcher
- Launch the admin console
-
In the Admin console, Select Terracotta cluster Servers(1) Runtime statistics
Actual:
- CPU stats is not displayed
- Error message is displayed
- ERROR: The requested statistic cannot be displayed. For more information, or to troubleshoot this issue, please visit Troubleshooting Terracotta Hyperic Integration.
- “Unable to retrieve server system stats: null” is displayed in the admin console
on linux: export PATH and JAVA_HOME JAVA_HOME=C:\Program Files\Java\jdk1.5.0_16 PATH=C:\Program Files\Java\jdk1.6.0_10”
- And also tested with JAVA_HOME=C:\Program Files\Java\jdk1.6.0_10 PATH=C:\Program Files\Java\jdk1.5.0_16”
Actual:
- CPU stats is not displayed
- Error message is displayed
- ERROR: The requested statistic cannot be displayed. For more information, or to troubleshoot this issue, please visit Troubleshooting Terracotta Hyperic Integration.
By “point somewhere else” I mean, e.g., JAVA_HOME points to a 1.6 JRE and I’ve got 1.5 on the path. I have not tested the case where there are, for instance, two different minor versions of 1.5, or even two identical versions in different directories.
I also have not tested the case where 1.6 is on the path and JAVA_HOME points to 1.5.