I have downloaded apache-tomcat-7.0.65.tar.gz from here.

I extracted, and started using startup.sh as follows

arul@arul-pc:~$ chmod +x /usr/local/apache-tomcat-7.0.65/bin/startup.sh 
arul@arul-pc:~$ cd /usr/local/apache-tomcat-7.0.65/bin/
arul@arul-pc:/usr/local/apache-tomcat-7.0.65/bin$ ./startup.sh 
Using CATALINA_BASE:   /usr/local/apache-tomcat-7.0.65
Using CATALINA_HOME:   /usr/local/apache-tomcat-7.0.65
Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.65/temp
Using JRE_HOME:        /usr/bin
Using CLASSPATH:       /usr/local/apache-tomcat-   7.0.65/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.65/bin/tomcat-juli.jar
Tomcat started.

But, when I tried to open in browser using http://localhost:8080/ am getting an error connection refused.

webpage is not available

How to solve this?


Result, for ps -ef | grep java

arul@arul-pc:~$ ps -ef | grep java
arul      4404  4373  0 11:04 pts/2    00:00:00 grep --color=auto java



arul@arul-pc:~$ which java
arul@arul-pc:~$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
arul@arul-pc:~$ cd /usr/local/apache-tomcat-7.0.65/logs/
arul@arul-pc:/usr/local/apache-tomcat-7.0.65/logs$ ls

And when I open catalina.out,

/usr/bin/bin/java: not found

  • did you check application process is running or not with given port ? what does the log file say ? – PKumar Oct 21 '15 at 10:06
  • how to check it ? arul@arul-pc:~$ netstat -a | grep 8080 when I try this no response... – A J Oct 21 '15 at 10:08
  • $sudo netstat -a | grep 8080 if it do not show any result then for java ps -ef | grep java process – PKumar Oct 21 '15 at 14:09
  • @PKumar, I updated the result for ps -ef | grep java in question, please take a look – A J Oct 27 '15 at 5:37
  • Java process is not running before starting tomcat run this commands which java and java -version then check the log files must be located in /usr/local/apache-tomcat-7.0.65/log – PKumar Oct 27 '15 at 7:36

Tomcat runs java by creating a _RUNJAVA variable in setclasspath.sh. This is made up by appending /bin/java to the JRE_HOME environment variable. Your JRE_HOME is currently set to /usr/bin. So you need to modify the JRE_HOME to be /usr instead.

You can override it for the startup.sh script by prepending it like so:

JRE_HOME=/usr ./startup.sh

If you want to modify the JRE_HOME permanently across the system add it to, or edit /etc/environment.

| improve this answer | |

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.