Issue connecting to docker container

897 views
Skip to first unread message

random0000

unread,
Nov 27, 2015, 2:00:06 AM11/27/15
to KONG
Hi all,

I followed the instructions for the Kong docker installation (https://getkong.org/install/docker/) and everything worked without issue until the last step, curl http://127.0.0.1:8001 where I receive the following "curl: (7) Failed to connect to 127.0.0.1 port 8001: Connection refused".  The container created is shown below.

$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                                                         NAMES
db2737d9d456        mashape/cassandra   "cassandra -f"      4 minutes ago       Up 4 minutes        22/tcp, 7000-7001/tcp, 7199/tcp, 8888/tcp, 9160/tcp, 0.0.0.0:9042->9042/tcp   cassandra

I am new to docker so any help would be appreciated!

Thibault Charbonnier

unread,
Nov 29, 2015, 2:56:28 AM11/29/15
to KONG
Hi,

Which operating system are you using?

random0000

unread,
Nov 29, 2015, 3:49:55 AM11/29/15
to KONG
Running Docker under Windows 10 in a VirtualBox environment. Cassandra looks to be running (using Kitematic to view).  When I click on the kong container it shows this error when trying to connect to the database: "Cassandra error: connection refused".  Here is the full text:

[INFO] Using configuration: /etc/kong/kong.yml [INFO] Kong version.......0.5.3 Proxy HTTP port....8000 Proxy HTTPS port...8443 Admin API port.....8001 dnsmasq port.......8053 Database...........cassandra keepalive=60000 timeout=1000 contact_points=cassandra:9042 keyspace=kong [INFO] Connecting to the database... [ERR] Cassandra error: connection refused

Thanks

Thibault Charbonnier

unread,
Nov 30, 2015, 3:15:27 AM11/30/15
to KONG
If you are running Docker in a VM, then you should setup some port forwarding rules between your host OS and the guest VM, so that you can access those ports from your host. That would be in the Network tab of your VirtualBox machine's settings.
Reply all
Reply to author
Forward
0 new messages