Tomcat installation on AWS EC2 not showing page

aws
cloudcomputing
tomcat
ec2

#1

Hi Everyone,

I have installed Apache tomcat server on AWS ec2 Linux instance. Tomcat is up and running but webpage is not displaying? Can anyone can help on this?
Details:
tomcat-7.0.76-3.amzn2.noarch

Logs:

Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            4.14.62-70.117.amzn2.x86_64
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-3.b13.amzn2.x86_64/jre
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_181-b13
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         /usr/share/tomcat
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         /usr/share/tomcat
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/usr/share/tomcat
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/usr/share/tomcat
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/var/cache/tomcat/temp
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=/usr/share/tomcat/conf/logging.properties
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Sep 08, 2018 11:14:12 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Sep 08, 2018 11:14:12 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Sep 08, 2018 11:14:12 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1027 ms
Sep 08, 2018 11:14:12 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Sep 08, 2018 11:14:12 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.76
Sep 08, 2018 11:14:12 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Sep 08, 2018 11:14:12 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Sep 08, 2018 11:14:12 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 121 ms

How do I Open tomcat port on AWS ec2 ?


#2

Do you have firewall? Firewall will block incoming connections. EC2 has something called security group and you need to open ports. See the following “I host a website on an EC2 instance. How do I allow my users to connect on HTTP (80) or HTTPS (443)?” for more info https://aws.amazon.com/premiumsupport/knowledge-center/connect-http-https-ec2/