Tuesday, November 16, 2021

[SOLVED] Tomcat8 show "web page is not available"

Issue

http://oracle-base.com/articles/linux/apache-tomcat-8-installation-on-linux.php

I've followed all the steps in the above link to set up my tomcat 8. Till the part where my url should be available but its not. I've checked the status of tomcat. First, $ netstat -nlp | grep 8080

tcp        0      0 :::8080                     :::*                                  LISTEN      12621/java

Secondly,$ ps -ef | grep tomcat

root     12030 11718  0 14:05 pts/0    00:00:00 su - tomcat8
tomcat8  12031 12030  0 14:05 pts/0    00:00:00 -bash
root     12246 12211  0 14:25 pts/1    00:00:00 su - tomcat8
tomcat8  12247 12246  0 14:25 pts/1    00:00:00 -bash
tomcat8  12621     1  4 15:00 pts/1    00:00:05 /home/tomcat8/jdk1.8.0_45/bin/java -Djava.util.logging.config.file=/home/tomcat8/apache-tomcat-8.0.21/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/home/tomcat8/apache-tomcat-8.0.21/endorsed -classpath /home/tomcat8/apache-tomcat-8.0.21/bin/bootstrap.jar:/home/tomcat8/apache-tomcat-8.0.21/bin/tomcat-juli.jar -Dcatalina.base=/home/tomcat8/apache-tomcat-8.0.21 -Dcatalina.home=/home/tomcat8/apache-tomcat-8.0.21 -Djava.io.tmpdir=/home/tomcat8/apache-tomcat-8.0.21/temp org.apache.catalina.startup.Bootstrap start
tomcat8  12674 12247  6 15:02 pts/1    00:00:00 ps -ef
tomcat8  12675 12247  0 15:02 pts/1    00:00:00 grep tomcat

third,$curl -I http://localhost:8080

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Wed, 15 Apr 2015 07:04:40 GMT

So is my tomcat running? if it is why doesn't it show url? what should I do?

I'm running linux redhat, using jdk1.8.0_45 and apache-tomcat-8.0.21.

15-Apr-2015 15:00:24.548 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.21
15-Apr-2015 15:00:24.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Mar 23 2015 14:11:21 UTC
15-Apr-2015 15:00:24.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.21.0
15-Apr-2015 15:00:24.552 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
15-Apr-2015 15:00:24.553 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            2.6.32-358.el6.x86_64
15-Apr-2015 15:00:24.554 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
15-Apr-2015 15:00:24.554 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /home/tomcat8/jdk1.8.0_45/jre
15-Apr-2015 15:00:24.555 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_45-b14
15-Apr-2015 15:00:24.555 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
15-Apr-2015 15:00:24.556 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /home/tomcat8/apache-tomcat-8.0.21
15-Apr-2015 15:00:24.556 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /home/tomcat8/apache-tomcat-8.0.21
15-Apr-2015 15:00:24.558 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/tomcat8/apache-tomcat-8.0.21/conf/logging.properties
15-Apr-2015 15:00:24.560 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
15-Apr-2015 15:00:24.560 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=/home/tomcat8/apache-tomcat-8.0.21/endorsed
15-Apr-2015 15:00:24.561 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/tomcat8/apache-tomcat-8.0.21
15-Apr-2015 15:00:24.561 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/home/tomcat8/apache-tomcat-8.0.21
15-Apr-2015 15:00:24.562 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/tomcat8/apache-tomcat-8.0.21/temp
15-Apr-2015 15:00:24.562 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /u0/oracle/product/11.2.0/dbhome_1/lib:/u0/oracle/product/11.2.0/dbhome_1/rdbms/lib:/u0/oracle/product/11.2.0/dbhome_1/jdbc:/usr/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
15-Apr-2015 15:00:24.828 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
15-Apr-2015 15:00:24.864 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
15-Apr-2015 15:00:24.868 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
15-Apr-2015 15:00:24.871 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
15-Apr-2015 15:00:24.876 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1245 ms
15-Apr-2015 15:00:24.914 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
15-Apr-2015 15:00:24.915 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.21
15-Apr-2015 15:00:24.964 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive /home/tomcat8/apache-tomcat-8.0.21/webapps/sample.war
15-Apr-2015 15:00:25.569 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive /home/tomcat8/apache-tomcat-8.0.21/webapps/sample.war has finished in 603 ms
15-Apr-2015 15:00:25.570 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/ROOT
15-Apr-2015 15:00:25.613 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/ROOT has finished in 43 ms
15-Apr-2015 15:00:25.613 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/examples
15-Apr-2015 15:00:26.180 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/examples has finished in 567 ms
15-Apr-2015 15:00:26.180 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/host-manager
15-Apr-2015 15:00:26.226 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/host-manager has finished in 45 ms
15-Apr-2015 15:00:26.226 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/manager
15-Apr-2015 15:00:26.272 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/manager has finished in 46 ms
15-Apr-2015 15:00:26.272 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/docs
15-Apr-2015 15:00:26.306 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory /home/tomcat8/apache-tomcat-8.0.21/webapps/docs has finished in 34 ms
15-Apr-2015 15:00:26.312 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
15-Apr-2015 15:00:26.323 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
15-Apr-2015 15:00:26.325 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1449 ms

Solution

Unless otherwise configured, your deployed webapp sample.war should be available under:

http://localhost:8080/sample



Answered By - frhd