2014-02-27 04:27 AM - edited 2015-12-18 12:25 AM
I´ve a problem to start the agent on a windows 2003 server with different java-versions. The application on the server needs a java 1.5, snapcreator a java 1.6. The snapcreator agent is configured to start under a seperate user. In the envirument of this user the variable JAVA_HOME is set to the used java version 1.6, the globle enviroment variable is set to the JAVA_HOME with java 1.5. If I try to start the agent as a service, this service would start an return an return code 1. In the log file is this entry:
[2014-02-27 13:14:53] [info] [ 4736] Commons Daemon procrun (22.214.171.124 64-bit) started
[2014-02-27 13:14:53] [info] [ 4736] Service SnapCreatorAgentService name
[2014-02-27 13:14:53] [info] [ 4736] Service 'SnapCreatorAgentService' installed
[2014-02-27 13:14:53] [info] [ 4736] Commons Daemon procrun finished
[2014-02-27 13:14:53] [info] [ 6300] Commons Daemon procrun (126.96.36.199 64-bit) started
[2014-02-27 13:14:53] [info] [ 6300] Running 'SnapCreatorAgentService' Service...
[2014-02-27 13:14:53] [info] [ 4276] Starting service...
[2014-02-27 13:14:53] [error] [ 4276] Failed creating java
[2014-02-27 13:14:53] [error] [ 4276] ServiceStart returned 1
[2014-02-27 13:14:53] [info] [ 6300] Run service finished.
[2014-02-27 13:14:53] [info] [ 6300] Commons Daemon procrun finished
When I start the agent from CLI with the BAT-file, it starts and works.
2014-02-27 06:30 AM
Dear V. Albrecht,
Could you please provide the details below?
1) Is your Operating System 64 bit?
2) java -version
The procrun error you have reported is commonly seen when a bit mismatch occurs.
Have you matched a 32-bit java with a 32-bit OS and a 64-bit Java with a 64-bit OS?
By default, when you go to Java website to download java on Windows, it downloads 32 bit Java software.
You will have to choose 64-bit Java specifically if you run a 64-bit OS. (from this link below)
Please let me know if this helps.
I am looking into ways to pass the necessary environment variables for the scAgent service.
2014-02-27 06:38 AM
here the answer of your questions:
1) Yes, its a Windows Server 2003 SP2 x64
2) C:\>java -version
java version "1.6.0_45"
Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
2014-02-27 06:49 AM
Login as the snapcreator user and please provide us this output.
We would like to know the environment variables that the user has.
more than the JAVA_HOME it is the PATH that matters here.
If the PATH of your snapcreator user has Java 6, then you will be fine.
Like in my case, C:\Program Files\Java\jdk1.7.0_21\bin is in the PATH.
2014-02-27 06:55 AM
here the output of set:
Path=C:\win64app\nsr\bin;C:\Program Files\Support Tools\;C:\Program Files (x86)\
Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
Wbem;C:\mksnt;C:\Program Files (x86)\SPBinstaller;C:\WINDOWS\sysWOW64;C:\Program
m32\WindowsPowerShell\v1.0;C:\Program Files\System Center Operations Manager 200
7\;C:\Program Files (x86)\Windows Imaging\;;c:\uc4java\1.6\bin
2014-02-27 07:09 AM
1) From the same CMD window that you ran the above commands, please type "whoami" and get met the output.
2) A common error seems to be a missing dll
Solution from the above link: Copy msvcr71.dll from java’s bin directory to windows\system32 folder.
Is this a file that is missing in your environment?
Please check if you can make use of it to create a service https://communities.netapp.com/servlet/JiveServlet/previewBody/8741-102-1-15091/Snap%20Creator%20-%20Creating%20Windows%20Services.pdf
I am working with the developers to know more on this error.
2014-02-28 02:09 AM
I´ve checked this, but I don´t find this file in the JAVA_HOME/bin-folder. So we now start the agent as an scheduled job from the batch file and this works.