virgo servie with Apache Daemon (prunsrv.exe) [message #1227242] |
Fri, 03 January 2014 18:51  |
Eclipse User |
|
|
|
Hi,
Has anyone got virgo service installed with Apache Daemon (prunsrv.exe) on Windows.
I have 3.6.2 virgo on Windows 7
and using prunsrv.exe to install service.
Below is batch file that I run to install service
=================================================
set SERVICE_NAME=virgo36
set SERVER_HOME=c:\virgo-3.6
set JAVA_HOME=C:\java
set PR_DESCRIPTION= Virgo Server
set PR_DISPLAYNAME=Virgo Server
REM Service log configuration
set PR_LOGPREFIX=%SERVICE_NAME%
set PR_LOGPATH=C:\virgo-3.6\log
set PR_STDOUTPUT=auto
set PR_STDERROR=auto
set PR_LOGLEVEL=DEBUG
REM Path to java installation
set PR_JVM=c:\java\bin\server\jvm.dll
SET PR_JVMMS=256
SET PR_JVMMX=512
set PR_CLASSPATH=c:\virgo-3.6\lib\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar;c:\virgo-3.6\lib\org.eclipse.virgo.kernel.equinox.extensions_3.6.2.RELEASE.jar;c:\virgo-3.6\lib\org.eclipse.virgo.nano.authentication_3.6.2.RELEASE.jar;c:\virgo-3.6\lib\org.eclipse.virgo.nano.shutdown_3.6.2.RELEASE.jar;c:\virgo-3.6\lib\org.eclipse.virgo.util.env_3.6.2.RELEASE.jar;c:\virgo-3.6\plugins\org.eclipse.osgi_3.8.1.v20120830-144521.jar;c:\virgo-3.6\plugins\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar
REM Startup configuration
set PR_STARTCLASS=org.eclipse.equinox.launcher.Main
set PR_STARTMODE=jvm
set PR_STARTUP=auto
REM Shutdown configuration
set PR_STOPMODE=jvm
REM JVM configuration
REM Install service
prunsrv.exe //IS//%SERVICE_NAME% --Install=%SERVER_HOME%\bin\prunsrv.exe --StartClass=org.eclipse.equinox.launcher.Main --StartParams=-noExit --JvmOptions=-Xmx512m ++JvmOptions=-Dcom.sun.management.jmxremote.port=9875;-Dcom.sun.management.jmxremote.authenticate=true;-Dcom.sun.management.jmxremote.login.config=virgo-kernel;-Dcom.sun.management.jmxremote.access.file=%SERVER_HOME%\configuration\org.eclipse.virgo.kernel.jmxremote.access.properties;-Djavax.net.ssl.keyStore=%SERVER_HOME%\configuration\keystore;-Djavax.net.ssl.keyStorePassword=changeit;-Dcom.sun.management.jmxremote.ssl=true;-Dcom.sun.management.jmxremote.ssl.need.client.auth=false;-Djava.security.auth.login.config=%SERVER_HOME%\configuration\org.eclipse.virgo.kernel.authentication.config;-Dorg.eclipse.virgo.kernel.authentication.file=%SERVER_HOME%\configuration\org.eclipse.virgo.kernel.users.properties;-Djava.io.tmpdir=%SERVER_HOME%\work\tmp;-Dorg.eclipse.virgo.kernel.home=%SERVER_HOME%;-Dosgi.java.profile=file:%SERVER_HOME%\configuration\java6-server.profile;-Dosgi.java.profile=-Dssh.server.keystore=%SERVER_HOME%\configuration/hostkey.ser;-Dorg.eclipse.virgo.kernel.config=%SERVER_HOME%\configuration;-Dosgi.sharedConfiguration.area=%SERVER_HOME%\configuration;-Declipse.ignoreApp=true;-Dosgi.configuration.area=%SERVER_HOME%\work;-Dosgi.frameworkClassPath="file:///%SERVER_HOME%\lib\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.kernel.equinox.extensions_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.nano.authentication_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.nano.shutdown_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.util.env_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\plugins\org.eclipse.osgi_3.8.1.v20120830-144521.jar,file:///%SERVER_HOME%\plugins\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar" ++JvmOptions=-Djava.endorsed.dirs="%SERVER_HOME%\lib\endorsed" ++JvmOptions=-XX:ErrorFile="%SERVER_HOME%\serviceability\error.log
=========================================================================
And I setup Read/Write permission for file org.eclipse.virgo.kernel.jmxremote.access.properties with icacls
org.eclipse.virgo.kernel.jmxremote.access.properties MY_DOMAIN\MY_USER:(R,W)
I can start virgo from command line by building long command line( open Command Prompt "Run as Administrator") without any problem and even permission warning.
However, when I try to start service that installed as 'LocalSystem' , I'm getting error
java.io.FileNotFoundException: c:\virgo-3.6\configuration\org.eclipse.virgo.kernel.jmxremote.access.properties (Access is denied)
Any idea what permission should be for org.eclipse.virgo.kernel.jmxremote.access.properties , if I run virgo as a service 'LocalSystem'
Thanks
Gary
|
|
|
Re: virgo servie with Apache Daemon (prunsrv.exe) [message #1239654 is a reply to message #1227242] |
Tue, 04 February 2014 12:57  |
Eclipse User |
|
|
|
wanted to give some update to this issue in case someone may decide to use virgo service with prunsrv and can jump in.
I created batch file.
----------------------
set SERVICE_NAME=virgo36
set SERVER_HOME=c:\virgo-3.6
set JAVA_HOME=C:\java
set PR_DESCRIPTION= Virgo Server
set PR_DISPLAYNAME=Virgo Server
REM Service log configuration
set PR_LOGPREFIX=%SERVICE_NAME%
set PR_LOGPATH=C:\virgo-3.6\log
set PR_STDOUTPUT=auto
set PR_STDERROR=auto
set PR_LOGLEVEL=DEBUG
REM Path to java installation
set PR_JVM=c:\java\bin\server\jvm.dll
set PR_CLASSPATH="%SERVER_HOME%\lib\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar;%SERVER_HOME%\lib\org.eclipse.virgo.kernel.equinox.extensions_3.6.2.RELEASE.jar;%SERVER_HOME%\lib\org.eclipse.virgo.nano.authentication_3.6.2.RELEASE.jar;%SERVER_HOME%\lib\org.eclipse.virgo.nano.shutdown_3.6.2.RELEASE.jar;%SERVER_HOME%\lib\org.eclipse.virgo.util.env_3.6.2.RELEASE.jar;%SERVER_HOME%\plugins\org.eclipse.osgi_3.8.1.v20120830-144521.jar;%SERVER_HOME%\plugins\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar;%SERVER_HOME%\lib\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar;%SERVER_HOME%\lib\org.eclipse.virgo.kernel.equinox.extensions_3.6.2.RELEASE.jar;%SERVER_HOME%\lib\org.eclipse.virgo.nano.authentication_3.6.2.RELEASE.jar;%SERVER_HOME%\lib\org.eclipse.virgo.nano.shutdown_3.6.2.RELEASE.jar;%SERVER_HOME%\lib\org.eclipse.virgo.util.env_3.6.2.RELEASE.jar;%SERVER_HOME%\plugins\org.eclipse.osgi_3.8.1.v20120830-144521.jar"
REM Startup configuration
set PR_STARTMODE=jvm
set PR_STARTUP=auto
REM Shutdown configuration
set PR_STOPMODE=jvm
REM JVM configuration
REM Install service
prunsrv.exe //IS//%SERVICE_NAME% --Install "%SERVER_HOME%\bin\prunsrv.exe" --StartClass=org.eclipse.equinox.launcher.Main --StopClass=org.eclipse.virgo.nano.shutdown.ShutdownClient --StartMethod=main --StartParams=-noExit;-clean;-debug --StopParams=-jmxport;9875 --JvmOptions=-Xmx512m ++JvmOptions=-Dcom.sun.management.jmxremote.port=9875 ++JvmOptions=-Dcom.sun.management.jmxremote.authenticate=true ++JvmOptions=-Dcom.sun.management.jmxremote.login.config=virgo-kernel ++JvmOptions=-Dcom.sun.management.jmxremote.access.file="%SERVER_HOME%\configuration\org.eclipse.virgo.kernel.jmxremote.access.properties" ++JvmOptions=-Djavax.net.ssl.keyStore="%SERVER_HOME%\configuration\keystore" ++JvmOptions=-Djavax.net.ssl.keyStorePassword=changeit ++JvmOptions=-Dcom.sun.management.jmxremote.ssl=true ++JvmOptions=-Dcom.sun.management.jmxremote.ssl.need.client.auth=false ++JvmOptions=-Djava.security.auth.login.config="%SERVER_HOME%\configuration\org.eclipse.virgo.kernel.authentication.config" ++JvmOptions=-Dorg.eclipse.virgo.kernel.authentication.file="%SERVER_HOME%\configuration\org.eclipse.virgo.kernel.users.properties" ++JvmOptions=-Djava.io.tmpdir="%SERVER_HOME%\work\tmp" ++JvmOptions=-Dorg.eclipse.virgo.kernel.home="%SERVER_HOME%" ++JvmOptions=-Dosgi.java.profile="file:%SERVER_HOME%\configuration\java6-server.profile" ++JvmOptions=-Dssh.server.keystore="%SERVER_HOME%\configuration\hostkey.ser" ++JvmOptions=-Dorg.eclipse.virgo.kernel.config="%SERVER_HOME%\configuration" ++JvmOptions=-Dosgi.install.area="%SERVER_HOME%" ++JvmOptions=-Dosgi.sharedConfiguration.area="%SERVER_HOME%\configuration" ++JvmOptions=-Declipse.ignoreApp=true ++JvmOptions=-Dosgi.configuration.area="%SERVER_HOME%\work" ++JvmOptions=-Dosgi.frameworkClassPath="file:///%SERVER_HOME%\lib\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.kernel.equinox.extensions_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.nano.authentication_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.nano.shutdown_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\lib\org.eclipse.virgo.util.env_3.6.2.RELEASE.jar,file:///%SERVER_HOME%\plugins\org.eclipse.osgi_3.8.1.v20120830-144521.jar,file:///%SERVER_HOME%\plugins\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar" ++JvmOptions=-Djava.endorsed.dirs="%SERVER_HOME%\lib\endorsed" ++JvmOptions=-XX:ErrorFile="%SERVER_HOME%\serviceability\error.log" ++JvmOptions=-XX:+HeapDumpOnOutOfMemoryError ++JvmOptions=-XX:HeapDumpPath="%SERVER_HOME%\serviceability\heap_dump.hprof" ++Environment=KERNEL_HOME=%SERVER_HOME%;SERVER_HOME=%SERVER_HOME%
At least I get service starting , virgo fails later whit error that can not find
java.io.FileNotFoundException: plugins/org.eclipse.equinox.cm_1.0.400.v20120319-2029.jar (The system cannot find the path specified)
This is a first bundle in org.eclipse.virgo.kernel.userregion.properties . If I put full path to this plugin it goes further.
I'm wondering how plugin directory is resolved. Is it a way to troubleshoot this problem.
Thanks
Gary
|
|
|
Powered by
FUDForum. Page generated in 0.04672 seconds