LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-02-2007, 04:22 AM   #1
brave heart
Member
 
Registered: Mar 2007
Distribution: Fedora-14
Posts: 155
Blog Entries: 8

Rep: Reputation: 15
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?

Last edited by brave heart; 08-02-2007 at 04:50 AM.
 
Old 08-03-2007, 04:49 PM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,881

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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
 
Old 08-05-2007, 08:54 PM   #3
brave heart
Member
 
Registered: Mar 2007
Distribution: Fedora-14
Posts: 155
Blog Entries: 8

Original Poster
Rep: Reputation: 15
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
 
Old 08-06-2007, 12:59 AM   #4
mehxh1979
LQ Newbie
 
Registered: Aug 2007
Posts: 6

Rep: Reputation: 0
The tomcat service not run. Please check the install logs to verify tomcat is install correct.
 
Old 08-06-2007, 03:15 AM   #5
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,881

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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
 
Old 08-06-2007, 03:53 AM   #6
brave heart
Member
 
Registered: Mar 2007
Distribution: Fedora-14
Posts: 155
Blog Entries: 8

Original Poster
Rep: Reputation: 15
bathory&mehxh1979:

Thanks for your help!


To bathory:

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

Thanks,
 
Old 08-06-2007, 04:12 AM   #7
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,881

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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.
 
Old 08-06-2007, 08:21 PM   #8
brave heart
Member
 
Registered: Mar 2007
Distribution: Fedora-14
Posts: 155
Blog Entries: 8

Original Poster
Rep: Reputation: 15
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.
 
Old 08-07-2007, 02:58 AM   #9
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,881

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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.
 
Old 08-07-2007, 05:40 AM   #10
brave heart
Member
 
Registered: Mar 2007
Distribution: Fedora-14
Posts: 155
Blog Entries: 8

Original Poster
Rep: Reputation: 15
Hi, bathory

Really thanks for your kindly help,

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?
 
Old 08-07-2007, 06:43 AM   #11
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,881

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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?
 
Old 08-07-2007, 08:14 PM   #12
brave heart
Member
 
Registered: Mar 2007
Distribution: Fedora-14
Posts: 155
Blog Entries: 8

Original Poster
Rep: Reputation: 15
Yes, the default example jsp page works.

I got a "HTTP Status 500 -" result for other jsp page.
 
Old 08-08-2007, 02:03 AM   #13
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,881

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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
 
Old 08-08-2007, 03:44 AM   #14
brave heart
Member
 
Registered: Mar 2007
Distribution: Fedora-14
Posts: 155
Blog Entries: 8

Original Poster
Rep: Reputation: 15
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,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache-tomcat and jakarta-tomcat shifter Programming 1 07-28-2007 10:36 PM
How to make Tomcat 4.0.1 and Tomcat 5.0.28 coexist in one server? g18397 Linux - Software 0 05-16-2006 03:16 AM
Tomcat Status 404 issue FirmbIT Linux - Software 18 04-22-2006 10:30 AM
Tomcat Issue varunbihani Linux - General 0 12-06-2004 05:35 AM
TOMCAT init script not working on startup -- tomcat 4.x / Mandrake Linux 8.0 jmartinph Mandriva 0 03-08-2004 01:31 AM


All times are GMT -5. The time now is 08:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration