• 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.(Sigar.java:90) at com.tc.statistics.retrieval.actions.SRACpuCombined.(SRACpuCombined.java:27) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at com.tc.management.beans.TCServerInfo.(TCServerInfo.java:76) at com.tc.server.TCServerImpl.startDSOServer(TCServerImpl.java:356) at com.tc.server.TCServerImpl.access$500(TCServerImpl.java:68) at com.tc.server.TCServerImpl$StartAction.execute(TCServerImpl.java:325) at com.tc.lang.StartupHelper.startUp(StartupHelper.java:39) at com.tc.server.TCServerImpl.startServer(TCServerImpl.java:351) at com.tc.server.TCServerImpl.start(TCServerImpl.java:164) at com.tc.server.TCServerMain.main(TCServerMain.java:28)

Comments

Walter Harley 2008-08-28

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.

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 [email protected] 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:

  1. Navigate to Start Control Panel System
  2. In the System Properties window, select the Advanced tab Environment Variables and Edit System variables PATH and JAVA_HOME “System Variables
  3. JAVA_HOME=C:\Program Files\Java\jdk1.5.0_16 PATH=C:\Program Files\Java\jdk1.6.0_10”
  4. Launch the sample application launcher
  5. Launch the admin console
  6. 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”

  1. 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.