commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Stone (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DAEMON-311) Commons Daemon procrun failed with exit value: 5 (Failed to start service)
Date Wed, 20 Aug 2014 09:59:26 GMT

    [ https://issues.apache.org/jira/browse/DAEMON-311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14103699#comment-14103699
] 

Paul Stone commented on DAEMON-311:
-----------------------------------

I've just encountered the same problem and come up with a work around:

The root of the problem is that Apache Commons Daemon looks for the java runtime using the
Registry, but looks for an Oracle specific registry setting. If you only have the IBM JDK
installed (no oracle), the the service fails to start java. I managed to get around the issue
by copying part of the IBM JDK Registry subtree into the same place that Oracle puts it and
the service now starts.

You will get the same problem on any machine where ONLY IBM Java is installed (no Sun / Oracle
JDKs).

Detail and fix:
Oracle puts details of the Installed JDKs into the Registry under HKEY_LOCAL_MACHINE\Software\JavaSoft\Java
Runtime Environment
IBM puts details of the Installed JDKs into the Registry under HKEY_LOCAL_MACHINE\SOFTWARE\IBM\Java2
Runtime Environment

I used Regedit to export the registry keys under "HKEY_LOCAL_MACHINE\SOFTWARE\IBM\Java2 Runtime
Environment" to a text file. I then replaced “HKEY_LOCAL_MACHINE\SOFTWARE\IBM\Java2 Runtime
Environment” with “HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment” in
the file and re-imported this to the registry.

A better fix would be for the Daemon to check the IBM Java specific registry keys when starting
the java service.

> Commons Daemon procrun failed with exit value: 5 (Failed to start service)
> --------------------------------------------------------------------------
>
>                 Key: DAEMON-311
>                 URL: https://issues.apache.org/jira/browse/DAEMON-311
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.15
>         Environment: OS : Windows 7 (64bit)
> Jre : 7 (32bit) and 7(64bit) installed, the 32bit one is used by default.
> Hardware specifications : 
>         - Processor :  Intel Core i7
>         - RAM : 8 GB
>            Reporter: Vincent Tonus
>
> I use the Amd64 version of procrun to run a .jar as a service, it works on several machines
with the same configuration but on one of them, It's impossible to start the service.
> When the service is installed (with this command) :
> {quote}xx.exe //IS//xx --Install=xx.exe" --Description="xx" --Jvm=auto --Classpath=xx.jar
--Startup=auto --StartMode=jvm --StartClass=Controller.ServiceMain --StartMethod=main --StartParams=start
--StopMode=jvm --StopClass=Controller.ServiceMain --StopMethod=main --StopParams=stop --LogPath="./Logs"
--StdOutput=auto --StdError=auto --StopTimeout=120 --LogLevel=debug{quote}
> it generates this log :
> {quote}
> [2013-11-28 13:10:06] [debug] ( prunsrv.c:1679) [ 9444] Commons Daemon procrun log initialized
> [2013-11-28 13:10:06] [info]  ( prunsrv.c:1683) [ 9444] Commons Daemon procrun (1.0.15.0
64-bit) started
> [2013-11-28 13:10:06] [debug] ( prunsrv.c:561 ) [ 9444] Installing service...
> [2013-11-28 13:10:06] [info]  ( prunsrv.c:600 ) [ 9444] Service xx name 
> [2013-11-28 13:10:07] [debug] ( prunsrv.c:616 ) [ 9444] Setting service description xx
> [2013-11-28 13:10:07] [info]  ( prunsrv.c:634 ) [ 9444] Service 'xx' installed
> [2013-11-28 13:10:07] [info]  ( prunsrv.c:1764) [ 9444] Commons Daemon procrun finished
> [2013-11-28 13:10:07] [debug] ( prunsrv.c:1679) [ 9724] Commons Daemon procrun log initialized
> [2013-11-28 13:10:07] [info]  ( prunsrv.c:1683) [ 9724] Commons Daemon procrun (1.0.15.0
64-bit) started
> [2013-11-28 13:10:07] [info]  ( prunsrv.c:725 ) [ 9724] Starting service 'xx' ...
> [2013-11-28 13:10:10] [error] ( prunsrv.c:746 ) [ 9724] Failed to start 'xx' service
> [2013-11-28 13:10:10] [error] ( prunsrv.c:746 ) [ 9724] The data area passed to a system
call is too small.
> [2013-11-28 13:10:10] [info]  ( prunsrv.c:754 ) [ 9724] Start service finished.
> [2013-11-28 13:10:10] [error] ( prunsrv.c:1755) [ 9724] Commons Daemon procrun failed
with exit value: 5 (Failed to start service)
> [2013-11-28 13:10:10] [error] ( prunsrv.c:1755) [ 9724] The data area passed to a system
call is too small.
> {quote}
> And if I try to start the service again after the installation, no log is generated anymore.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message