Subscribe

Start SnapCreatorAgent 4.1.0 with different Java-Versions

[ Edited ]

Hello,

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 (1.0.15.0 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 (1.0.15.0 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.

Rgards

V. Albrecht

Highlighted

Re: Start SnapCreatorAgent 4.1.0 with different Java-Versions

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)

https://www.java.com/en/download/manual.jsp

Please let me know if this helps.

I am looking into ways to pass the necessary environment variables for the scAgent service.

Thanks,
Siva Ramanathan

Re: Start SnapCreatorAgent 4.1.0 with different Java-Versions

Hi Siva,

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)

Regards

V. Albrecht

Re: Start SnapCreatorAgent 4.1.0 with different Java-Versions

Login as the snapcreator user and please provide us this output.

set

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.

Re: Start SnapCreatorAgent 4.1.0 with different Java-Versions

Hello,

here the output of set:

JAVA_HOME=c:\uc4java\1.6
LOGONSERVER=\\ABGDC01A

OS=Windows_NT
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
Files (x86)\perl\bin;C:\PROGRA~1\COMMON~1\System;C:\openFT\bin;C:\WINDOWS\syste
m32\WindowsPowerShell\v1.0;C:\Program Files\System Center Operations Manager 200
7\;C:\Program Files (x86)\Windows Imaging\;;c:\uc4java\1.6\bin

Regards

V. Albrecht

Re: Start SnapCreatorAgent 4.1.0 with different Java-Versions

Thanks.

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

http://www.mkyong.com/tomcat/tomcat-error-prunsrvc-failed-creating-java-jvmdll/

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?

Note:

There is a old document that wrote from the Snap Creator 3.6 days.

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.

Thanks,
Siva Ramanathan

Re: Start SnapCreatorAgent 4.1.0 with different Java-Versions

Hi Siva,

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.

Thanks

V. Albrecht