I figured it out -- the package doesn't quite work right with Sun's latest Java6 package, sun-java6-jdk
; the fix is fairly straightforward when you find it:
Once I found the daemon.log
, I found the errors listed in my edit on the question, but those are just a side-effect of this error:
jsvc.exec[18819]: Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
jsvc.exec[18819]: java.security.AccessControlException: access denied (java.lang.RuntimePermission setContextClassLoader)
...which occurs because the package, by default, runs Tomcat using the Java security manager per this setting in /etc/init.d/tomcat5.5
:
# Use the Java security manager? (yes/no)
TOMCAT5_SECURITY=yes
...but the package doesn't set a permissions on JULI (the default logging implementation) that the latest Java6 from Sun appears to need for that to work. Earlier versions of Java6 were apparently fine. This recent thread on the tomcat-user mailing list pointed me in the right direction; the user in question there was getting the error above and eventually Mark Thomas figured out that this permission:
permission java.lang.RuntimePermission "setContextClassLoader";
...was missing from catalina.policy
. And indeed, if I add that permission to the JULI section of /etc/tomcat5.5/policy.d/03catalina.policy
and restart Tmocat, the error goes away, and I get log files! Huzzah!
Be warned: If you also install tomcat5.5-webapps
to get the examples, manager application, etc., there are other settings you'll need to enable in 03catalina.policy
. Of course, you always have the option of turning the security manager off, but this is what it's for.
Encountered the same issue, after some digging I tried the following and it worked:
In your schema.xml file, change the class from "solr.TrieDateField" to "org.apache.solr.schema.TrieDateField".
Example:
<fieldType name="date" class="org.apache.solr.schema.TrieDateField" omitNorms="true" precisionStep="0" positionIncrementGap="0"/>
I noticed this because of this comment in the file:
<!-- Class names starting with "solr" refer to java classes in the
org.apache.solr.analysis package.
-->
Which is not where the TrieDateField class is located.
Hope this helps.
-C
Best Answer
Play around with RollingFileAppenders (Log4J) to roll them when they get too large and use cron jobs to delete old logs. You can easily limit logfiles to 50M or so.
To shut down logging completely rename the logging.properties into something else. Tomcat will then default to use console logging which is almost like > /dev/null. Finally put a comment around all valves in your server.xml to mute those too. Now shut the tomcat down, delete all remaining logfiles and start it back up. There should be no logfiles created in /log.