Happy to see the forum is still going strong after so many years (used it a lot probably more than 10 years ago).
I have upgraded the Statserver to version 8.1.000.38, installed the java extensions and configured the options to point to the new java path. I first used jre 1.7, but looking at the documentation found out that it will only work with version 1.4 or 1.5 (and also saw the same in this thread: http://www.sggu.com/smf/index.php?topic=5167.0) . So I have downloaded jre-1_5_0_14 (for linux) and installed it on the server. When starting up the Statserver I get the error Failed to initialize Java host environment.
Within the documentation it says you can use either libjava.so, libjvm.so, libjvm.a, or libjvm.sl. I configured the libjava.so with the right path but I get the following error:
2013-07-05 15:12:04> Init: java-extension-loading-timeout option is set to 20.
2013-07-05 15:12:04> Init: java-extensions-dir option is set to '/appl/genesys/gcti/McStatSrv_8.1.000.38/java/ext' .
2013-07-05 15:12:04> Init: java-libraries-dir option is set to '/appl/genesys/gcti/McStatSrv_8.1.000.38/java/lib' .
2013-07-05 15:12:04> Init: Initializing ITC socket ...
2013-07-05 15:12:04> Init: ITC socket is initialized on port 21000, socket 8
2013-07-05 15:12:04> Init: Error: could not load JVM shared library from path '/appl/genesys/gcti/jre1.5.0_13/lib/amd64/libjava.so'.
2013-07-05 15:12:04> Init: Error description: libjvm.so: cannot open shared object file: No such file or directory
2013-07-05T15:12:04.749 Std 10012 Failed to initialize Java host environment
2013-07-05 15:12:04> Init: Error: Java host environment initialization failed
Trying libjava.so results in a crash of the statserver with logging not even showing the initialisation of the java environment. I have tried different 1.5 versions, all with the same result.
Now the documentation mentions that jvm-option needs to be configured (which doesn’t seem to be have done previously), but it is unclear to me which values should be specified there.
StatServer has 2 states. On the logs the first appearance will be that it can’t load it. But wait a few seconds and after all stats are loaded then you will see another Java message that it is ok.
Don’t forget to define also JAVA_HOST
Best way is to go on CCPulse and use some Java Stat
The “Java Host Environment is not initialized” message keeps appearing all through the logs, so it seems it doesn’t start working. The server was supplied by another party with java 1.7 pre-installed. As I don’t know if there are any other processes running on the machine which might need that version I thought changing JAVA_HOME might be tricky (unless I need to/can change it somewhere else).
Whats exactly why everyone must read the deployment guide and test you setup in lab environment! Stat Server supports now support only the JDK version 1.4 or 1.5
This is the lab environment, so no issues yet where it really matters. I’m trying to prevent them before it is too late. I installed the jre 1.5 manually, but since I can’t do anything myself to the settings on Linux (pretty much locked down) I had hoped configuring in Statserver would be sufficient. So I guess I’ll have to ask the sysadmin to change settings.
Have now been able to set the JAVA_HOME, PATH and LD_LIBRARY_PATH
JAVA_HOME is now set:
/appl/genesys/gcti/jre1.5.0_14
PATH now includes:
/appl/genesys/gcti/jre1.5.0_14/bin
LD_LIBRARY_PATH now includes
/appl/genesys/gcti/jre1.5.0_14/bin
When I set the JVM path in the options like this:
/appl/genesys/gcti/jre1.5.0_14/lib/amd64/libjava.so
I see the error message that the file can not be opened:
2013-07-10T11:12:04.849 Std 06053 Configuration for application obtained
2013-07-10 11:12:04> Init: java-debug option is set to 'on'.
2013-07-10 11:12:04> Init: java-extension-loading-timeout option is set to 20.
2013-07-10 11:12:04> Init: java-extensions-dir option is set to '/appl/genesys/gcti/McStatSrv_8.1.000.38/java/ext' .
2013-07-10 11:12:04> Init: java-libraries-dir option is set to '/appl/genesys/gcti/McStatSrv_8.1.000.38/java/lib' .
2013-07-10 11:12:04> Init: Initializing ITC socket ...
2013-07-10 11:12:04> Init: ITC socket is initialized on port 21000, socket 8
2013-07-10 11:12:04> Init: Error: could not load JVM shared library from path '/appl/genesys/gcti/jre1.5.0_14/lib/amd64/libjava.so'.
2013-07-10 11:12:04> Init: Error description: libjvm.so: cannot open shared object file: No such file or directory
2013-07-10T11:12:04.849 Std 10012 Failed to initialize Java host environment
2013-07-10 11:12:04> Init: Error: Java host environment initialization failed
After this ‘Java Host Environment is not initialized’ keeps appearing through the logs.
If I configure the option to /appl/genesys/gcti/jre1.5.0_14/lib/amd64/server/libjvm.so the application crashes almost immediately while adding Queues and Agents (and the log shows no reference to anything Java related)
Looking at the statserver deployment guide (the high-level procedure when starting up) I see that Stat Server verifies that the jvm-options section exists (but in the next step it says it is only used if anything is specified), so I’m wondering if I might need to configure something there (but since I see it trying to start the environment I don’t think it is a must to be there).
Just installed it and running this version gives the following:
2013-07-10 12:53:19> Init: ITC socket is initialized on port 21000, socket 8
2013-07-10 12:53:19> Init: Error: could not load JVM shared library from path '/appl/genesys/gcti/jre1.5.0_14/lib/i386/libjava.so'.
2013-07-10 12:53:19> Init: Error description: /appl/genesys/gcti/jre1.5.0_14/lib/i386/libjava.so: wrong ELF class: ELFCLASS32
2013-07-10T12:53:19.496 Std 10012 Failed to initialize Java host environment
2013-07-10 12:53:19> Init: Error: Java host environment initialization failed
The same thing happens when I configured the libjvm.so
2013-07-10 12:58:15> Init: java-extension-loading-timeout option is set to 20.
2013-07-10 12:58:15> Init: java-extensions-dir option is set to '/appl/genesys/gcti/McStatSrv_8.1.000.38/java/ext' .
2013-07-10 12:58:15> Init: java-libraries-dir option is set to '/appl/genesys/gcti/McStatSrv_8.1.000.38/java/lib' .
2013-07-10 12:58:15> Init: Initializing ITC socket ...
2013-07-10 12:58:15> Init: ITC socket is initialized on port 21000, socket 8
2013-07-10 12:58:15> Init: Error: could not load JVM shared library from path '/appl/genesys/gcti/jre1.5.0_14/lib/i386/server/libjvm.so'.
2013-07-10 12:58:15> Init: Error description: /appl/genesys/gcti/jre1.5.0_14/lib/i386/server/libjvm.so: wrong ELF class: ELFCLASS32
2013-07-10T12:58:15.364 Std 10012 Failed to initialize Java host environment
2013-07-10 12:58:15> Init: Error: Java host environment initialization failed
Looking at the statserver directory we are running the 64 bit version (version 8.1.00.38), within the statserver directory there is a symlink which points statserv to statserv_64
UPDATE In order to test if it would work with the 32 bit version of java I have forced it to start up with statserv_32 and then the jvm initiates succesfully. Looking at the release notes of version 8.1.00.39 it states as new functionality “Support for the Red Hat Enterprise Linux 6 64-bit native”, which is strange to me.
I forgot that 64bit native StatServer application is available now. In that case you need 64bit JRE.
I did quick test on my lab platform (CentOS 5.9, Stat Server 8.1.000.37 - 64bit image) and it works properly with JRE 1.5_22 64bit. The ‘jvm-path’ option is set to ‘/usr/java/jre1.5.0_22_x64/lib/amd64/server/libjvm.so’
Installed that same version, JRE 1.5_22 64 bit, and changed the ‘jvm-path’ to the same libjvm.so as you’ve used, but when starting the application it crashes (my statserver version is 8.1.00.38) before I even see it trying to start up the JVM. We’re running Redhat Linux.