mdecheser on 14 Dec 2007 18:16:03 -0000 |
Hi everyone -- I'm having some pestering issues with setting up Tomcat on Linux RedHat and I wanted to put out the question to the group. Background (in brief): One of my webserver environments runs Apache Tomcat 4.x and I'm seeking to upgrade it to Tomcat 5.5.25. The application and the environment in which it runs were both custom built and poorly documented. To add to the complexity, one of my predecessors had the bright idea to launch a production-level application (not requiring Apache or Tomcat) on this development server, and now I cannot conveniently meddle with the server in any regard. My initial intention was to migrate said production-level app off the server so that I could test updates to the kernel, to Apache, and to Tomcat. Unfortunately, the process of moving the production-level app is encountering bureaucratic lag time. My forced approach is to essentially start with a new build of everything and work backward. Understanding that upgrading from Tomcat 4.x. to 5.x is no light task, I obtained a recent ISO of RedHat from RHN, installed it, and bravely set about the process of building Tomcat with the required JVM/JRE. The Approach & The Facts: Originally, I attempted running Tomca 5.5.25 with j2sdk1.4.2_x (along with the Tomcat 1.4.2 compat package) akin to the production environment. I was unsuccessful with that, so I decided to follow the deployment criteria more strictly and use jre1.5.0_14. To the best of my knowledge, these are the latest stable builds within these version ranges. It is also worth noting that I did some significant hacking (in the blade sense, not in the computing sense) around with /etc/alternatives and my bash profiles to get Java working correctly. To the best of my knowledge, it is as per results http://www.java.com/en/download/testvm.xml. The results report that I am running an older version of Java, but it does correctly report my version as Java 5 update 14. I believe I managed to set my environmental variables correctly: [root@localhost ~]# java -version java version "1.5.0_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing) Tomcat appears to be configured correctly upon startup: [root@localhost bin]# ./startup.sh Using CATALINA_BASE: /usr/local/apache-tomcat-5.5.25 Using CATALINA_HOME: /usr/local/apache-tomcat-5.5.25 Using CATALINA_TMPDIR: /usr/local/apache-tomcat-5.5.25/temp Using JRE_HOME: /usr/java/jre1.5.0_14 ... but when I attempt to hit localhost:8080, the browser just hangs, waiting for a reply endlessly. There are different results in the Tomcat logs depending upon the order of my steps. Upon initial startup of the machine, and my initial startup of Tomcat: [root@localhost logs]# tail -f catalina.2007-12-14.log Dec 14, 2007 12:37:17 PM org.apache.coyote.http11.Http11BaseProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Dec 14, 2007 12:37:17 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1175 ms Dec 14, 2007 12:37:17 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Dec 14, 2007 12:37:17 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.25 Dec 14, 2007 12:37:17 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Dec 14, 2007 12:37:17 PM org.apache.catalina.startup.HostConfig deployDescriptor SEVERE: Error deploying configuration descriptor manager.xml (snip) SEVERE: Error deploying configuration descriptor host-manager.xml I get similar errors for deploying configuration descriptors in host-manager.xml, as well as severe errors in deploying web applications directories for all the stock webapps packaged with Tomcat (jsp-examples, ROOT, balancer, webdav, servlets-examples, tomcat-docs, etc). Dec 14, 2007 12:37:18 PM org.apache.coyote.http11.Http11BaseProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Dec 14, 2007 12:37:18 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Dec 14, 2007 12:37:18 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/39 config=null Dec 14, 2007 12:37:18 PM org.apache.catalina.storeconfig.StoreLoader load INFO: Find registry server-registry.xml at classpath resource Dec 14, 2007 12:37:18 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1406 ms Upon subsequent startups of Tomcat (note the address already in use:8080 detail): [root@localhost logs]# tail -f catalina.2007-12-14.log Dec 14, 2007 12:29:14 PM org.apache.coyote.http11.Http11BaseProtocol init SEVERE: Error initializing endpoint java.net.BindException: Address already in use:8080 (snip) Dec 14, 2007 12:29:14 PM org.apache.catalina.startup.Catalina load SEVERE: Catalina.start LifecycleException: Protocol handler initialization failed: java.net.BindException: Address already in use:8080 (snip) Dec 14, 2007 12:29:14 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 866 ms Dec 14, 2007 12:29:14 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Dec 14, 2007 12:29:14 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.5.25 Dec 14, 2007 12:29:14 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled Dec 14, 2007 12:29:14 PM org.apache.catalina.startup.HostConfig deployDescriptor SEVERE: Error deploying configuration descriptor manager.xml Once again, with the same severe errors pertaining to host-manager.xml, deployment of webapps, etc. The Questions: 1) Why is Tomcat throwing an exception regarding port 8080 upon subsequent startups of the Tomcat server? 2) My initial setup of Tomcat was done as root. As this is a test box in a protected environment, I'm not concerned about security (yet), but moving forward I would like to ensure this operates under secure parameters. Should I be running Tomcat as a user other than root? Should I set users:groups different other than root:root? 3) Are there some additional steps I can take to ensure my tampering with Java versions in /etc/alternatives has not broken anything? Like I said, to the best of my knowledge, this is running beautifully. I've already done a fair share of researching this on my own via Google, looking rather extensively on the Sun and Apache websites for related resources, and I'm not getting much traction. Can someone offer some guidance? Apologies for the verbosity of this posting, but I figured I'd provide more information up front in hopes to reduce the amount of back and forth it might potentially require to solve this issue. Thanks in advance, _md ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|