Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1063370 - Agent fails to start on JDK1.6 with Unrecognized VM option 'StringTableSize=1000003'
Summary: Agent fails to start on JDK1.6 with Unrecognized VM option 'StringTableSize=1...
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Agent, Installer
Version: JON 3.2.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER01
: JON 3.3.0
Assignee: Jirka Kremser
QA Contact: Viet Nguyen
Depends On: 1060066
TreeView+ depends on / blocked
Reported: 2014-02-10 15:07 UTC by Mike Foley
Modified: 2014-08-26 19:03 UTC (History)
6 users (show)

Doc Type: Bug Fix
Doc Text:
Clone Of: 1060066
Last Closed: 2014-08-26 19:03:16 UTC
Type: Bug

Attachments (Terms of Use)

Description Mike Foley 2014-02-10 15:07:20 UTC
+++ This bug was initially created as a clone of Bug #1060066 +++

Description of problem:

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

How reproducible:

Steps to Reproduce:
1. download the agent from server 
2. java -jar rhq-agent.jar --install
3. cd rhq-agent/bin/
4. ./ -L

Actual results:
Unrecognized VM option 'StringTableSize=1000003'
Could not create the Java virtual machine.

Expected results:
No errors

Additional info:
Works correctly on:
[hudson@fbr-test-ag bin]$ java -version
java version "1.7.0_03-icedtea"
OpenJDK Runtime Environment (rhel-2.1.el6.7-i386)
OpenJDK Client VM (build 22.0-b10, mixed mode)

Fails on:
[hudson@fbr-test-ag bin]$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (rhel-
OpenJDK Client VM (build 20.0-b12, mixed mode)

--- Additional comment from Heiko W. Rupp on 2014-01-31 05:45:42 EST ---

Idea of a fix for the Unix world:

snert:/im/rhq/modules/enterprise/agent/target/rhq-agent/bin hrupp$ diff -u,1
---,1	2014-01-31 11:40:06.000000000 +0100
+++	2014-01-31 11:41:48.000000000 +0100
@@ -178,7 +178,11 @@
 # ----------------------------------------------------------------------

 if [ -z "$RHQ_AGENT_JAVA_OPTS" ]; then
-   RHQ_AGENT_JAVA_OPTS="-Xms64m -Xmx128m -Drhq.preferences.file=${RHQ_AGENT_HOME}/conf/ -XX:StringTableSize=1000003"
+   RHQ_AGENT_JAVA_OPTS="-Xms64m -Xmx128m -Drhq.preferences.file=${RHQ_AGENT_HOME}/conf/"
+   JVM_VERSION=`java -version 2>&1 | sed -e '1,1s/^java version "//' -e '2,3d' -e 's/^1.//' -e 's/\..*$//'`
+   if [ $JVM_VERSION == 7 ]; then
+       RHQ_AGENT_JAVA_OPTS="$RHQ_AGENT_JAVA_OPTS -XX:StringTableSize=1000003"
+   fi

Comment 2 Jirka Kremser 2014-02-11 12:53:36 UTC
same root cause as for bz 1063364 (except the fact it is on the agent, here)

Comment 6 Jirka Kremser 2014-07-16 12:41:53 UTC
Moving to POST, because the change is in the master. In fact, this issue never happened in JON (the agent footprint commits hasn't been cherrypicked) so there is no point of having this BZ, but it can serve as a reminder that we should test the agent with different version of Java.

So I am not closing it.

Comment 7 Jay Shaughnessy 2014-08-19 19:57:39 UTC
Moving this to _ON_QA since all work was pre-branch, and as it stands it may not really have any specific QA needed.

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