August 13th, 2013, 01:35 PM
Java update 1.6.0_51 killed Tomcat - urgent help needed
I have a Tomcat server that has been running on an Xserve with OS X 10.6.8 Snow Leopard Server installed for over 3 years.
I just installed the latest Java security update for that OS version last night, Java 1.6.0_51 (update 16). This security update has changed something in a way that now prevents Tomcat from running in the background (auto-started by the Server administrator process). There is a mission critical application running in Tomcat that is now in jeopardy.
Looking at the system logs I found the following:
This message is thrown every 10 seconds into the catalina server logs.
Aug 13, 2013 9:20:03 AM org.apache.catalina.startup.Bootstrap initClassLoaders
SEVERE: Class loader creation threw exception
java.lang.InternalError: Can't connect to window server - not enough permissions.
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
The message is odd in that Tomcat used to run in the background, so shouldn't need access to the "window server" (if I understand this right).
I am able to manually start Tomcat by issuing a "/Library/Tomcat/bin/startup.sh" command in Terminal. But now, it launches an app that is sitting in the server dock named "org.apache.catalina.startup.Bootstrap". Manually launching Tomcat temporarily solves the issue - as users can now access our critical services online - but if I log out of the server, it kills that Bootstrap process and then Tomcat dies. I can't stay logged into the production server indefinitely!
Meanwhile, even with Tomcat running manually, the OS keeps trying to run it in the background (I assume that's what is going on) so keeps throwing errors into the console every 10 seconds.
In doing a ton of searches this morning, I came across mention of issuing a command or setting "-Djava.awt.headless=true" but I am not sure, what this really is, or if that will solve my problem, nor do I have any idea where to plug in that command/setting in the Tomcat directory?
Are there any experts out there that could help shed some light on this critical issue for me.
August 14th, 2013, 02:18 PM
I am going to answer my own posting, since others may need this information to troubleshoot or solve their problems.
I was able to use this configuration directive in the "Tomcat/bin/catalina.sh" file to correct the issue. I placed this right after the introductory comments found at the top of the file:
This allowed the Catalina Bootstrap process - which is kicked off by the Tomcat Daemon that OS X Server runs every 10 seconds, to now tell Tomcat to run itself in the background (like its supposed to) instead of trying to run in a windowed interactive mode.
This also killed off the org.apache.catalina.startup.bootstrap app which was sitting in the dock.
Now I can again, log out of the server, using Remote Desktop, without causing Tomcat to shut down.
I hope this helps someone else with a similar issue.
Comments on this post