[英]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 我有一个奇怪的问题,我通过创建docker映像并在Amazon EC2上运行docker来部署Java Web服务,当我尝试访问tomcat时出现此错误
However when I try to access web-service running on Tomcat it's accessible 但是,当我尝试访问在Tomcat上运行的Web服务时,它是可访问的
Can Someone explain me this strange behavior and how I can resolve this ? 有人可以向我解释这种奇怪的行为以及如何解决吗?
My docker-compose file is here 我的docker-compose文件在这里
version: '2'
services:
nlp-server:
image: nlp-docker-image
ports:
- 8080:8080
Docker image I was using for tomcat was executing below commands 我用于tomcat的Docker映像正在执行以下命令
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 因为它正在删除默认网页,所以我没有在端口8080上获得索引页
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.