1

I am trying to deploy a Java Web application into the Tomcat Container docker run -d -p 8080:8080 java-app , the Java Web application was up and running onto the my local like http://localhost:8080/sample. When I tried to push this image to the Azure and then it gives me public IP address , but it says unable to connect or connection refused . I checked the logs it says .war file deployment done. I have created a network security group also and kept inbound rules to open every port.

http://40.83.211.81:8080/sample

unable to connect

Please anyone can help me for these. Thanks

Aamir M Meman
  • 1,645
  • 14
  • 15

1 Answers1

1

I have resolved these issues , whenever you try to deploy to the Azure , you should specify --port parameter and default is 80. So in my case is 8080.

az container create --name java-app1 --image <acrLoginServer>/java-app:v1 --cpu 1 --memory 1 --registry-password <yourServerPassword> --port 8080 --ip-address public -g myContainergroup.

Now it is up and running on to the public IP address.

Aamir M Meman
  • 1,645
  • 14
  • 15
  • Have a similar issue, what about port 443 or 80? there you just expose 8080 whic is already exposed on dockerfile when you run EXPOSE 8080. I created the instance and I´m unable to telnet the public ip that azure provides. thanks! – Chanafot Aug 14 '18 at 16:06