konga icon indicating copy to clipboard operation
konga copied to clipboard

Konga on Docker

Open sulthonzh opened this issue 8 years ago • 10 comments

Hi, I got an error

Failed to connect to kong_test. Make sure your active connection is valid and Kong is up and running.

I got an error after docker-compose down then "docker-compose up" again

version: '2.2'

services:

kong-database: image: postgres:9.4-alpine container_name: kong-database environment: - POSTGRES_USER=kong - POSTGRES_DB=kong healthcheck: test: "pg_isready -U kong && psql -d kong -U kong -c "SELECT 1=1"" interval: 10s timeout: 5s retries: 5

kong-migration: image: kong container_name: kong-migration depends_on: kong-database: condition: service_healthy environment: - KONG_DATABASE=postgres - KONG_PG_HOST=kong-database command: sh -c "kong migrations up && touch migrations_run && sleep 30" healthcheck: test: "if [[ -f migrations_run ]] ; then exit 0; else exit 1; fi" interval: 10s timeout: 5s retries: 5

kong: image: kong container_name: kong depends_on: kong-migration: condition: service_healthy healthcheck: test: "curl localhost:8001" interval: 10s timeout: 5s retries: 5 environment: - KONG_DATABASE=postgres - KONG_PG_HOST=kong-database - KONG_ADMIN_LISTEN=0.0.0.0:8001 ports: - 8001:8001 - 8000:8000

konga: image: pantsel/konga container_name: konga ports: - 1337:1337 environment: - NODE_ENV=development

after that cannot create new connection,

different version when first create connection(0.12.x) on dashboard and /connections > new connection (0.10.x)

sulthonzh avatar Mar 06 '18 06:03 sulthonzh

@sulthonzh, what version of Kong and Konga are using?

pantsel avatar Mar 06 '18 07:03 pantsel

@pantsel latest version from docker hub like docker-compose.yml above, but (on first create at dashboard i see 0.12.x and when create from /connection (0.10.x))

sulthonzh avatar Mar 06 '18 07:03 sulthonzh

Are you sure the Kongs Admin API is accessible from the machine Konga is running?

pantsel avatar Mar 06 '18 07:03 pantsel

It's probably me but I have the same issue - Container can ping to kong:8001, but can't connect. Am I missing something?

tomkerkhove avatar Mar 08 '18 23:03 tomkerkhove

@tomkerkhove , can you curl from konga container to kong:8001? ] What is the response?

pantsel avatar Mar 09 '18 11:03 pantsel

@pantsel Can't use Curl nor apt-get since it's not in the image but you can ignore my comment. I'll just use the API directly. Thank you anyway!

tomkerkhove avatar Mar 09 '18 17:03 tomkerkhove

if you can't use curl you still can use wget and cat to see the result. Ps, which image of kong are you using, it usually have curl in it. I don't really use the same config file, as I use nginx and consul as well, but to make the containers communicate I set them all in the same docker network, if you are interested I can show you my config

Niradnik avatar May 25 '18 20:05 Niradnik

Closing this due to inactivity

pantsel avatar Feb 01 '19 14:02 pantsel

I also suffered from this pain.

But I guess, I just needed to logout and login again on Konga.

Any thoughts on this?

Thank you for this nice dashboard.

AlexandreLage avatar May 11 '20 15:05 AlexandreLage

I also suffered from this pain.

But I guess, I just needed to logout and login again on Konga.

Any thoughts on this?

Thank you for this nice dashboard.

Thanks @AlexandreLage. You're a life saver!

bytebybyte avatar Apr 17 '21 11:04 bytebybyte