Tomcat not accessible from EC2

时间:2018-03-23 00:04:27

标签: java web-services tomcat amazon-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 enter image description here

However when I try to access web-service running on Tomcat it's accessible enter image description here

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

1 个答案:

答案 0 :(得分:0)

我用于tomcat的Docker镜像正在执行命令

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

由于删除了默认网页,我没有在端口8080上获取索引页