Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175189 - tomcat-6.0.10-r2 fails to run when started with init scripts
Summary: tomcat-6.0.10-r2 fails to run when started with init scripts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: William L. Thomson Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-19 09:08 UTC by Adeel
Modified: 2007-04-19 16:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adeel 2007-04-19 09:08:39 UTC
Tomcat 6.0.10 does not start when using the init scripts. It reports a successful startup, but on issuing an '/etc/init.d/tomcat-6 status' it reports stopped. However, if changing the tomcat_user setting in /etc/conf.d/tomcat-6 to 'root' tomcat successfully starts. This implies a permissions problem. After some work, an error message is displayed:

WARNING: Can't load server.xml from /var/lib/tomcat-6/conf/server.xml
Apr 19, 2007 12:52:01 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 0 ms
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.catalina.startup.Bootstrap.start(Unknown Source)
        at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
Caused by: java.lang.NullPointerException
        at org.apache.catalina.startup.Catalina.await(Unknown Source)
        at org.apache.catalina.startup.Catalina.start(Unknown Source)
        ... 6 more


Reproducible: Always

Steps to Reproduce:
1. emerge tomcat-6.0.10-r2
2. /etc/init.d/tomcat-6 start




Checking the permissions of /etc/tomcat-6 it turns out that it's permissions are:
    drwxr-x--- 3 root        root      4096 Apr 19 01:51 tomcat-6
while the permissions of /etc/tomcat-6/server.xml are:
    -rw-rw-r-- 1 tomcat tomcat  5164 Apr 19 01:27 server.xml
a simple solution is to change the group ownership of the folder to 'tomcat'
Comment 1 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-04-19 16:36:09 UTC
Fixed in -r3, although updating to that version is not likely to resolve problem. You can either remove tomcat entirely, removing specifically /etc/tomcat-6. Or a much simpler solution would be to simply chown -R tomcat:tomcat /etc/tomcat-6. That should resolve problem, and has been addressed in ebuild.