John Von Essen on 15 Dec 2007 06:14:46 -0000 |
I dont understand what you mean by subsequent startups of tomcat. Do you mean you shutdown tomcat, then start it up again, and then it throughs 8080 exception - address already in use? If thats the case, your tomcat did not shutdown properly. Before you startup tomcat again, do a netstat and ps to see if anything is still lingering. Overall, tomcat 5 shouldn't be this difficult to install. In fact, there is nothing to be done on the tomcat side, you just untar it, set JAVAPATH env and run the startup.sh script. The real install task is the JRE. But for Linux, that is also just an unpacking of pre-made stuff. You downloaded your 1.5 JRE from Sun, right? Also, are you using Tomcat 5 tarfile from Apache, or are you using packages? To keep things simple and working - stay away from packages. Install Sun's JRE 1.5 into /usr/local/java and unpack Tomcat 5 tarball into /usr/local/tomcat5. Then edit the startup script which comes with Tomcat and add all the appropriate paths. Then try to start it. That really should be it, you shouldn't get any startup errors. If you do get manager errors, check to see that the manager app is there, it should be by default. -John On Dec 14, 2007, at 1:15 PM, mdecheser@comcast.net wrote: 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.logDec 14, 2007 12:37:17 PM org.apache.coyote.http11.Http11BaseProtocol initINFO: 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 disabledDec 14, 2007 12:37:17 PM org.apache.catalina.startup.HostConfig deployDescriptorSEVERE: Error deploying configuration descriptor manager.xml (snip) SEVERE: Error deploying configuration descriptor host-manager.xmlI 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 startINFO: 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=nullDec 14, 2007 12:37:18 PM org.apache.catalina.storeconfig.StoreLoader loadINFO: 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 msUpon subsequent startups of Tomcat (note the address already in use:8080 detail):[root@localhost logs]# tail -f catalina.2007-12-14.logDec 14, 2007 12:29:14 PM org.apache.coyote.http11.Http11BaseProtocol initSEVERE: 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.startLifecycleException: 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 disabledDec 14, 2007 12:29:14 PM org.apache.catalina.startup.HostConfig deployDescriptorSEVERE: Error deploying configuration descriptor manager.xmlOnce 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 ___________________________________________________________________________ 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
|
|