2

I have a Java spring framework back end which also contains rest API. I deployed successfully the app in vm instance Google cloud platform, after connecting Eclipse with Google cloud platform. My problem is that when I try to run: https://industrial-net-242708.appspot.com/..., I get a 404 error: not found. When I run this one: https://35.228.187.51:80, I get:

'''This site can't be reached
35.228.187.51 refused to connect.'''

I have also created ports in firewall rules fot the vm instance. But I cannot understand what is wrong.

I executed the command netstat -l in ssh terminal and I found out this:

Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State 
tcp  0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN 
tcp6 0 0 [::]:ssh [::]:* LISTEN 
udp  0 0 0.0.0.0:boo 
tpc  0.0.0.0:* 
udp  0 0 instance-education-:ntp 0.0.0.0:* 
udp  0 0 localhost:ntp 0.0.0.0:* 
udp  0 0 0.0.0.0:ntp 0.0.0.0:* 
udp6 0 0 fe80::4001:aff:fea6:ntp [::]:* 
udp6 0 0 localhost:ntp [::]:* 
udp6 0 0 [::]:ntp [::]: 

This means that the vm instance does not listen to the internal or external IP address How can I fix it?

I want to know the exact steps I have to follow in order to make my Java application run successfully in a Google cloud server debian 9 / Linux. My computer has Windows 10 as an OS.

M--
  • 25,431
  • 8
  • 61
  • 93
AlwaysLearning
  • 120
  • 1
  • 14
  • https://stackoverflow.com/questions/36758460/how-to-access-google-cloud-engine-instances-ip-address-via-browser/51437065#51437065 – jose praveen Apr 04 '20 at 02:16
  • Thank zou for your help @josepraveen I followed the steps mentioned in the post and I "made" my vm instance to listen to a port. The problem is that now I am getting An error : cannot connect to the port : 22 eg. Any idea what should I do to fix it ? – AlwaysLearning Apr 04 '20 at 10:30
  • fix for [connect to host port 22: Connection refused](https://stackoverflow.com/questions/44802363/cannot-connect-to-ec2-ssh-connect-to-host-port-22-connection-refused) – jose praveen Apr 04 '20 at 10:36
  • You should get your server listening on the ports you expect. The command `sudo netstat -tlp` will list active sockets and bound processes. For instance for the standard LAMP stack ssh, http and mysql are listed. – mebius99 Apr 08 '20 at 10:10

0 Answers0