LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-21-2009, 01:33 AM   #1
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Rep: Reputation: 0
Unhappy cannot get tomcat to run successfully - various errors


ok so here's the latest error i am getting

Code:
 tomcat5 start
Found JAVA_HOME: /usr/bin/..
Please complete your /etc/tomcat5/tomcat5.conf so we won't have to look for it next time
Using CATALINA_BASE:   /usr
Using CATALINA_HOME:   /usr
Using CATALINA_TMPDIR: /usr/temp
Using JRE_HOME:       
touch: cannot touch `/usr/logs/catalina.out': No such file or directory
/usr/bin/dtomcat5: line 331: /usr/logs/catalina.out: No such file or directory
here's my tomcat5.conf with comments and unnecessary stuff removed

Code:
JAVA_HOME="/usr/java/jdk1.6.0_16/"

# Where your tomcat installation lives
# That change from previous RPM where TOMCAT_HOME
# used to be /var/tomcat.
# Now /var/tomcat will be the base for webapps only
CATALINA_HOME="/usr/share/tomcat5"
JASPER_HOME="/usr/share/tomcat5"
CATALINA_TMPDIR="/usr/share/tomcat5/temp"
JAVA_ENDORSED_DIRS="/usr/share/tomcat5/common/endorsed"
# Bug 190:
# https://www.jpackage.org/bugzilla/show_bug.cgi?id=190
# System property catalina.ext.dirs should be set to its default value
# for ExtensionValidator to be functional.
JAVA_OPTS="$JAVA_OPTS -Dcatalina.ext.dirs=$CATALINA_HOME/shared/lib:$CATALINA_HOME/common/lib"

# What user should run tomcat
TOMCAT_USER="tomcat"

# You can change your tomcat locale here
#LANG=en_US

# Time to wait in seconds, before killing process
SHUTDOWN_WAIT=30

# Set the TOMCAT_PID location
CATALINA_PID=/var/run/tomcat5.pid

# Connector port is 8080 for this tomcat5 instance
CONNECTOR_PORT=8080
here are the echos for specific variables

Code:
[user]# echo $JAVA_HOME
/usr/java/jdk1.6.0_16/
[user]# echo $JRE_HOME
/usr/java/jdk1.6.0_16/jre
[user]# which java
/usr/java/jdk1.6.0_16/bin/java
[user]# java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
how can i fix this error? ive been struggling with research and trying to get poeple to help me but its very overwhelming at this point. i would appreciate any help.
 
Old 08-21-2009, 03:56 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,403

Rep: Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725
Quote:
touch: cannot touch `/usr/logs/catalina.out': No such file or directory
/usr/bin/dtomcat5: line 331: /usr/logs/catalina.out: No such file or directory
How did you install tomcat, because it picks the wrong CATALINA_HOME (/usr)? It looks like there is no /usr/log directory and/or the user that runs tomcat does not have write permissions to that dir.

Last edited by bathory; 08-21-2009 at 04:02 AM.
 
Old 08-21-2009, 10:10 AM   #3
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
i installed it using yum, and im pretty sure it is not exporting the dtomcat5 file because th epaths in there are correct
 
Old 08-21-2009, 03:48 PM   #4
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by nullp0inter
here's my tomcat5.conf with comments and unnecessary stuff removed
Where does the config file you posted live, exactly? Because tomcat does not appear to be reading it. (Either you have the config file in a wrong location, or the tomcat user doesn't have permissions to access it.)

-------

Also: what distro/version are you working on?
 
Old 08-21-2009, 11:44 PM   #5
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by anomie View Post
Where does the config file you posted live, exactly? Because tomcat does not appear to be reading it. (Either you have the config file in a wrong location, or the tomcat user doesn't have permissions to access it.)

-------

Also: what distro/version are you working on?
/usr/bin/dtomcat5 <-- it is a file not a dir


and I am on fedora 9
 
Old 08-22-2009, 08:44 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,403

Rep: Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725
It looks like the startup script does not read /etc/tomcat5/tomcat5.conf, or for some reason the env. variables are not passed to the script. Perhaps defining CATALINA_HOME in /usr/bin/dtomcat5 could be of help.
Add
Code:
export CATALINA_HOME=/usr/share/tomcat5
at the beginning of /usr/bin/dtomcat5 and see if it helps.
 
Old 08-22-2009, 11:08 AM   #7
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
It looks like the startup script does not read /etc/tomcat5/tomcat5.conf, or for some reason the env. variables are not passed to the script. Perhaps defining CATALINA_HOME in /usr/bin/dtomcat5 could be of help.
Add
Code:
export CATALINA_HOME=/usr/share/tomcat5
at the beginning of /usr/bin/dtomcat5 and see if it helps.
SUCCESS, thank you so much to everyone that helped!
 
Old 08-22-2009, 12:09 PM   #8
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
spoke too fast.

theres no welcome page when i navigate to port 8080 with a browser
 
Old 08-22-2009, 12:48 PM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,403

Rep: Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725
Quote:
Originally Posted by nullp0inter View Post
spoke too fast.

theres no welcome page when i navigate to port 8080 with a browser
What do you see instead? Take a look at catalina.out for hints
And check if you have $CATALINA_HOME/webapps and $CATALINA_HOME/webapps/ROOT directories.
 
Old 08-22-2009, 01:11 PM   #10
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
What do you see instead? Take a look at catalina.out for hints
And check if you have $CATALINA_HOME/webapps and $CATALINA_HOME/webapps/ROOT directories.
Code:
Aug 22, 2009 2:08:28 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_16/jre/lib/i386/client:/usr/java/jdk1.$


Aug 22, 2009 2:08:28 PM org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Aug 22, 2009 2:08:28 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 571 ms
Aug 22, 2009 2:08:28 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Aug 22, 2009 2:08:28 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.27
Aug 22, 2009 2:08:29 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Aug 22, 2009 2:08:29 PM org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Aug 22, 2009 2:08:29 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Aug 22, 2009 2:08:29 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16  config=null
Aug 22, 2009 2:08:29 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Aug 22, 2009 2:08:29 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 481 ms
I think that first part is the problem.
 
Old 08-22-2009, 01:32 PM   #11
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,403

Rep: Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725
It's just an info message, not an error. In fact tomcat starts normally. If you want, you can d/l native from here and compile it yourself.
I guess you miss the ROOT directory, or it's somewhere else, considering the fact that the package you used does not define the correct CATALINA_HOME.
Does http://x.x.x.x:8080/jsp-examples/ works?

Last edited by bathory; 08-22-2009 at 01:42 PM.
 
Old 08-22-2009, 04:08 PM   #12
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
It's just an info message, not an error. In fact tomcat starts normally. If you want, you can d/l native from here and compile it yourself.
I guess you miss the ROOT directory, or it's somewhere else, considering the fact that the package you used does not define the correct CATALINA_HOME.
Does http://x.x.x.x:8080/jsp-examples/ works?
that link does not work, and for some reason there was no ROOT dir in the webapps dir.
 
Old 08-22-2009, 04:35 PM   #13
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,403

Rep: Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725Reputation: 1725
I just visited jpackage.org, from where it seems that you got the tomcat package you have installed. You need to d/l also the webapps package.
Maybe you need also some other packages to eliminate the error you faced with the wrong CATALINA_HOME.
 
Old 08-23-2009, 04:08 PM   #14
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
I just visited jpackage.org, from where it seems that you got the tomcat package you have installed. You need to d/l also the webapps package.
Maybe you need also some other packages to eliminate the error you faced with the wrong CATALINA_HOME.
i installed those but still nothing.
 
Old 08-23-2009, 04:24 PM   #15
nullp0inter
LQ Newbie
 
Registered: Aug 2009
Posts: 13

Original Poster
Rep: Reputation: 0
solved it. I am running an EC2 instance(which I failed to mention) and I had to enable to port in the security group through the AWS console. What a trip. Thanks for the help!
 
  


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
Tomcat Errors Tyler_H72 Linux - Server 12 07-31-2008 05:14 PM
Successfully Compiled Program has Symbol Lookup Errors Kenji Miyamoto Programming 2 02-07-2006 02:32 PM
Why only root can successfully run startx alxnihon Mandriva 4 04-27-2004 08:55 AM
Who can successfully run Azureus ? I really go mad.... preswang Linux - Software 6 04-07-2004 06:51 AM
Anyone run endnote using wine successfully? moonsun Linux - Software 0 05-01-2003 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:36 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