I’m unable to connect to provided external IP after create firewall-rules
There are no errors in following the tutorial. But cannot connect to http://${external_ip}:8080 after creating firewall rules
...
Feb 23 18:02:35 hello-instance startup-script: INFO startup-script: + PORT=8080 ./hello-release start
Feb 23 18:02:35 hello-instance startup-script: INFO startup-script: + ./cloud_sql_proxy -projects= hello -dir=/tmp/cloudsql
Feb 23 18:02:35 hello-instance startup-script: INFO startup-script: 2019/02/23 18:02:35 Rlimits for file descriptors set to {&{8500 8500}}
Feb 23 18:02:35 hello-instance startup-script: INFO startup-script: ./hello-release: 31: exec: /app/hello_rc_exec.sh: not found
Feb 23 18:02:39 hello-instance startup-script: INFO startup-script: 2019/02/23 18:02:39 Listening on /tmp/cloudsql/hello:asia-east1:hello-db/.s.PGSQL.5432 for hello:asia-east1: hello-db
Feb 23 18:02:39 hello-instance startup-script: INFO startup-script: 2019/02/23 18:02:39 Ready for new connections
Feb 23 18:08:08 hello-instance ntpd[656]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
firewall rules
NAME NETWORK DIRECTION PRIORITY ALLOW DENY DISABLED
default-allow-http-8080 default INGRESS 1000 tcp:8080 False
...
Im not sure what information is needed to fix this
Please do ask for information and I will provide them.
Thank you
./hello-release: 31: exec: /app/hello_rc_exec.sh: not found is probably something worth looking at. Do you know what it is?
Also try running ps aux | grep erl on the instance, to check if something is even running. I would say it’s not.
Ok, it looks like your app is not even running, so there’s probably no problem with the firewall.
Also, try to run the app with the foreground command instead of start, to see what’s going on (line PORT=8080 ./hello-release start will be PORT=8080 ./hello-release foreground)
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: 2019-02-25 08:48:40 (41.8 MB/s) - ‘cloud_sql_proxy’ saved [7955768/7955768]
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: + chmod +x cloud_sql_proxy
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: + mkdir /tmp/cloudsql
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: + curl -s http://metadata.google.internal/computeMetadata/v1/project/project-id -H Metadata-Flavor: Google
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: + PROJECT_ID=hello
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: + PORT=8080 ./hello-release foreground
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: + ./cloud_sql_proxy -projects=hello -dir=/tmp/cloudsql
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: 2019/02/25 08:48:40 Rlimits for file descriptors set to {&{8500 8500}}
Feb 25 08:48:40 hello-instance startup-script: INFO startup-script: ./hello-release: 31: exec: /app/hello_rc_exec.sh: not found
Feb 25 08:48:43 hello-instance startup-script: INFO startup-script: 2019/02/25 08:48:43 Listening on /tmp/cloudsql/hello:asia-east1:hello-db/.s.PGSQL.5432 for hello:asia-east1:hello-db
Edit: Found out ./hello-release: 31: exec: /app/hello_rc_exec.sh: not found is
The file is generated after initialize Distillery. It is stored in _build/prod/rel/hello/bin/hello_rc_exec.sh
Hi all. I’m the one who wrote the tutorial. Apologies for not being able to engage sooner. I’m abroad on vacation and my internet access is terrible, but I should be back online in about 5 days and can help troubleshoot at that time. If a solution is found, I’ll be sure to update the tutorial accordingly. Thanks everyone, and apologies for any errors!
@azimlord Hey, so I’m back. Thanks for your patience. I notice you said you copied hello instead of hello.run. Is there a reason you did that? I think that’s the issue. hello is just a wrapper script but not the entire release. hello.run is an executable archive of the entire release, and that’s what you want.
I just retested the tutorial myself, and it is working for me (if I use hello.run).
I tried again an it still failing to connect using http://${IP_ADDRESS}:8080
The progress of instance creation is not showing Finished running startup scripts
NAME NETWORK DIRECTION PRIORITY ALLOW DENY DISABLED
default-allow-http-8080 default INGRESS 1000 tcp:8080 False
The machine type that I use, both is in asia-southeast1
Cloud SQL : db-f1-micro
Compute Engine: f1-micro
When I try to run
PORT=8080 _build/prod/rel/hello/bin/hello.run foreground
_build/prod/rel/hello/bin/hello.run: line 26: /Directory/To/Project/hello_root/tmp/hello/bin/hello: No such file or directory
_build/prod/rel/hello/bin/hello.run: line 26: exec: /Directory/To/Project/hello_root/tmp/hello/bin/hello: cannot execute: No such file or directory
It basically does untar the attached binary data and then runs the included script.
The only reason I can think of right now, is that there are permission issues OR there is already a folder /Directory/To/Project/hello_root/tmp/hello, which would make the script assume it had already untared itself.
@azimlord please make sure to that no such folder exists or use the environment variable RELEASE_MUTABLE_DIR to change the place where the script untars itself. It either untars to ./tmp if that var is not set or $RELEASE_MUTABLE_DIR/tmp if it is set.
Execute this PORT=8080 _build/prod/rel/hello/bin/hello.run foreground is now working.
No problem connecting to the Cloud SQL (remote DB)
There are actually already generated tmp/hello from my previous try deploying to GCP Kubernetes.
I removed the /tmp file and also _build file and redo the mix release.init
I deleted the old instance and also bucket from GCP and redo again. Still the same.
I could not connect to http://${IP_ADDRESS}:8080 where ${IP_ADDRESS} is my instance external IP