Unable to launch Kong 0.9.1 with Docker

347 views
Skip to first unread message

nicolas.l...@gmail.com

unread,
Sep 20, 2016, 10:38:10 AM9/20/16
to Kong
Hello,

I want to install the new Kong version with Docker.
I installed a database (I tried with Cassandra and Postgres).
docker run -d --name kong-database                 -p 9042:9042                 cassandra:2.2

When I launched Kong docker container, it worked during 1 minute before crashed.
ubuntu@kong:~$ docker run -d --name kong     -e "KONG_DATABASE=cassandra"     -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database"     --link kong-database:kong-database     -p 8000:8000     -p 8443:8443     -p 8001:8001     -p 7946:7946     -p 7946:7946/udp     --security-opt seccomp:unconfined     mashape/kong

I listed all docker container and the Kong container exited with exit code 1.

ubuntu@kong:~$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS                                                       NAMES
21156078aff6        mashape/kong        "/docker-entrypoint.s"   24 minutes ago      Exited (1) 23 minutes ago                                                               kong
c877c6e1b36b        cassandra:2.2       "/docker-entrypoint.s"   About an hour ago   Up About an hour            7000-7001/tcp, 7199/tcp, 9160/tcp, 0.0.0.0:9042->9042/tcp   kong-database

Can you help me ?

Thanks,
Nicolas

Marco

unread,
Sep 20, 2016, 11:14:26 AM9/20/16
to Nicolas Larcher, Kong
Please use the new instructions at https://getkong.org/install/docker/


 Marco Palladino | CTO @ Mashape | mashape.com+1 (415) 361-3858

--
You received this message because you are subscribed to the Google Groups "Kong" group.
To unsubscribe from this group and stop receiving emails from it, send an email to konglayer+unsubscribe@googlegroups.com.
To post to this group, send email to kong...@googlegroups.com.
Visit this group at https://groups.google.com/group/konglayer.
To view this discussion on the web visit https://groups.google.com/d/msgid/konglayer/418ed33a-893b-436e-b82b-ac70cdd053cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Nicolas Larcher

unread,
Sep 20, 2016, 11:28:03 AM9/20/16
to Kong, nicolas.l...@gmail.com
When I used the new instructions :

Command list :
docker run -d --name kong-database               -p 5432:5432               -e "POSTGRES_USER=kong"               -e "POSTGRES_DB=kong"               postgres:9.4
docker run -d --name kong               --link kong-database:kong-database               -e "KONG_DATABASE=postgres"               -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database"               -e "KONG_PG_HOST=kong-database"               -p 8000:8000               -p 8443:8443               -p 8001:8001               -p 7946:7946               -p 7946:7946/udp               kong

It works just 1 minute

CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS                      PORTS                    NAMES
6075a13f0d08        kong                "/docker-entrypoint.s"   About a minute ago   Exited (1) 10 seconds ago                            kong
cb8a3e9660ff        postgres:9.4        "/docker-entrypoint.s"   5 minutes ago        Up 5 minutes                0.0.0.0:5432->5432/tcp   kong-database

Thanks for your help


Le mardi 20 septembre 2016 17:14:26 UTC+2, Marco a écrit :
Please use the new instructions at https://getkong.org/install/docker/


 Marco Palladino | CTO @ Mashape | mashape.com+1 (415) 361-3858

On Tue, Sep 20, 2016 at 7:38 AM, <nicolas.l...@gmail.com> wrote:
Hello,

I want to install the new Kong version with Docker.
I installed a database (I tried with Cassandra and Postgres).
docker run -d --name kong-database                 -p 9042:9042                 cassandra:2.2

When I launched Kong docker container, it worked during 1 minute before crashed.
ubuntu@kong:~$ docker run -d --name kong     -e "KONG_DATABASE=cassandra"     -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database"     --link kong-database:kong-database     -p 8000:8000     -p 8443:8443     -p 8001:8001     -p 7946:7946     -p 7946:7946/udp     --security-opt seccomp:unconfined     mashape/kong

I listed all docker container and the Kong container exited with exit code 1.

ubuntu@kong:~$ docker ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS                                                       NAMES
21156078aff6        mashape/kong        "/docker-entrypoint.s"   24 minutes ago      Exited (1) 23 minutes ago                                                               kong
c877c6e1b36b        cassandra:2.2       "/docker-entrypoint.s"   About an hour ago   Up About an hour            7000-7001/tcp, 7199/tcp, 9160/tcp, 0.0.0.0:9042->9042/tcp   kong-database

Can you help me ?

Thanks,
Nicolas

--
You received this message because you are subscribed to the Google Groups "Kong" group.
To unsubscribe from this group and stop receiving emails from it, send an email to konglayer+...@googlegroups.com.

Nicolas Larcher

unread,
Sep 21, 2016, 9:00:01 AM9/21/16
to Kong, nicolas.l...@gmail.com
Hello,

I made another test and I installed succesfully Kong with Docker.
But I found a problem :

The docker Kong container didn't work with this configuration  :

Ubuntu Xenial 16.04
Docker 1.12.[0-1]

Do you know why ?

Thanks,
Nicolas.

Thibault Charbonnier

unread,
Sep 21, 2016, 2:07:33 PM9/21/16
to kong...@googlegroups.com
Hi,

We cannot help you with this unless you provide us with stdout and error logs (/usr/local/kong/log/error.log) from your container. Ideally in debug mode for the CLI with --vv, and debug level in Kong's error.log too - see the configuration file and/or the KONG_LOG_LEVEL variable).

-- Thibault

ove.h...@gmail.com

unread,
Sep 22, 2016, 1:53:59 PM9/22/16
to Kong
I have exactly the same problem, running "docker events" in the background gives me the following output which makes me think the kong container thinks it should connect to a Postgres rather than a Cassandra database...:

2016-09-22T17:46:53.117549786Z container start aba4a5be7c8156094f3747168e6d8319ef945c8258383636a7d9baac06f20633 (build-date=20160906, image=kong, license=GPLv2, name=sleepy_williams, vendor=CentOS)
Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:22: [postgres error] connection refused

This was the container create command used:
docker run -d --name kong   --link kong-database:kong-database  -e "KONG_DATABASE=cassandra"  -e "KONG_CASSANDRA_CONTACT_POINTS=kong-database"   -e "KONG_PG_HOST=kong-database"   -p 8000:8000  -p 8443:8443   -p 8001:8001   -p 7946:7946  -p 7946:7946/udp  kong

Thanks!

Marco

unread,
Sep 22, 2016, 3:05:02 PM9/22/16
to ove.h...@gmail.com, Kong
I just tried again with the latest instructions (copy-paste of https://getkong.org/install/docker/) and it works.

Can you try with the latest version (0.9.2)?


 Marco Palladino | CTO @ Mashape | mashape.com+1 (415) 361-3858

To unsubscribe from this group and stop receiving emails from it, send an email to konglayer+unsubscribe@googlegroups.com.

To post to this group, send email to kong...@googlegroups.com.
Visit this group at https://groups.google.com/group/konglayer.

ove.h...@gmail.com

unread,
Sep 22, 2016, 4:34:16 PM9/22/16
to Kong, ove.h...@gmail.com
Unfortunately it's still broken :-( .

cloud-user]# docker logs 38c8a5df2370
migrating core for keyspace kong
core migrated up to: 2015-01-12-175310_skeleton
core migrated up to: 2015-01-12-175310_init_schema
core migrated up to: 2015-11-23-817313_nodes
core migrated up to: 2016-02-25-160900_remove_null_consumer_id
core migrated up to: 2016-02-29-121813_remove_ttls
migrating request-transformer for keyspace kong
request-transformer migrated up to: 2016-03-10-160000_req_trans_schema_changes
migrating rate-limiting for keyspace kong
rate-limiting migrated up to: 2015-08-03-132400_init_ratelimiting
rate-limiting migrated up to: 2016-07-25-471385_ratelimiting_policies
migrating jwt for keyspace kong
jwt migrated up to: 2015-06-09-jwt-auth
Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:22: Error during migration 2016-03-07-jwt-alg: [Invalid] Invalid column name algorithm because it conflicts with an existing column

  Run with --trace to see traceback
Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:22: Error during migration 2016-03-07-jwt-alg: [Invalid] Invalid column name algorithm because it conflicts with an existing column

  Run with --trace to see traceback
migrating jwt for keyspace kong

Marco

unread,
Sep 22, 2016, 5:03:57 PM9/22/16
to Ove Hansen, Kong
Can you try with a fresh Cassandra image? It seems like you are using an instance that already has data in it.




 Marco Palladino | CTO @ Mashape | mashape.com+1 (415) 361-3858

To unsubscribe from this group and stop receiving emails from it, send an email to konglayer+unsubscribe@googlegroups.com.

To post to this group, send email to kong...@googlegroups.com.
Visit this group at https://groups.google.com/group/konglayer.

ove.h...@gmail.com

unread,
Sep 30, 2016, 3:31:21 AM9/30/16
to Kong, ove.h...@gmail.com
You might have been right, I did a cleanup with docker rmi and rm for the images, volumes and containers and tried from fresh, and it worked!

Grazie tanto!
Reply all
Reply to author
Forward
0 new messages