amazon web services - Docker - Cant access docker port from outside -


so created new ec2 instance , installed docker on it.

i deployed code ( https://github.com/commonsearch/cosr-front/blob/master/install.md ) , followed install instructions.

install successfull , started server:

[ec2-user@ip-172-30-0-127 cosr-front]$ make docker_devserver docker run -e docker_host --rm -v "/home/ec2-user/cosr-front:/go/src/github.com/commonsearch/cosr-front:rw" -w /go/src/github.com/commonsearch/cosr-front -p 9700:9700 -i -t commonsearch/local-front make devserver mkdir -p build go build -o build/cosr-front.bin ./server godebug=gctrace=1 cosr_debug=1 ./build/cosr-front.bin 2016/05/28 16:32:38 using docker host ip: 172.17.0.1 2016/05/28 16:32:38 server listening on 127.0.0.1:9700 - should open http://127.0.0.1:9700 in browser! 

well, when want access outside, cant! not curl local server.

when run docker ps gives me correct port forwarding:

[ec2-user@ip-172-30-0-127 ~]$ docker ps container id        image                                       command                  created             status              ports                                              names 1a9f77e1eeb1        commonsearch/local-front                    "make devserver"         4 minutes ago       4 minutes        0.0.0.0:9700->9700/tcp                             stoic_hopper 9ff00fe3e70d        commonsearch/local-elasticsearch-devindex   "/docker-entrypoint.s"   4 minutes ago       4 minutes        0.0.0.0:39200->9200/tcp, 0.0.0.0:39300->9300/tcp   kickass_wilson 

these docker images:

repository                                  tag                 image id            created             virtual size <none>                                      <none>              3e205118cd3f        17 minutes ago      853.3 mb <none>                                      <none>              1d233da1fa59        2 hours ago         955.7 mb debian                                      jessie              ce58426c830c        4 days ago          125.1 mb commonsearch/local-front                    latest              30de7ab48d43        7 weeks ago         1.024 gb commonsearch/local-elasticsearch-devindex   latest              b1156ada5a24        11 weeks ago        383.2 mb commonsearch/local-elasticsearch            latest              808e72f49b4a        3 months ago        355.2 mb 

i have tryed disabling ipv6 , kind of nonsense google offered me, without success.

any ideas ?

edit:

also, if enter docker container frontend( using docker exec ), can ping , culr frontend.

but cant outside( nor ssh, not home pc using browser ).

also docker version:

client:  version:      1.9.1  api version:  1.21  go version:   go1.4.2  git commit:   a34a1d5/1.9.1  built:          os/arch:      linux/amd64  server:  version:      1.9.1  api version:  1.21  go version:   go1.4.2  git commit:   a34a1d5/1.9.1  built:          os/arch:      linux/amd64 

i made issue @ github swell , 1 guy saved day.

here's he's response:

server listening on 127.0.0.1:9700 application listening on localhost. localhost scoped container itself. able connect it, have inside container. fix, need application listen on 0.0.0.0 instead.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -