LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2012, 01:41 PM   #1
Whatif
Member
 
Registered: Nov 2010
Distribution: VectorLinux
Posts: 87

Rep: Reputation: 0
tomcat 7 server not found


Hello

I have been trying to get tomcat up and running with no success. Recently, I installed CentOS 6.3 as a development workstation. Both java and tomcat were installed. Java is working but I tried to get tomcat to work with no sucess. I was advice to download the jar.gz of tomcat7 and I did. I used tar zxvf filename, it extracted successfully. I moved to the apache-tomcat-7.0.33 directory and then issued bin/startup.sh, it displayed the following output:

Using CATALINA_BASE : /server/apache-tomcat-7.0.33
Using CATALINA_HOME: /server/apache-tomcat-7.0.33
Using CATALINA_TMPDIR: /server/apache-tomcat-7.0.33/tmp
Using JRE_HOME : /usr/bin/java
CLASSPATH : /server/apache-tomcat-7.0.33/bin/bootstrap.jar:/server/apache-tomcat-7.0.33/bin/tomcat-juli.jar

I then opened firefox and typed http://localhost:8080 , I got server not foud. What am I doing wrong?

Note : while attempting to get tomcat 6 to work, which was installed with CentOS, I add export JAVA_HOME=/usr/bin/java to .bash_profile after I ran which java and it displayed /usr/bin/java

Thanks in advance
 
Old 12-14-2012, 02:59 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,738

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Quote:
I then opened firefox and typed http://localhost:8080 , I got server not foud. What am I doing wrong?
Most likely the server is not running. Check catalina.out to see what's going wrong. If you've installed tomcat under /server/apache-tomcat-7.0.33, you can run:
Code:
tail -f /server/apache-tomcat-7.0.33/logs/catalina.out
in a terminal, while trying to start tomcat from another one and watch the tail output for errors.

Regards
 
Old 12-14-2012, 03:16 PM   #3
Whatif
Member
 
Registered: Nov 2010
Distribution: VectorLinux
Posts: 87

Original Poster
Rep: Reputation: 0
output from tail -f /server/apache-tomcat-7.0.33/logs/catalina.out is

/server/apache-tomcat-7.0.33/logs/catalina.out : line 389 : /usr/bin/java/bin/java : Not a directory

When I type bin/startup.sh in the other terminal, it displayed

/server/apache-tomcat-7.0.33/logs/catalina.sh : line 389 : /usr/bin/java/bin/java : Not a directory

Last edited by Whatif; 12-14-2012 at 03:35 PM.
 
Old 12-14-2012, 03:56 PM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,738

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
I'm not familiar with Centos, but from what I've read you need to set the JAVA_HOME to one of the following
Code:
/usr/java/jrex.yz
/usr/java/jdk.x.y.z
It depends on whether you've installed jre or jdk (where x.y.z is the version)
 
Old 12-14-2012, 06:46 PM   #5
Whatif
Member
 
Registered: Nov 2010
Distribution: VectorLinux
Posts: 87

Original Poster
Rep: Reputation: 0
/usr/java doesn't exist. I searched inside the /usr and found what looks a candidate but it still it didn't work

/usr/lib/jvm/jre-1.6.0-openjdk/bin/java

I changed JAVA_HOME to export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk, it didn't work

and to export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk/bin, it also didn't work

Does the order of PATH, CLASSPATH, and JAVA_HOME matter? I have them in the following order, PATH, CLASSPATH, and JAVA_HOME
 
Old 12-15-2012, 02:26 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,738

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Quote:
/usr/lib/jvm/jre-1.6.0-openjdk/bin/java

I changed JAVA_HOME to export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk, it didn't work

and to export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk/bin, it also didn't work
Ah, you have openjdk. Then JAVA_HOME should be set to /usr/lib/jvm/re-1.6.0-openjdk (don't put /bin at the end)


Quote:
Does the order of PATH, CLASSPATH, and JAVA_HOME matter? I have them in the following order, PATH, CLASSPATH, and JAVA_HOME
Nope
 
Old 12-15-2012, 10:18 AM   #7
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
/server/apache-tomcat-7.0.33/logs/catalina.out : line 389 : /usr/bin/java/bin/java : Not a directory
I Guess you have not set java_home path properly.Determine java_home path in your .bashrc file.Look after the article

https://access.redhat.com/knowledge/...ring_Java.html

Last edited by jsaravana87; 12-15-2012 at 10:23 AM.
 
  


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
how to start mysql server & apache server at startup and then tomcat at last at boot sanjay87 Linux - Server 5 06-16-2012 08:19 AM
[SOLVED] tomcat error -SEVERE: Cannot start server. Server instance is not configured jsaravana87 Linux - Server 1 08-11-2011 11:57 AM
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
URGENT!!! (apxs not found) Integrating Apache & Tomcat on RedHatLinux AS 4 amitkanodia Linux - General 5 12-01-2005 10:43 AM
worket not found error on tomcat/apahce mattg Linux - Software 1 11-14-2003 09:04 AM


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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration