1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Unable to connect to Tomcat

Discussion in 'Plesk for Linux - 8.x and Older' started by reggert, Nov 18, 2006.

  1. reggert

    reggert Guest

    I'm trying to get Tomcat working on my virtual dedicated Linux server that I have through Godadddy.

    In order to get Tomcat to start up at all, I had to modify /etc/tomcat5/tomcat5.conf to change JAVA_HOME to point to /usr/lib/jvm/jre-1.4.2-gcj instead of /usr/lib/jvm/java. After doing this, it seems to start up fine (no errors in the log files, aside from a couple of "WARNING: Unknown default host: localhost" messages.

    When I try to upload a WAR file through Plesk, it hangs indefinitely on "Please wait. Loading...".

    When I try to access the Tomcat console directly through http://lgi-2.lagardeimperiale.org:8080/ (or :9080; or any other variation of the hostname), it hangs indefinitely with no response.

    HOWEVER, when I log into the machine via SSH and run lynx against http://localhost:8080/ or http://lgi-2.lagardeimperiale.org:8080/ (the fully-qualified hostname of the machine; mapped to the machine's IP address in /etc/hosts), I'm able to get into Tomcat (port 9080 doesn't seem to work at all; nor do other variations of the hostname).

    Does anyone have any idea what's wrong? It seems as if Tomcat isn't accepting connections from the outside world, or from Plesk.
  2. reggert

    reggert Guest

    Well, after fighting with it for a bit, I managed to figure out a way to access the Tomcat console.

    I set up an extra subdomain and put a JkMount instrunction in its vhost.conf file to direct all requests to the ajp13 worker. Unfortunately, when I tried accessing this subdomain using my browser, I was continually greeted with error 400: "No host matches server name". I fought with it for a bit, and managed to get an error 500 instead. Investigating the mod_jk log revealed that it was unable to connect to port 9008.

    I then noticed that my servers.xml had two AJP/13 connectors set up: one that appeared to be reserved for Plesk on port 9008, and another one that appeared to be unused on 8009. I went into /etc/httpd/workers.properties and added a second ajp13 worker to make use of the 8009 one. I updated my vhost.conf to make use of the new worker.

    I then hit refresh on my browser and voila! I was greeted with the Tomcat console page.

    I believe Plesk's connection to Tomcat is still broken, but once I get a user account set up on Tomcat, its own interface should suffice for my purposes. :)
  3. reggert

    reggert Guest

    It somehow broke again while I was trying to debug a ClassDefNotFoundException (as best I can tell, it's a problem with GCJ), so I've given up trying to manage Tomcat through Plesk and just installed Sun's JDK 5.0 and Tomcat 5.5.