I've tried follow your steps on my test project and found no issues.
Please have a look at my steps below:
- create VM instance with network tags
http-server
and https-server
:
- create firewall rules to allow HTTP/HTTPS incoming connections:
gcloud compute firewall-rules create default-allow-http --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:80 --source-ranges=0.0.0.0/0 --target-tags=http-server
gcloud compute firewall-rules create default-allow-https --direction=INGRESS --priority=1000 --network=default --action=ALLOW --rules=tcp:443 --source-ranges=0.0.0.0/0 --target-tags=https-server
- install
ngrok
and php
:
instance-8:~$ sudo apt update
instance-8:~$ sudo apt install snapd
instance-8:~$ sudo snap install ngrok
instance-8:~$ sudo apt install php7.2-cli
- connect
ngrok
to the account:
instance-8:~$ ngrok authtoken xxxxxxxxxxxxxxxxxxxxxxxgmfHM
- start embedded php web-server with a dummy page:
instance-8:~$ php -S localhost:8000
PHP 7.2.24-0ubuntu0.18.04.6 Development Server started at Mon Jul 6 17:19:31 2020
Listening on http://localhost:8000
Document root is /home/username
Press Ctrl-C to quit.
- start
ngrok
:
instance-8:~$ ngrok http -host-header=rewrite localhost:8000
ngrok by @inconshreveable (Ctrl+C to quit)
Session Status online
Account XXX (Plan: Free)
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://1537504102c2.ngrok.io -> http://localhost:8000
Forwarding https://1537504102c2.ngrok.io -> http://localhost:8000
Connections ttl opn rt1 rt5 p50 p90
2 0 0.03 0.01 0.00 0.00
HTTP Requests
-------------
GET /favicon.ico 404 Not Found
GET / 200 OK
- check connection and it works as expected.
- create new VM instance based on snapshot of the existed VM instance:
gcloud compute disks snapshot instance-8 --snapshot-names=snapshot-1 --zone=europe-west3-a --storage-location=europe-west3
gcloud compute disks create instance-10 --size=10 --zone=europe-west3-a --source-snapshot=snapshot-1 --type=pd-standard
gcloud compute instances create instance-10 --zone=europe-west3-a --machine-type=e2-medium --tags=http-server,https-server --disk=name=instance-10,device-name=instance-10,mode=rw,boot=yes,auto-delete=yes --reservation-affinity=any
- start embedded php web-server with a dummy page:
instance-10:~$ php -S localhost:8000
PHP 7.2.24-0ubuntu0.18.04.6 Development Server started at Mon Jul 6 17:42:59 2020
Listening on http://localhost:8000
Document root is /home/username
Press Ctrl-C to quit.
- start
ngrok
:
instance-10:~$ ngrok http -host-header=rewrite localhost:8000
Your account 'XXX' is limited to 1 simultaneous ngrok client session.
Active ngrok client sessions in region 'us':
- ts_1eK49pNAq8zIKDN2ikKdCvVhwHz (35.XXX.153.XXX)
ERR_NGROK_108
- stop
ngrok
at instance-8
and start it at instance-10
:
instance-10:~$ ngrok http -host-header=rewrite localhost:8000
ngrok by @inconshreveable (Ctrl+C to quit)
Session Status online
Account XXX (Plan: Free)
Version 2.3.35
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://38c2f5d9f673.ngrok.io -> http://localhost:8000
Forwarding https://38c2f5d9f673.ngrok.io -> http://localhost:8000
Connections ttl opn rt1 rt5 p50 p90
4 0 0.34 0.39 0.00 0.00
HTTP Requests
-------------
GET /favicon.ico 404 Not Found
GET / 200 OK
- check connection and it works as expected.
I was able to reproduce your issue when I checked connection to the shutted down ngrok at instance-8
using old links while ngrok
was running at instance-10
:
Tunnel 1537504102c2.ngrok.io not found
I've got the same result was when I checked connection to the shutted down ngrok at instance-10
using old links while ngrok
was running at instance-8
.
I think in your case it could be some issue at the ngrok
side and you should contact them via email contact@ngrok.com
.