Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Apache Tomcat 7 Essentials

You're reading from  Apache Tomcat 7 Essentials

Product type Book
Published in Mar 2012
Publisher Packt
ISBN-13 9781849516624
Pages 294 pages
Edition 1st Edition
Languages
Author (1):
Tanuj Khare Tanuj Khare
Profile icon Tanuj Khare

Table of Contents (18) Chapters

Apache Tomcat 7 Essentials
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
1. Preface
1. Installation of Tomcat 7 2. Configuration and Deployment 3. Performance Tuning 4. Integration of Tomcat with the Apache Web Server 5. Securing Tomcat 7 6. Logging in Tomcat 7 7. Troubleshooting in Tomcat 8. Monitoring and Management of Tomcat 7 9. Clustering in Tomcat 7 10. Tomcat Upgrade 11. Advanced Configuration for Apache Tomcat 7

Common problems and troubleshooting in installation


There are multiple issues which may arise during the installation of Tomcat 7. Let's discuss these issues:

Error: Permission denied for the Java binary

Scenario 1: The Java installation is not working, while executing the Java binary.

[root@localhost opt]# ./jdk-6u24-linux-i586.bin
-bash: ./jdk-6u24-linux-i586.bin: Permission denied

Issue: The Java binary doesn't have execute permissions with a specific user.

Fix: Change the permission to 0755 for ./jdk-6u24-linux-i586.bin using the following command:

chmod 0755 jdk-6u24-linux-i586.bin

Note

The chmod 0755 file is equivalent to u=rwx (4+2+1),go=rx (4+1 & 4+1). The 0 specifies no special modes.

Error: Tomcat is not able to find JAVA_HOME

Scenario 2: While starting the Tomcat startup script, the following error occurs:

[root@localhost bin]# ./startup.sh
Neither the JAVA_HOME nor the JRE_HOME environment variable is defined
At least one of these environment variables is needed to run this program

Fix: Check the .bash_profile and find out whether the following mentioned entry is present in the file:

JAVA_HOME=/opt/jdk1.6.0_24
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin
export PATH JAVA_HOME

Error: Error in the logs showing port already in use

Scenario 3: Tomcat services is not displayed after running startup.sh.

Issue: This service is already running on the server.

Fix: Check for any Java process running in the system using the following command in Linux:

Ps -ef |grep tomcat

This command will show all Tomcat processes. If any process is running on an OS, kill it and run the startup scripts again.

In Windows, go to the Task Manager and check if any Java process is running for Tomcat. If any process is running, then kill the process and restart the Tomcat services.

You have been reading a chapter from
Apache Tomcat 7 Essentials
Published in: Mar 2012 Publisher: Packt ISBN-13: 9781849516624
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime}