• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trouble running tomcat on Ubuntu Linux.

 
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello there,

Having trouble running tomcat on Ubuntu Linux 7.0.4.

I installed tomcat under:

/home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25

Created the CATALINA_HOME system environmental variable inside my .profile directory.

When I try to run TOMCAT, this is what I get:



This file (catalina.sh) is obviously located in the right directory...

When I try to run this file, this is what I get:



My CLASSPATH is set as:



What am I possibly doing wrong?

Happy programming,

Unnsse
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look inside the file /home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25/bin/catalina.sh and find out what it is doing with the BASEDIR variable.

Is CATALINA_HOME set correctly? What do you get if you type:

echo $CATALINA_HOME
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A quick way to rule out any typos in your environment variable is to use either the cd or ls command:



If neither of those work, you know you've got it wrong.

Also, unless you're trying to run more than one instance of Tomcat from the same codebase, there is no need to explicitly set the CATALINA_HOME environment variable. You only need to set JAVA_HOME or JRE_HOME.
startup.sh will set the CATALINA_HOME variable for you.
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jesper & Ben,

Thanks for the responses!

There are not any typos...



Or:



Now, I thought it was a permissions things so inside the bin directory, I conducted a chmod + x *.sh:



When I try to run Tomcat, this is what I get:



Contents of startup.sh:



Contents of setclasspath.sh:



I am getting the BASEDIR problem in both OS X Tiger and Ubuntu 7.0.4...

When I googled, this problem, it seems as if a bunch of people were experiencing this but there was no solutions?!

See the search results (from Google) here.

This is really frustrating!

In the past five years, I've never experienced a problem that seems so simple to solve but something that just comes out of the box (when one downloads and unzips Tomcat from http://tomcat.apache.org)!?

With thanks,

Unnsse
 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the following command print on the console?

env

rgds,
tualha
 
Unnsse Khan
Ranch Hand
Posts: 511
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I actually got it working...

What it was is that after you set the system environmental variable, you are supposed to start tomcat by manually issuing the entire path, instead of issuing it from $CATALINA_HOME.

So, for example, if $CATALINA_HOME is set to /usr/local/tomcat/

instead of trying to run it from the command line by issuing:

sh $CATALINA_HOME/bin/startup.sh

One should do it manually:

cd /usr/local/tomcat
/usr/local/tomcat $ sh startup.sh

And wa la! You'll see:

Using CATALINA_BASE: /usr/local/tomcat/
Using CATALINA_HOME: /usr/local/tomcat/
Using CATALINA_TMPDIR: /usr/local/tomcat/
Using JRE_HOME:
/System/Library/frameworks/JavaVM.framework/Versions/1.5.0/Home

After doing this once, $CATALINA_HOME works...

Got it working in both Linux and OS X...

Cheers,

Unnsse
[ October 12, 2007: Message edited by: Unnsse Khan ]
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
do chmod +x catalina.sh
chmod +x startup.sh
and same for all .sh files in the tomcat bin dir it will work
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
chmod +x *.sh will do the trick.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Unnsse Khan wrote:Hello there,

Having trouble running tomcat on Ubuntu Linux 7.0.4.

I installed tomcat under:

/home/untz/DevTools/Java/tomcat/apache-tomcat-5.5.25

Created the CATALINA_HOME system environmental variable inside my .profile directory.

When I try to run TOMCAT, this is what I get:



This file (catalina.sh) is obviously located in the right directory...

When I try to run this file, this is what I get:



My CLASSPATH is set as:



What am I possibly doing wrong?

Happy programming,

Unnsse



Hehe I get this:

something in the path is wonky.. but the server seems to start fine.
 
Saloon Keeper
Posts: 27808
196
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
https://coderanch.com/how-to/java/DontWakeTheZombies

You are going to confuse everyone. Whatever the original problem was in this thread, it was long enough ago that your problem is not likely to be the same thing.

We do not charge extra for starting your own message thread. In fact, we encourage it!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic