New kong install on docker fails with address in use

368 views
Skip to first unread message

de...@l2inc.com

unread,
Sep 7, 2016, 11:01:42 AM9/7/16
to Kong
Hi, so I just spun up a Docker for AWS beta cluster (3 managers, 3 nodes) and was going to explore kong on this cluster. I am able to start cassandra just fine, but:

docker run -d --name kong \
              --link kong-database:kong-database \
              -e "KONG_DATABASE=cassandra" \
              -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database" \
              -p 8000:8000 \
              -p 8443:8443 \
              -p 8001:8001 \
              -p 7946:7946 \
              -p 7946:7946/udp \
              kong

fails with a:
docker: Error response from daemon: driver failed programming external connectivity on endpoint kong (4f81106bdfde8ee31fe337d969cf6f6cfef63c6a21ec57ef4462222e44d4cbf6): Error starting userland proxy: listen tcp 0.0.0.0:7946: bind: address already in use.

and docker ps tells me:
docker ps
CONTAINER ID        IMAGE                                   COMMAND                  CREATED             STATUS              PORTS                                                       NAMES
d2945884e5f3        cassandra:2.2                           "/docker-entrypoint.s"   28 minutes ago      Up 28 minutes       7000-7001/tcp, 7199/tcp, 9160/tcp, 0.0.0.0:9042->9042/tcp   kong-database
ffd7d76c24b9        docker4x/controller:aws-v1.12.1-beta5   "loadbalancer run --l"   42 minutes ago      Up 42 minutes                                                                   editions_controller
4b9161a34e20        docker4x/shell-aws:aws-v1.12.1-beta5    "/entry.sh /usr/sbin/"   42 minutes ago      Up 42 minutes       0.0.0.0:22->22/tcp                                          sleepy_curie
92d1a4d11498        docker4x/guide-aws:aws-v1.12.1-beta5    "/entry.sh"              42 minutes ago      Up 42 minutes                                                                   zen_minsky


i can't see anything using that port. i tried turning off the additional udp bind, i tried with postgres instead of cassandra and still the same. 

Any idea? 

shashi ranjan - mashape

unread,
Sep 7, 2016, 12:46:52 PM9/7/16
to de...@l2inc.com, Kong
Problem seems to with how the ports are mapped, you mapping host 7946 port twice, once for container tcp port 7946 and once for ump 7946.

Thanks
Shashi

Dean McRobie

unread,
Sep 7, 2016, 12:57:07 PM9/7/16
to shashi ranjan - mashape, Kong
well, that is the standard setup instructions on getkong.com, the same command works on a local docker, but fails on a docker cluster at aws. any more thoughts?

alejandr...@gmail.com

unread,
May 2, 2017, 11:17:11 PM5/2/17
to Kong, sha...@mashape.com, de...@l2inc.com
yes that's what the official documentation  states, in my case fail on local docker also. any idea?
Reply all
Reply to author
Forward
0 new messages