0

I manually started Apache Tomcat 6 via the command $CATALINA_HOME/bin/startup.sh and this is the result -

Using CATALINA_BASE: /home/getx/Desktop/apache-tomcat-6.0.37
Using CATALINA_HOME: /home/getx/Desktop/apache-tomcat-6.0.37
Using CATALINA_TMPDIR: /home/getx/Desktop/apache-tomcat-6.0.37/temp
Using JRE_HOME: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
Using CLASSPATH: /home/getx/Desktop/apache-tomcat-6.0.37/bin/bootstrap.jar

However, when I enter localhost:8080 in Firefox, nothing shows up.

It works when I run the command via sudo .

So I guessed it must be due to a permissions problem.

These are my permissions for my current user -

drwxr-xr-x 2 getx getx 4096 Jan 18 12:50 bin 
drwxr-xr-x 3 getx getx 4096 Jan 21 21:08 conf 
drwxr-xr-x 2 getx getx 4096 Jan 18 12:50 lib 
-rw-r--r-- 1 getx getx 37951 Apr 29 2013 LICENSE 
drwxr-xr-x 2 getx getx 4096 Jan 21 21:08 logs 
-rw-r--r-- 1 getx getx 558 Apr 29 2013 NOTICE 
-rw-r--r-- 1 getx getx 9188 Apr 29 2013 RELEASE-NOTES 
-rw-r--r-- 1 getx getx 16287 Apr 29 2013 RUNNING.txt 
drwxr-xr-x 2 getx getx 4096 Jan 18 12:50 temp 
drwxr-xr-x 7 getx getx 4096 Apr 29 2013 webapps 
drwxr-xr-x 3 getx getx 4096 Jan 21 21:08 work

1 Answer 1

1

I got to the root of the problem after viewing the Apache logs in $CATALINA_HOME/logs.

This was shown in the logs when I started Apache Tomcat -

/home/getx/Desktop/apache-tomcat-6.0.37/bin/catalina.sh: 373: /home/getx/Desktop/apache-tomcat-6.0.37/bin/catalina.sh: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin//bin/java: not found

It appears that Apache Tomcat mysteriously adds its own /bin/java.

Removing /bin/java from my $JAVA_HOME variable solved the issue.

Using /usr/lib/jvm/java-7-openjdk-amd64/ as the $JAVA_HOME variable worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.