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

Konstantin Kolinko commented on DAEMON-190:
-------------------------------------------

I cannot confirm that this fixes this issue.
On a WinXP SP3 machine I used registry editor to set up those dependencies on 
Afd and Tcpip services, by creating the DependOnService registry value, as 
mentioned in [1] using Apache HTTPD service configuration as an example (it 
depends on the same two services).

Looking at the service properties in the Control Panel I am able to verify that 
those two services are now listed as dependencies for Tomcat 6.
Regardless of that, the problem still persists. Tomcat fails to start at boot 
time.

BTW, 
- the Control Panel displays the service as running, 
- prunmgr can a) display the service as running or b) do not display it as 
running (a): green tray icon and "Stop" button is enabled in the configuration 
dialog, b): red icon, no buttons are enabled in the dialog;  In both cases 
"Stop service" is enabled in the menu on the tray icon).
There are no traces of Tomcat starting in the tomcat logs and "netstat -a" does 
not show Tomcat as listening on any ports.
The commons-daemon log messages are the same as earlier.

[1] http://msdn.microsoft.com/en-us/library/ms682450%28VS.85%29.aspx

commons-daemon log:

[2010-12-22 00:38:48] [debug] ( prunsrv.c:1493) Commons Daemon procrun log 
initialized
[2010-12-22 00:38:48] [info]  (          :0   ) Commons Daemon procrun (1.0.4.0 
32-bit) started
[2010-12-22 00:38:49] [info]  (          :0   ) Running 'Tomcat6' Service...
[2010-12-22 00:38:49] [debug] ( prunsrv.c:1241) Inside ServiceMain...
[2010-12-22 00:38:49] [info]  (          :0   ) Starting service...
[2010-12-22 00:38:49] [debug] ( javajni.c:191 ) loading jvm 'C:\Program 
Files\Java\jre6\bin\client\jvm.dll'
[2010-12-22 00:38:50] [debug] ( javajni.c:643 ) Jvm Option[0] 
-Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0
[2010-12-22 00:38:50] [debug] ( javajni.c:643 ) Jvm Option[1] 
-Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0
[2010-12-22 00:38:50] [debug] ( javajni.c:643 ) Jvm Option[2] 
-Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 
6.0\endorsed
[2010-12-22 00:38:51] [debug] ( javajni.c:643 ) Jvm Option[3] 
-Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp
[2010-12-22 00:38:52] [debug] ( javajni.c:643 ) Jvm Option[4] 
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
[2010-12-22 00:38:52] [debug] ( javajni.c:643 ) Jvm Option[5] 
-Djava.util.logging.config.file=C:\Program Files\Apache Software 
Foundation\Tomcat 6.0\conf\logging.properties
[2010-12-22 00:38:52] [debug] ( javajni.c:643 ) Jvm Option[6] 
-Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat 
6.0\bin\bootstrap.jar
[2010-12-22 00:38:51] [debug] ( prunsrv.c:1054) Java started 
org/apache/catalina/startup/Bootstrap
[2010-12-22 00:38:54] [info]  (          :0   ) Service started in 4326 ms.
[2010-12-22 00:38:56] [debug] ( prunsrv.c:1364) Waiting for worker to finish...
[2010-12-22 00:38:56] [debug] ( prunsrv.c:1369) Worker finished.
[2010-12-22 00:38:57] [debug] ( prunsrv.c:1392) Waiting for all threads to exit
[2010-12-22 00:38:56] [debug] ( javajni.c:827 ) argv[0] = start
[2010-12-22 00:38:57] [debug] ( javajni.c:889 ) Java Worker thread finished 
org/apache/catalina/startup/Bootstrap:main with status=3

Note, that, as I mentioned above, the last line can be
 ( javajni.c:889 ) Java Worker thread finished 
org/apache/catalina/startup/Bootstrap:main with status=3
or can be
 ( javajni.c:874 ) Java Worker thread started 
org/apache/catalina/startup/Bootstrap:main
Regardless of that, there is "Worker finished." line and the startup is 
unsuccessful. If JVM start fails, can there be any message about that?

I tried to revert to the previous versions of commons-daemon, and the result 
are the following:
- 1.0.3: fails in the same way as 1.0.4
- 1.0.2: starts successfully.

1.0.2 starts successfully even if I remove that DependOnService setting from 
the registry.

> Service startup fails at boot time on Windows
> ---------------------------------------------
>
>                 Key: DAEMON-190
>                 URL: https://issues.apache.org/jira/browse/DAEMON-190
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Procrun
>    Affects Versions: 1.0.4
>         Environment: Windows XP SP3 32-bit, Oracle JRE 6u22, Trying to run 
> Tomcat 6.0.x (dev build).
>            Reporter: Konstantin Kolinko
>            Assignee: Mladen Turk
>
> Tomcat 6.0.x (a dev build) with Commons-Daemon 2.0.4 was installed and 
> configured to autostart. The problem is that the service fails to start. 
> After the system starts up the service is in stopped state.
> I do not use the PidFile setting (it is blank).
> If I start the service manually, it starts successfully.
> I configured prunsrv logging level to be Debug, and here is what is observed 
> during boot time:
> [2010-12-20 15:14:25] [debug] ( prunsrv.c:1493) Commons Daemon procrun log 
> initialized
> [2010-12-20 15:14:25] [info]  (          :0   ) Commons Daemon procrun 
> (1.0.4.0 32-bit) started
> [2010-12-20 15:14:25] [info]  (          :0   ) Running 'Tomcat6' Service...
> [2010-12-20 15:14:25] [debug] ( prunsrv.c:1241) Inside ServiceMain...
> [2010-12-20 15:14:25] [info]  (          :0   ) Starting service...
> [2010-12-20 15:14:25] [debug] ( javajni.c:191 ) loading jvm 'C:\Program 
> Files\Java\jre6\bin\client\jvm.dll'
> [2010-12-20 15:14:27] [debug] ( javajni.c:643 ) Jvm Option[0] 
> -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0
> [2010-12-20 15:14:27] [debug] ( javajni.c:643 ) Jvm Option[1] 
> -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0
> [2010-12-20 15:14:27] [debug] ( javajni.c:643 ) Jvm Option[2] 
> -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\endorsed
> [2010-12-20 15:14:28] [debug] ( javajni.c:643 ) Jvm Option[3] 
> -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp
> [2010-12-20 15:14:28] [debug] ( javajni.c:643 ) Jvm Option[4] 
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> [2010-12-20 15:14:28] [debug] ( javajni.c:643 ) Jvm Option[5] 
> -Djava.util.logging.config.file=C:\Program Files\Apache Software 
> Foundation\Tomcat 6.0\conf\logging.properties
> [2010-12-20 15:14:28] [debug] ( javajni.c:643 ) Jvm Option[6] 
> -Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\bin\bootstrap.jar
> [2010-12-20 15:14:28] [debug] ( prunsrv.c:1054) Java started 
> org/apache/catalina/startup/Bootstrap
> [2010-12-20 15:14:29] [info]  (          :0   ) Service started in 3781 ms.
> [2010-12-20 15:14:30] [debug] ( prunsrv.c:1364) Waiting for worker to 
> finish...
> [2010-12-20 15:14:30] [debug] ( prunsrv.c:1369) Worker finished.
> [2010-12-20 15:14:31] [debug] ( prunsrv.c:1392) Waiting for all threads to 
> exit
> [2010-12-20 15:14:31] [debug] ( prunsrv.c:1396) JVM destroyed.
> [2010-12-20 15:14:45] [debug] ( javajni.c:827 ) argv[0] = start
> [2010-12-20 15:14:45] [debug] ( javajni.c:874 ) Java Worker thread started 
> org/apache/catalina/startup/Bootstrap:main
> [2010-12-20 15:14:45] [info]  (          :0   ) Run service finished.
> [2010-12-20 15:14:46] [info]  (          :0   ) Commons Daemon procrun 
> finished
> There is nothing in Tomcat logs, nor in stderr/stdout logs, besides "Commons 
> Daemon procrun stderr initialized" or ..stdout... messages.  The odd thing is 
> that "Worker finished." message above.
> Here is another failed startup at boot time:
> [2010-12-20 15:02:18] [debug] ( prunsrv.c:1493) Commons Daemon procrun log 
> initialized
> [2010-12-20 15:02:19] [info]  (          :0   ) Commons Daemon procrun 
> (1.0.4.0 32-bit) started
> [2010-12-20 15:02:19] [info]  (          :0   ) Running 'Tomcat6' Service...
> [2010-12-20 15:02:19] [debug] ( prunsrv.c:1241) Inside ServiceMain...
> [2010-12-20 15:02:19] [info]  (          :0   ) Starting service...
> [2010-12-20 15:02:20] [debug] ( javajni.c:191 ) loading jvm 'C:\Program 
> Files\Java\jre6\bin\client\jvm.dll'
> [2010-12-20 15:02:21] [debug] ( javajni.c:643 ) Jvm Option[0] 
> -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0
> [2010-12-20 15:02:21] [debug] ( javajni.c:643 ) Jvm Option[1] 
> -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0
> [2010-12-20 15:02:21] [debug] ( javajni.c:643 ) Jvm Option[2] 
> -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\endorsed
> [2010-12-20 15:02:22] [debug] ( javajni.c:643 ) Jvm Option[3] 
> -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp
> [2010-12-20 15:02:22] [debug] ( javajni.c:643 ) Jvm Option[4] 
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> [2010-12-20 15:02:22] [debug] ( javajni.c:643 ) Jvm Option[5] 
> -Djava.util.logging.config.file=C:\Program Files\Apache Software 
> Foundation\Tomcat 6.0\conf\logging.properties
> [2010-12-20 15:02:23] [debug] ( javajni.c:643 ) Jvm Option[6] 
> -Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\bin\bootstrap.jar
> [2010-12-20 15:02:22] [debug] ( prunsrv.c:1054) Java started 
> org/apache/catalina/startup/Bootstrap
> [2010-12-20 15:02:24] [info]  (          :0   ) Service started in 3375 ms.
> [2010-12-20 15:02:24] [debug] ( prunsrv.c:1364) Waiting for worker to 
> finish...
> [2010-12-20 15:02:24] [debug] ( prunsrv.c:1369) Worker finished.
> [2010-12-20 15:02:25] [debug] ( prunsrv.c:1392) Waiting for all threads to 
> exit
> [2010-12-20 15:02:24] [debug] ( javajni.c:827 ) argv[0] = start
> [2010-12-20 15:02:26] [debug] ( javajni.c:889 ) Java Worker thread finished 
> org/apache/catalina/startup/Bootstrap:main with status=3
> For reference, here is successful startup when I start the service manually 
> from prunmgr's menu:
> [2010-12-20 15:44:25] [debug] ( prunsrv.c:1493) Commons Daemon procrun log 
> initialized
> [2010-12-20 15:44:25] [info]  (          :0   ) Commons Daemon procrun 
> (1.0.4.0 32-bit) started
> [2010-12-20 15:44:25] [info]  (          :0   ) Running 'Tomcat6' Service...
> [2010-12-20 15:44:25] [debug] ( prunsrv.c:1241) Inside ServiceMain...
> [2010-12-20 15:44:25] [info]  (          :0   ) Starting service...
> [2010-12-20 15:44:25] [debug] ( javajni.c:191 ) loading jvm 'C:\Program 
> Files\Java\jre6\bin\client\jvm.dll'
> [2010-12-20 15:44:25] [debug] ( javajni.c:643 ) Jvm Option[0] 
> -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 6.0
> [2010-12-20 15:44:25] [debug] ( javajni.c:643 ) Jvm Option[1] 
> -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 6.0
> [2010-12-20 15:44:25] [debug] ( javajni.c:643 ) Jvm Option[2] 
> -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\endorsed
> [2010-12-20 15:44:25] [debug] ( javajni.c:643 ) Jvm Option[3] 
> -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 6.0\temp
> [2010-12-20 15:44:25] [debug] ( javajni.c:643 ) Jvm Option[4] 
> -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
> [2010-12-20 15:44:25] [debug] ( javajni.c:643 ) Jvm Option[5] 
> -Djava.util.logging.config.file=C:\Program Files\Apache Software 
> Foundation\Tomcat 6.0\conf\logging.properties
> [2010-12-20 15:44:25] [debug] ( javajni.c:643 ) Jvm Option[6] 
> -Djava.class.path=C:\Program Files\Apache Software Foundation\Tomcat 
> 6.0\bin\bootstrap.jar
> [2010-12-20 15:44:25] [debug] ( javajni.c:827 ) argv[0] = start
> [2010-12-20 15:44:25] [debug] ( javajni.c:874 ) Java Worker thread started 
> org/apache/catalina/startup/Bootstrap:main
> [2010-12-20 15:44:26] [debug] ( prunsrv.c:1054) Java started 
> org/apache/catalina/startup/Bootstrap
> [2010-12-20 15:44:26] [info]  (          :0   ) Service started in 1062 ms.
> [2010-12-20 15:44:26] [debug] ( prunsrv.c:1364) Waiting for worker to 
> finish...
> I originally observed this issue on a WinXP SP3 32-bit system. I am able to 
> reproduce it on another system running the same OS, and on Windows 7 running 
> 64-bit version of procrun.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to