简体   繁体   中英

Tomcat not accessible from EC2

I have a strange issue, I'm deploying my java web service by creating docker image and running the docker on amazon EC2, When I try to access tomcat I'm getting this error 在此处输入图片说明

However when I try to access web-service running on Tomcat it's accessible 在此处输入图片说明

Can Someone explain me this strange behavior and how I can resolve this ?

My docker-compose file is here

version: '2'
services:
  nlp-server:
    image: nlp-docker-image
    ports:
        - 8080:8080

Docker image I was using for tomcat was executing below commands

rm -rf /usr/local/tomcat/webapps/examples && \
rm -rf /usr/local/tomcat/webapps/docs && \
rm -rf /usr/local/tomcat/webapps/ROOT

as it was removing default webpages, I was not getting the index page on port 8080

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM