I have deployed a flask application on a google app engine VM instance. Everything was going fine, I was editing my code locally, then deploying and debugging by looking at the logs, but after my last deployment, I am seeing the following error when I try to open the app in a browser:
Error: Server Error
The server encountered a temporary error and could not complete your request.
Please try again in 30 seconds.
Also, I am now unable to ssh into my App engine VM instance. Whenever I try to ssh, I get the following error:
port 22: Connection refused
(I was able to ssh into this VM earlier).
Now, I have a VPC network, which has the default firewall rules for allowing ssh ports. There is a section in the cloud platform dashboard where I can create firewall rules for App engine, but it is only for allowing IP addresses, and not ports (regardless, I have added my IP address in this firewall rule).
I also get the same error when I try to SSH through the web cloud platform dashboard.
Most of the related pages on StackOverflow I found about this error are people not being able to SSH into compute engine VMs. I'm stuck and have no idea what to do to be able to SSH into my App Engine VM.
I am also not seeing any logs when I use the "gcloud app logs read" command.
Edit: Following are my App Engine firewall rules :
Following are the firewall rules for my VPC network: