You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Mladen Turk (JIRA)" <ji...@apache.org> on 2010/04/22 19:19:53 UTC
[jira] Closed: (DAEMON-148) Incorrect case on parameter causes
silent failure
[ https://issues.apache.org/jira/browse/DAEMON-148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mladen Turk closed DAEMON-148.
------------------------------
Resolution: Won't Fix
This is not a bug but rather a feature :)
Seriously, silent discarding of unknown command line options was made by purpose
so that we can add config options without breaking binary compatibility.
We cannot even check for --Classpath missing, cause one can later use the //US//Foo --Classpath=x.jar at any time
Make sure you don't make typos :)
> Incorrect case on parameter causes silent failure
> -------------------------------------------------
>
> Key: DAEMON-148
> URL: https://issues.apache.org/jira/browse/DAEMON-148
> Project: Commons Daemon
> Issue Type: Bug
> Components: Procrun
> Reporter: David Newcomb
> Fix For: 1.0.3
>
>
> Unknown parameters passed to procrun halt command line option processing, silently ignoring the other options, then reports as successful.
> For example:
> C:\Data\tomcat\bin\tomcat6.exe //US//Tomcat ^
> --LogPath C:\Data\tomcat\logs ^
> --LogPrefix commons-daemon ^
> --LogLevel debug ^
> --Description "Apache Tomcat - Company app" ^
> --StartClass org.apache.catalina.startup.Bootstrap ^
> --StopClass org.apache.catalina.startup.Bootstrap ^
> --StartParams start ^
> --StopParams stop ^
> --DependsOn MySQL ^
> --StartMode jvm ^
> --StopMode jvm ^
> --JvmOptions -Dcatalina.base=C:\Data\tomcat ^
> --JvmOptions -Dcatalina.home=C:\Data\tomcat ^
> --JvmOptions -Djava.endorsed.dirs=C:\Data\tomcat\endorsed ^
> --classpath C:\Data\tomcat\bin\bootstrap.jar ^
> --JvmOptions -Djava.io.tmpdir=C:\Data\tomcat\temp ^
> --JvmOptions -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager ^
> --JvmOptions -Djava.util.logging.config.file=C:\Data\tomcat\conf\logging.properties ^
> --JvmOptions -Dcom.sun.management.jmxremote ^
> --JvmOptions -Dcom.sun.management.jmxremote.port=8181 ^
> --JvmOptions -Dcom.sun.management.jmxremote.authenticate=false ^
> --JvmOptions -Dcom.sun.management.jmxremote.ssl=false ^
> --JvmOptions -XX:+HeapDumpOnOutOfMemoryError ^
> --JvmMs 256 ^
> --JvmMx 512 ^
> --Jvm c:\data\java\bin\server\jvm.dll ^
> --JavaHome c:\data\java ^
> --Startup auto
> The "--classpath C:\Data\tomcat\bin\bootstrap.jar ^" line introduces an invalid command line parameter. It should be --Classpath instead of --classpath.
> The log reads:
> [2010-03-18 16:56:00] [debug] ( prunsrv.c:1412) Commons Daemon procrun log initialized
> [2010-03-18 16:56:00] [info] Commons Daemon procrun (1.0.3.0) started
> [2010-03-18 16:56:00] [info] Updating service...
> [2010-03-18 16:56:00] [error] ( service.c:126 ) The specified service does not exist as an installed service.
> [2010-03-18 16:56:00] [debug] ( prunsrv.c:507 ) Installing service...
> [2010-03-18 16:56:00] [info] Service Tomcat name
> [2010-03-18 16:56:00] [debug] ( prunsrv.c:559 ) Setting service description Apache Tomcat - Quantel Dino
> [2010-03-18 16:56:00] [info] Service 'Tomcat' installed
> [2010-03-18 16:56:00] [info] Commons Daemon procrun finished
> Showing that the installation was successful. However if you load up tomcat6w then you can see in the Java tab that the last option to be processed was "--JvmOptions -Djava.endorsed.dirs...." every other entry after that is ignored.
> This creates an ordering issue with the command line options. If the LogPath is at the end of the parameter list then no output file will be created.
> As a result running the service always fails.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.