commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Slifka (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (DAEMON-153) [PATCH] Update/fix of Tomcat5.sh script
Date Mon, 22 Mar 2010 18:43:27 GMT

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

Rob Slifka edited comment on DAEMON-153 at 3/22/10 6:42 PM:
------------------------------------------------------------

Thanks for the detailed comments!

> 1. Put pid file back in /var/run... it's more standard than

Check.

> 2. Remove JAVA_HOME/rt.jar from the CLASSPATH... the JVM

Check.

> 3. Remove -debug switch from jsvc invocation

Oops, check :)

> 4. Make the -jvm and -wait options into script variables

Check.

> 5. Quote all uses of the following variables: CATALINA_HOME,

Check.

> 6. I'm' disturbed by the 'chown' you've added: there's no 

Tomcat requires write access to:

- $CATALINA_BASE/logs (for log file creation)
- $CATALINA_BASE/work (for session serialization)

I'm not sure if the jsvc init script is the right place to verify/assert these preconditions,
though they are required.  I've removed it from the patch, because I think others will benefit
from the other changes and I'd like to see it in sooner than later ;)

> 7. Allow the user to specify the location of 'curl' and check to
> 8. Alternatively, use the -check option on jsvc to check a

I would prefer to use -check, however I can't see how the return value is communicated back
to the init script so I can use it to check status.

{code:title=java.c}
ret = (*env)->CallStaticBooleanMethod(env, cls, method, className);
if (ret == FALSE) {
    log_error("An error was detected checking the %s daemon", args->clas);
    return false;
}

log_debug("Daemon checked successfully");
return true;
{code}

> 9. ... You should use -errfile '&1'

Check.

Patch replaced!

Rob


      was (Author: rslifka):
    Thanks for the detailed comments!

> 1. Put pid file back in /var/run... it's more standard than

Check.

> 2. Remove JAVA_HOME/rt.jar from the CLASSPATH... the JVM

Check.

> 3. Remove -debug switch from jsvc invocation

Oops, check :)

> 4. Make the -jvm and -wait options into script variables

Check.

> 5. Quote all uses of the following variables: CATALINA_HOME,

Check.

> 6. I'm' disturbed by the 'chown' you've added: there's no 

Tomcat requires write access to:

- $CATALINA_BASE/logs (for log file creation)
- $CATALINA_BASE/work (for session serialization)

I'm not sure if the jsvc init script is the right place to verify/
assert these preconditions, though they are required.  I've
removed it from the patch, because I think others will benefit
from the other changes and I'd like to see it in sooner than
later ;)

> 7. Allow the user to specify the location of 'curl' and check to
> 8. Alternatively, use the -check option on jsvc to check a

I would prefer to use -check, however I can't see how the return
value is communicated back to the init script so I can use it
to check status.

{code:title=java.c}
ret = (*env)->CallStaticBooleanMethod(env, cls, method, className);
if (ret == FALSE) {
    log_error("An error was detected checking the %s daemon", args->clas);
    return false;
}

log_debug("Daemon checked successfully");
return true;
{code}

> 9. ... You should use -errfile '&1'

Check.

Patch replaced!

Rob

  
> [PATCH] Update/fix of Tomcat5.sh script
> ---------------------------------------
>
>                 Key: DAEMON-153
>                 URL: https://issues.apache.org/jira/browse/DAEMON-153
>             Project: Commons Daemon
>          Issue Type: Bug
>          Components: Jsvc
>    Affects Versions: 1.0.1
>         Environment: Linux (tested on Fedora 8 / EC2)
>            Reporter: Rob Slifka
>         Attachments: DAEMON-153.patch
>
>
> A few changes:
> - Enable default Tomcat logging behaviour (logs exist and now output to $CATALINA_BASE/logs).
> - Added 'status' support, to ping a URL and report success if the host was reachable
and replied.
> - Added comments to give people a hint that further customization sourced from catalina.sh
may be required.
> - Updated to currently shipping defaults of Java (1.6.0_18) and Tomcat (6.0.26).

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


Mime
View raw message