#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Bay Area California
    Posts
    371
    Rep Power
    14

    Java update 1.6.0_51 killed Tomcat - urgent help needed


    Hi all,

    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:

    PHP Code:
        at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:183)
        
    at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:92)
        
    at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:207)
        
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:391)
    Aug 132013 9:20:03 AM org.apache.catalina.startup.Bootstrap initClassLoaders
    SEVERE
    : Class loader creation threw exception
    java
    .lang.InternalErrorCan't connect to window server - not enough permissions.
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724) 
    This message is thrown every 10 seconds into the catalina server logs.

    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.
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2002
    Location
    Bay Area California
    Posts
    371
    Rep Power
    14
    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:

    CATALINA_OPS="-Djava.awt.headless=true"

    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

    • DonR agrees : Thanks for posting back with the "answer/fix"

IMN logo majestic logo threadwatch logo seochat tools logo