wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tomcat installation on Linux.. Please help.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tomcat installation on Linux.. Please help.." Watch "Tomcat installation on Linux.. Please help.." New topic
Author

Tomcat installation on Linux.. Please help..

Merlin M Koppula
Ranch Hand

Joined: Jan 18, 2002
Posts: 69
I have SuSe Linux 7.2
I downloaded JDK 1.3.1_02 and Tomcat 4.02.
I set the paths accordingly for JAVA_HOME and CATALINA_HOME.
Set CLASSPATH to $JAVA_HOME/lib/tools.jar:$CATALINA_HOME/common/lib/servlet.jar
When I started Tomcat using startup.sh, I do not get any error messages. It gives the usual startup messages. Also, there are no messages loged in $CATALINA_HOME/logs/catalina.log.
Does it mean that Tomcat has started?
However, when I try to connect to http://localhost:8080 I get the error: cannot connect to host 8080.
1. How do I know if Tomcat has started. Which Linux processes does it kick off? What should I see in ps -ef?
2. I installed Tomcat and run startup.sh as my own userid. Do I need to startup as specific user?
3. Am I missing something in CLASSPATH?
Please help..


MM Koppula<br />SCJP2<br />Object Oriented Analysis and Design with UML (IBM)
Roopa Bagur
Ranch Hand

Joined: Nov 03, 2000
Posts: 267
you might want to wait a few minutes for the server to start.. I installed Tomcat on RedHat Linux7.2 . When ever I start the server it takes nearly 2 to 3 minutes for it to run..
Originally posted by Merlin M Koppula:
I have SuSe Linux 7.2
I downloaded JDK 1.3.1_02 and Tomcat 4.02.
I set the paths accordingly for JAVA_HOME and CATALINA_HOME.
Set CLASSPATH to $JAVA_HOME/lib/tools.jar:$CATALINA_HOME/common/lib/servlet.jar
When I started Tomcat using startup.sh, I do not get any error messages. It gives the usual startup messages. Also, there are no messages loged in $CATALINA_HOME/logs/catalina.log.
Does it mean that Tomcat has started?
However, when I try to connect to http://localhost:8080 I get the error: cannot connect to host 8080.
1. How do I know if Tomcat has started. Which Linux processes does it kick off? What should I see in ps -ef?
2. I installed Tomcat and run startup.sh as my own userid. Do I need to startup as specific user?
3. Am I missing something in CLASSPATH?
Please help..
Merlin M Koppula
Ranch Hand

Joined: Jan 18, 2002
Posts: 69
doesn't seem to help..
Roopa Bagur
Ranch Hand

Joined: Nov 03, 2000
Posts: 267
One other problem I had was that I had to create a shell script to set the variables & then call the startup.sh file from the script itself..
If I try to set the variables form the command prompt I had problems..
Try creating the variables & calling the startup.sh from a script & run the script from the command line.. See what happens..
By the way are you seeing any messages on your command window?
Roopa.
Originally posted by Merlin M Koppula:
doesn't seem to help..
Roopa Bagur
Ranch Hand

Joined: Nov 03, 2000
Posts: 267
Do you know if jdk 1.3.1_02 is a stable release. If not you might want to get the latest which is JDK 1.4 .
I have heard that beta versions of java usually cause problems
Originally posted by Merlin M Koppula:
doesn't seem to help..
Merlin M Koppula
Ranch Hand

Joined: Jan 18, 2002
Posts: 69
Roopa,
Thank you for your replies..
Here is the problem:
I digged into the shell scripts and found that the startup script actually sets the environment variables and calls the script catalina.sh. Again, catalina.sh sets some more variables and finally invokes the Java program
org.apache.catalina.startup.Bootstrap with argument "start".
But, in the script, the java program is redirecting all the output and error into catalina.out and trying to run the program in the background. So, I was not seeing any of the errors in the screen. Any segment fault errors are not captured in the log file.
I echoed all the variable values right before the Java program to see what parameters and arguments are passed to the Java program and tried to run the program in the foreground. Then I noticed that there is infact a Segmentation fault error as soon as the script is trying to run the Java program.
Here is the actual Java program that is being run with all the arguments. Please see and compare with how it is being run on you installation. Please tell me the actual parameters and arguments that are being passed on your installation for the Java program: org.apache.catalina.startup.Bootstrap
Here is the Java program with all the arguments on my system:
/usr/lib/java/bin/java
-Djava.endorsed.dirs="/home/koppula/jakarta-tomcat-4.0.2/bin:/home/koppula/jakarta-tomcat-4.0.2/common/lib"
-classpath "/usr/lib/java/lib/tools.jar:/home/koppula/jakarta-tomcat-4.0.2/common/lib/servlet.jar:/home/koppula/jakarta-tomcat-4.0.2/bin/bootstrap.jar"
-Dcatalina.base="/home/koppula/jakarta-tomcat-4.0.2" \
-Dcatalina.home="/home/koppula/jakarta-tomcat-4.0.2" \
-Djava.io.tmpdir="/home/koppula/jakarta-tomcat-4.0.2/temp" \
org.apache.catalina.startup.Bootstrap start
Please see if I am missing anything..
I think it is not a problem with my Java installation. Because I am able to run other Java programs with my JDK. I did not install JDK 1.4 because it is about 40 MB and I can not download with my 56K modem.
I greatly appriciate your help.
Merlin M Koppula
Ranch Hand

Joined: Jan 18, 2002
Posts: 69
Roopa,
JDK upgrade did the trick. I downloaded jsdk1.4 (few hours of download) and it worked right away!
Thank you for your help
Two more questions..
1. Did you setup https (SSL)? If you did, can tell me the steps that you followed?
2. Are you serving static pages thru Apache? How about SSL on Apache?
Thank you.
 
 
subject: Tomcat installation on Linux.. Please help..