• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Tomcat installation on Linux.. need help..

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I had earlier version of Tomcat (3.x.x) on SuSe 7.2 with JDK 1.2.2. It was working well.
Recently, I installed Tomcat 4.0.1. The Rel notes said I can use JDK 1.2 or above. Since JDK 1.3 is very huge to download (~20 MB) and my modem speed is only 56K, I decided to stick with JDK 1.2.2.
All I did was get the tar.gz file from Tomcat site, unzip, set JAVA_HOME and CATALINA_HOME and run startup.sh
When I run startup.sh, it looked as if it ran OK (ie. gave the three line message: using <..> as JAVA_HOME, using <..> as CATALINA_HOME, etc.)
But when I tried to connect with:
http://localhost:8080, it gave an error (can not connect to the host...)
Then I looked into the log file $CATALINA_HOME/logs/catalina.log.
There seem to be some class not found errors for classes under org.apache.catalina.core.
My questions are:
1. Did I miss any set up step pointing CLASSPATH to some of the Tomcat libraries? I do not see any lib directory directly under CATALINA_HOME.
2. Is it a JDK version problem? The relese notes said JDK 1.2 and above should work.
Please someone tell me if I am doing something wrong?
Thanks.
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There should a lib directory. Are you sure that you extracted everything from the zip file?
 
Saloon Keeper
Posts: 28654
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's possible that the docs are out of date. I think that jdk 1.4 is now the latest Sun production version, anyway.
On the other hand, if the class not found exceptions were for classes whose names started with "org.apache", you probably don't have your classpath setup properly and you might want to read up on the appropriate Tomcat docs.
BTW, if you have any intentions of writing Swing apps, upgrade to JDK 1.3 or later een if you have to do it one chunk at a time over a week or more. 1.2 had more Swing bugs than a roach picnic.
 
Merlin M Koppula
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your replies.
I now 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?
Please help..
 
Tim Holloway
Saloon Keeper
Posts: 28654
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This thread is cross-posted in the Linux forum :roll:
 
Merlin M Koppula
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If anyone had similar problems with Tomcat installation on SuSe linux, please post here.
I also get segment violation error when I try to shut down (does this happen if I try to shutdown when it is not actually running?)
I initially posted my question in Linux forum also hoping that some Linux developer might have encountered similar issue and solved it. But till now, no luck.
I greatly appriciate your help.
 
Merlin M Koppula
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I narrowed down the error in startup.sh and catalina.sh and found that I was getting a Segmentation fault error when the script is trying to run the actual java program
org.apache.catalina.startup.Bootstrap with one argument "start"
The actual line that is being executed is below:
/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
I was able to run other java programs with the JDK that I installed (at /usr/lib/java). So, I think it is not a problem with the Java installation.
Is the script passing the right arguments to the Java program? The only argument that is being passed in the script is "start"?
Any help is appriciated..
 
Tim Holloway
Saloon Keeper
Posts: 28654
211
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try doing a "ulimit -s 1024" before starting the server.
That usually cures segfaults.
 
Merlin M Koppula
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I downloaded jsdk1.4.0 and it is working now. For some reason, Tomcat 4.0 gives a segment fault error with jdk1.3.02.
Tim, I checked the value of ulimit before. It was already unlimited. I also tried with 2048. So, I didn't think that was the problem.
Thank you every one
 
reply
    Bookmark Topic Watch Topic
  • New Topic