Then leave of the -p it is not that important. netstat -lnt | grep 8080 will be enough to see if something is listening on port 8080 and which IP it has bound to.
And also, please try to curl your application from the host running it. If its working there, we can put more energy in debugging the networking issue.
I asked you to curl your application locally. curl localhost:8080 or something like that.
But I assume it wont work.
How exactly are you starting the application? Are you using foreground or start? If you do the former, do you close the connection/terminal or do you keep it open? You application will shut down as soon as the parent process dies. If though you use the latter, please check your logs for any error messages.
Let’s backup abit. Im starting to get confuse now.
So first, I run this command PORT=8080 _build/prod/rel/hello/bin/hello.run foreground
Without stopping this command I run curl localhost:8080,
It will show the HTML file for the home page
The project runs perfectly when I, PORT=8080 _build/prod/rel/hello/bin/hello.run foreground
There were no errors, the logs from Phoenix does show normally without errors
I want to know on what IP the application binds to, I want to know if it works when you curl the application locally on the remote (yeah, confusing, I know)
Until we got that sorted, we need to make sure that you started it manually using … foreground and then not close that terminal, but use another one to do the curl and netstat.
I’m not sure. What I know from the tutorial in “Deploying your application to a single instance” section there’s a instance-startup.sh that I added in the root of my project and the last line in the instance-startup.sh is PORT=8080 ./hello-release start and I just create an instance in GCE by running
I do not mind the turial. We already have learnt that it for some reasons doesn’t do as we expect.
Please log in to the host, start your application in foreground mode, fire up a second SSH into that host and check curl and netstat, while you are doing this, please also observe the logs of the foreground instance. The curl should show up there.
I’m not sure how to start the application in foreground from the GCE.
hello_team@hello-instance:/$ ls
app bin boot dev etc home initrd.img initrd.img.old lib lib64 lost+found media mnt opt proc root run sbin srv startup-LfE2ig sys tmp usr var vmlinuz vmlinuz.old
hello_team@hello-instance:/$ cd app/
hello_team@hello-instance:/app$ ls
cloud_sql_proxy hello-release tmp