[
https://issues.apache.org/jira/browse/DAEMON-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12976842#action_12976842
]
Konstantin Kolinko commented on DAEMON-190:
-------------------------------------------
> Attached is the fixed binary with the patch that goes in your direction.
When I replaced old binaries with the new one, the service started successfully.
(The service configuration already had dependencies on AFP and TCPIP, added
manually)
I.e., it fixed the issue for me.
==============================================================
Then I used {{service.bat}} from Tomcat 6.0-dev to "remove" and then "install"
service.
After that the service failed to start at boot time, displaying the same series
of errors as in the last comment by John Leed: "The specified module could not
be found. " (in Russian -- those messages are provided by OS).
I opened the configuration dialog (tomcat6w, aka prunmgr) and on the "Java" tab
of the dialog removed the check from the *"Use default"* checkbox.
(I already had correct path to the jvm.dll specified in the "Java Virtual
Machine" field there).
After that change, the service started successfully after reboot.
==============================================================
If I set [x] "Use default" and set log level to Debug, I see the following in
the log:
[2011-01-03 20:18:28] [debug] ( prunsrv.c:1494) Commons Daemon procrun log
initialized
[2011-01-03 20:18:29] [info] ( :0 ) Commons Daemon procrun (1.0.5.0
32-bit) started
[2011-01-03 20:18:29] [info] ( :0 ) Running 'Tomcat6' Service...
[2011-01-03 20:18:29] [debug] ( prunsrv.c:1246) Inside ServiceMain...
[2011-01-03 20:18:30] [info] ( :0 ) Starting service...
[2011-01-03 20:18:30] [debug] ( javajni.c:195 ) Invalid RuntimeLib 'C:\Program
Files\Java\jre6\bin\client\jvm.dll'
[2011-01-03 20:18:30] [debug] ( javajni.c:197 ) Using Jre JavaHome 'C:\Program
Files\Java\jre6'
[2011-01-03 20:18:30] [debug] ( javajni.c:206 ) loading jvm 'C:\Program
Files\Java\jre6\bin\server\jvm.dll'
[2011-01-03 20:18:30] [debug] ( javajni.c:249 ) Setting DLL search path to
'C:\Program Files\Java\jre6\bin\server'
[2011-01-03 20:18:30] [debug] ( javajni.c:249 ) Setting DLL search path to
'C:\Program Files\Java\jre6\bin'
[2011-01-03 20:18:31] [error] ( javajni.c:262 ) Не найден указанный модуль.
[2011-01-03 20:18:31] [error] ( prunsrv.c:1037) Failed creating java
[2011-01-03 20:18:31] [error] ( prunsrv.c:1037) Не найден указанный модуль.
[2011-01-03 20:18:33] [error] ( prunsrv.c:1377) ServiceStart returned 1
[2011-01-03 20:18:34] [error] ( prunsrv.c:1377) Не найден указанный модуль.
[2011-01-03 20:18:43] [info] ( :0 ) Run service finished.
[2011-01-03 20:18:44] [info] ( :0 ) Commons Daemon procrun finished
where "Не найден указанный модуль." (in Russian) means "The specified module
could not be found.".
The correct path to jvm.dll on my system is "C:\Program
Files\Java\jre6\bin\client\jvm.dll"
I think the following change is needed in javajni.c:
in apxJavaStart() - line #190 and in __apxLoadJvmDll() - line 208
s / if (GetFileAttributesW(szJvmDllPath) / if (GetFileAttributesW(dllJvmPath) /
It is somehow strange that "Use default" flag on the Java page is on by
default, even though I provided JAVA_HOME when calling service.bat. Is the
"Java Virtual Machine" setting ignored at all when "Use default" is on?
If prunsvc defaults will stay as they are now, I think that {{service.bat}} has
to be adjusted to clear that flag.
> 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
> Attachments: 2011-01-03_Daemon-190.patch, prunsrv-x86.zip
>
>
> 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.