2018/10/16

docker gae EMPTRY_RESPONSE


docker+gaeの構成で、Admin Consoleを見たいが、EMPTRY_RESPONSEで見えない。。

EMPTRY_RESPONSE means that the TCP connection into the docker container seemed to be sucessful, 
however the server side closed the connection without sending anything back. 

curl -v http://localhost:8000 


Your issue is that you are binding to the 127.0.0.1:8025 inside your code. This makes the code work from inside the container but not outside.
You need to bind to 0.0.0.0:8025 to bind to all interfaces inside the container. So traffic coming from outside of the container is also accepted by your Go app

When you get this error it means youve exposed the right port in your Dockerfile, 
but you have to make sure the app within your container is binding to 0.0.0.0 instead of localhost or 127.0.0.1.
I got this error using Angular CLIng serve within a container. 
I had to add –host=0.0.0.0 to the ENTRYPOINT arguments. 
If youre using a different framework check for a similar command-line argument, configuration parameter or setting.

・解決!—port 8080 --admin_port 8000 --skip_sdk_update_check yes --host 0.0.0.0
--admin_hostデフォルトはlocalhost—admin_host 0.0.0.0 を追加して見える
--admin_host=ADMIN_HOST
ローカル開発用サーバーの管理コンソールがバインドするホスト名(デフォルト: localhost)。
--admin_port=ADMIN_PORT