1

I have created instance on google cloud platform (allowed http traffic). Used Ubuntu 14.04 OS. Installed oracle java8 and apache-tomcat.Placed war file in tomcat webapps and started server. Server started successfully.

Question is how to access my application, tried accessing external ip of instance from web browser but no response.

Can anyone tell me the process or missing things I have not done.

Thanks in advance.

user321
  • 11
  • 1
  • 2
  • Have you allowed HTTP traffic to your instance when you've created it? https://cloud.google.com/compute/docs/quickstart-linux – Alex Palcuie Feb 17 '17 at 20:09
  • yes I did. Allowed HTTP traffic. – user321 Feb 20 '17 at 04:31
  • Have you changed Tomcat's settings to listen on port 80? http://stackoverflow.com/questions/16326707/tomcat-webapp-on-port-80 – Alex Palcuie Feb 20 '17 at 11:02
  • Alex thanks for your time. Tomcat is using port 8080. Allowed that port "tcp:8080" in firewall rules. Still no response. Following https://cloud.google.com/java/tutorials/bookshelf-on-compute-engine. Able to deploy sample application using openjdk8, jetty9, Debian OS. This is successful. Previously I was trying with oracle java8, apache-tomcat8 and ubuntu14.04 which is not successful. – user321 Feb 21 '17 at 04:37
  • No worries. You can either follow the instructions in the URL to move Tomcat to port 80. Or, the simpler version, you can go to the firewall in GCP, make a rule to allow port 8080 and set it to "Allow from any source" and then you can access the Tomcat externally on that port. – Alex Palcuie Feb 21 '17 at 13:00
  • @user321 From your comment it looks like you have resolved this issue, please consider posting a self-answer so the community can benefit. – Faizan Aug 18 '17 at 14:37
  • @Faizan Issue was not resolved completely. Did workaround by changing container, OS etc. – user321 Aug 19 '17 at 05:34

2 Answers2

1

I had the same issue and eventually solved it In my case the solution was simple.Check the firewall rule is really tcp:8080 and not tcp:80 as created by default. Changed this and finally saw my tomcat welcome page.

Sam Hartman
  • 6,210
  • 3
  • 23
  • 40
Moh
  • 11
  • 1
0

1)Added http port (8080) in firewall rules in Networking section

2)Refreshing VM instance by click refresh option before accessing with external ip followed by http server port(8080)

I hope after following first step, need to refresh VM instance to access web serve with external IP

Marreddy
  • 11
  • 3