cannot get tomcat to run successfully - various errors
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.)
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.)
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.
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!
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.
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
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?
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.
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 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.
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!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.