2
votes

I manually installed tomcat7.

It runs on terminal (tomcat started).

But when I try to run it on browser(localhost:8080), page html appears.

I can't find where is the problem

java version "1.7.0_79" OpenJDK Runtime Environment (IcedTea 2.5.5) (7u79-2.5.5-0ubuntu0.14.04.2) OpenJDK Server VM (build 24.79-b02, mixed mode)

Using CATALINA_BASE: /opt/tomcat/

Using CATALINA_HOME: /opt/tomcat/

Using CATALINA_TMPDIR: /opt/tomcat//temp

Using JRE_HOME: /usr/lib/jvm/java-1.7.0-openjdk-i386

Using CLASSPATH:
/opt/tomcat//bin/bootstrap.jar:/opt/tomcat//bin/tomcat-juli.jar Tomcat started.

Thank you

6
are you sure you are hitting tomcat on the right port?MaVRoSCy
locate Locate server.xml in {Tomcat installation folder $CATALINA_HOME}\ conf \ and see Connector element port value, something like '<Connector port="8080" ... 'MaVRoSCy
in case you want to see more on the terminal when tomcat starts, don't use startup.sh, rather use catalina.sh run. This will show the actual log in the foreground. In addition, you say you see a html page - it might be delivered by tomcat, just not of the webapplication that you expect?Olaf Kock

6 Answers

4
votes

If any error occur during tomcat startup time then that tomcat error is not shown on ubuntu terminal. So you need to check log file from following location.

{tomcat path}/logs/catalina.{date}.log

{tomcat path} = tomcat install path.
{date} = log of date.

0
votes

Check if the JAVA Environment is set properly; It needs Java to be running on the box.

0
votes

Check for these details :

1) Tomcat is running on which port

a) Check through netstat command if you know tomcat's PID : For example, I can see the PID of my tomcat is 1483. So using,

$ sudo netstat -lnp | grep 1483 I can see on which port it is running / using.

b) Inside tomcat : Check for this line in server.xml under conf directory inside tomcat :
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

2) Check whether you have enabled Proxy settings in browser.

3) Check whether you can access it via localhost or ip address or machine name. e.g. http://localhost:8080 , http://pc-name:8080, http://192.168.1.1:8080

4) Lastly, check for firewall / iptables and if possible, disable it temporarily and then try again or add in exceptions in firewall.

0
votes

Check your download version of tomcat. if you open your extracted tomcat file folder,you must see log folder. else it's may be you install apache-tomcat-src.tar.gz. if your file path shows src, its not give you a log file. so delete tomcat folder and download apache-tomcat-8.tar.gz correct file. now install it.

0
votes

Apache tomcat8.0.27 and lower does not work in jdk 9 change it to lower version. As of oct 2018. Results may change for updated version of tomcat.

0
votes

Ok, now this may sound silly, but this problem occurred with me also. After a lot of brainwork, I came to this solution.

just add sudo before ./startup.sh

Start tomcat server by the following command from the Tomcat bin directory as:

$ sudo ./startup.sh

Hope this helps.