LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Tomcat-5.5.23 issue. (http://www.linuxquestions.org/questions/linux-server-73/tomcat-5-5-23-issue-574154/)

brave heart 08-02-2007 04:22 AM

Tomcat-5.5.23 issue.
 
Hi, all

I install the apache-tomcat-5.5.23, but I can't view page http://localhost:8080. Is there any error in following message?
Code:

root@localhost apache-tomcat-5.5.23> /usr/src/apache-tomcat-5.5.23/bin/startup.sh
Using CATALINA_BASE:  /usr/src/apache-tomcat-5.5.23
Using CATALINA_HOME:  /usr/src/apache-tomcat-5.5.23
Using CATALINA_TMPDIR: /usr/src/apache-tomcat-5.5.23/temp
Using JRE_HOME:      /usr/java/jdk1.5.0_07
root@localhost apache-tomcat-5.5.23>

Or do I neet to paste out other file for discussion?

Thanks,

EDIT: by the way, it seems that I have different jave modules installed, do I need to uninstall the previous version?

bathory 08-03-2007 04:49 PM

There is no error in the execution of the startup.sh script assuming that the CATALINA_* variables it uses are correct. To verify that tomcat is running and listening on port 8080, run:
Code:

ps -ef|grep tomcat
netstat -tan|grep 8080

You can check the logfile catalina.out to see if you find anything wrong.
As for the java version it's better to keep the modules you have because they might be in use by other applications.

Regards

brave heart 08-05-2007 08:54 PM

Hi, bathory

Thanks for your help, result below:
Code:

root@localhost apache-tomcat-5.5.23> ps -ef|grep tomcat
root      4531  4319  0 09:45 pts/0    00:00:00 grep tomcat
root@localhost apache-tomcat-5.5.23> netstat -tan|grep 8080
root@localhost apache-tomcat-5.5.23>

and catalina.log as below:
Code:

root@localhost apache-tomcat-5.5.23> less /var/www/tomcat/logs/catalina.out
Jun 12, 2006 3:22:43 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jun 12, 2006 3:22:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1204 ms
Jun 12, 2006 3:22:43 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 12, 2006 3:22:43 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.28
Jun 12, 2006 3:22:43 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 12, 2006 3:22:43 PM org.apache.catalina.core.StandardHost getDeployer
INFO: Create Host deployer for direct deployment ( non-jmx )
Jun 12, 2006 3:22:43 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:/var/www/tomcat/conf/Catalina/localhost/admin.xml
Jun 12, 2006 3:22:44 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
Jun 12, 2006 3:22:44 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
Jun 12, 2006 3:22:44 PM org.apache.struts.util.PropertyMessageResources <init>
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true
Jun 12, 2006 3:22:46 PM org.apache.catalina.core.StandardHostDeployer install
INFO: Processing Context configuration file URL file:/var/www/tomcat/conf/Catalina/localhost/balancer.xml
Jun 12, 2006 3:22:46 PM org.apache.catalina.core.StandardHostDeployer install


mehxh1979 08-06-2007 12:59 AM

The tomcat service not run. Please check the install logs to verify tomcat is install correct.

bathory 08-06-2007 03:15 AM

That's strange, since startup.sh produces no errors but tomcat is not running. According to catalina.out the startup process is stopping somewhere in the middle but with no errors.
One thing I've noticed is the path to catalina.out (and admin.xml, balancer.xml) that is /var/www/tomcat. If this is correct, then your CATALINA_* variables should point to /var/www/tomcat

brave heart 08-06-2007 03:53 AM

bathory&mehxh1979:

Thanks for your help!


To bathory:

How can I point CATALINA_* variables to /var/www/tomcat?

Thanks,

bathory 08-06-2007 04:12 AM

Where is tomcat installed? And how did you installed it?
Because the only thing you need to define in order to run tomcat is JAVA_HOME. The various CATALINA_* variables are taken from the path to the startup script.

brave heart 08-06-2007 08:21 PM

Part of my /etc/profile:
Code:

# /etc/profile

JAVA_HOME=/usr/java/jdk1.5.0_07
TOMCAT_HOME=/var/www/tomcat
PATH=$PATH:$JAVA_HOME/bin:$TOMCAT_HOME/bin
CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar:$TOMCAT_HOME/common/lib
export PATH  JAVA_HOME  CLASSPATH TOMCAT_HOME

And I installed apache-tomcat-5.5.23 in /usr/java via instruction of http://tomcat.apache.org/tomcat-5.5-doc/setup.html.

bathory 08-07-2007 02:58 AM

Quote:

And I installed apache-tomcat-5.5.23 in /usr/java via instruction of
The instructions you mentioned are for building jsvc which is used to run tomcat as daemon and /usr/java is the path to the jdk needed. I think that you've extracted the tomcat archive under /usr/src, so the CATALINA_* are /usr/src/apache-tomcat-5.5.23. If that's the case, remove (or comment out) the TOMCAT_HOME from your /etc/profile, or edit it to be the same as CATALINA_HOME and then logout/login again to re-read your profile. Or run
Code:

source /etc/profile
Then try to start tomcat using the /usr/src/apache-tomcat-5.5.23/bin/startup.sh script.

brave heart 08-07-2007 05:40 AM

Hi, bathory

Really thanks for your kindly help, :D

I've changed from "JAVA_HOME=/usr/java/jdk1.5.0_07" to "JAVA_HOME=/usr/java/jdk1.5.0_12" in /etc/profile, and reinstall tomcat in /usr/java.

Then I can see the default webpage of tomcat, but I can't see the other jsp file which I put on the webapps/ROOT, do I need to install the ant and cvs as the manual said?

bathory 08-07-2007 06:43 AM

What you mean when you say that you cannot see other jsp. You get a 404 error (file not found) or you get nothing at all. Do the jsp examples provided in the default tomcat page work?

brave heart 08-07-2007 08:14 PM

Yes, the default example jsp page works.

I got a "HTTP Status 500 -" result for other jsp page.

bathory 08-08-2007 02:03 AM

I'm not a java programmer to help you further, but I think you should take a look at catalina.out for error mesages. If the examples work, then there is something in your code that causes the error.

Regards

brave heart 08-08-2007 03:44 AM

I can find the error of"at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)"in catalina.out, but I don't how to correct it?

Thanks for your kindly help again, :D


All times are GMT -5. The time now is 12:13 PM.