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'
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.