1
votes

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.

2
Have you allowed HTTP traffic to your instance when you've created it? cloud.google.com/compute/docs/quickstart-linuxAlex Palcuie
yes I did. Allowed HTTP traffic.user321
Have you changed Tomcat's settings to listen on port 80? stackoverflow.com/questions/16326707/tomcat-webapp-on-port-80Alex Palcuie
Alex thanks for your time. Tomcat is using port 8080. Allowed that port "tcp:8080" in firewall rules. Still no response. Following 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
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

2 Answers

1
votes

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.

0
votes

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