prunsrv.exe Service not starting up
Solution 1
The reason for this error was that i did not rename prunsrv.exe
to TestService.exe
. Similarly Prunmgr.exe has to be TestServicew.exe.
Very important that these files are renamed.
Solution 2
one possible issue is using wrong prunsvr.exe
. for 64 bit java install, use amd64/prunsvr.exe
, for 32 bit java install, use /prunsvr.exe
in commons-deamon-xxx-bin-windows.zip file.
Solution 3
This could be many things. First check the logs. The default is at...
%SystemRoot%\System32\LogFiles\Apache
From there you should be able to get a more specific error. E.g. Classpath, Java path, or some other option being invalid.
Solution 4
I was able to run the service on my local machine, but I got the same error on a VM running with Windows 2012R2.
The issue was caused by two reasons:
- reference to jvm.dll
On the VM I used a JDK installation instead of a simple JRE and the JAVA_HOME pointed to the JDK bin folder. I had to change the --Jvm parameter from "auto" to the actual jvm.dll file located in the JRE subfolder.
- amd64 version of prunsrv.exe
Allthough I changed the --Jvm setting, the service still showed the error during startup. I also had to use the amd64 version of prunsrv.exe to resolve the issue.
Solution 5
I had the same issue in my laptop but it was working on others laptop which is having the same configution.
I have checked %SystemRoot%\System32\LogFiles\Apache\commons-daemon.log
. I found the following error missing Image File,
Then I found that we need to put double quotes over all the parameters. On your example, If you try
pushd %CD%
Try this below.
"prunsrv.exe" //IS//%SERVICE_NAME%
--Startup="%PR_STARTUP%"
--Jvm="%PR_JVM%"
--Classpath="%PR_CLASSPATH%"
--StartMode="jvm"
--StopMode="jvm"
--StartClass="%PR_STARTCLASS%"
--StartMethod="%PR_STARTMETHOD%"
--StopClass="%PR_STOPCLASS%"
--StopMethod="%PR_STOPMETHOD%"
SAMPLE EXAMPLE http://www.eclipse.org/jetty/documentation/current/startup-windows-service.html
frewper
Updated on June 29, 2021Comments
-
frewper almost 3 years
I am trying to install and start a service with prunsrv.exe for an application
I am able to install the service alright but the service wont start up and gives me an error
Also following is the configuration that is used to install the service using prunsrv.exe
set SERVICE_NAME=TestService REM Service log configuration set PR_LOGPREFIX=%SERVICE_NAME% set PR_LOGPATH=D:\setups\Commons_Daemon\commons-daemon-1.0.14-bin-windows\logs set PR_STDOUTPUT=auto set PR_STDERROR=auto set PR_LOGLEVEL=INFO REM Path to java installation set PR_JVM=C:\Program Files\Java\jre1.6.0_04\bin\client\jvm.dll set PR_CLASSPATH=D:\setups\Commons_Daemon\commons-daemon-1.0.14-bin-windows\temp.jar; REM Startup configuration set PR_STARTUP=auto set PR_STARTMODE=java set PR_STARTCLASS=Trys.AppLauncher set PR_STARTMETHOD=start REM Shutdown configuration set PR_STOPMODE=java set PR_STOPCLASS=Trys.AppLauncher set PR_STOPMETHOD=stop REM JVM configuration set PR_JVMMS=64 set PR_JVMMX=128 set PR_JVMSS=4000 REM Install service prunsrv.exe //IS//%SERVICE_NAME%
The above config is packaged to a batch file is executed to install the service
Also the log files are not generated, due which i cant even debug.
Please tell me where i am going wrong
-
frewper about 11 yearsi have tried out the changes you have mentioned but the issue remains..Also since the stack size specified is in kb, i used k as a postfix, used 4000k in this case
-
Mark W almost 9 yearsThis was my issue. Installed 32 bit java to match the 32 bit prunsvr, all is well
-
Caffeinated over 8 yearsWhat if I can't see this folder on my machine? does it mean that Daemon was not set-up right?
-
Newerth over 7 yearsThis seems to be very important indeed. I had the same problem and the debug log stated "The user name or password is incorrect." This wasn't true of course. Renaming the exe to correspond with the service name solved my issue.