Self-managed installation : Dashboard not coming up

The installation steps works but afte a while dashboard docker terminates; see following results.

  • git clone …/tyk-pro-docker-demo && cd tyk-pro-docker-demo && ./up.sh

  • Attempt 10 of 10 unsuccessful, received ‘000’*
    Tyk configured. Bootstrapping environment…
    Created org
    Created default user
    Created user password
    Created Httpbin sample API
    Created HttpBin Security Policy
    Created Httpbin API Key

---------------------------
Please sign in at http://localhost:3000

*user: …
*pw: …

Your Tyk Gateway is found at http://localhost:8080

Press Enter to exit

On checking docker status following is coming…

ubuntu@www02:~/jk_workspace/tyk-pro-docker-demo$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4a197bab7a08 tykio/tyk-pump-docker-pub:v1.8 “/opt/tyk-pump/tyk-p…” 10 minutes ago Exited (1) About a minute ago tyk-pump
ed3b32d03948 tykio/tyk-dashboard:v5.1.2 “/opt/tyk-dashboard/…” 10 minutes ago Exited (1) 6 minutes ago tyk-dashboard
c55beab986ac postgres:latest “docker-entrypoint.s…” 10 minutes ago Up 10 minutes (healthy) 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp tyk-postgres
5e30c024ffa4 tykio/tyk-gateway:v5.1.2 “/opt/tyk-gateway/ty…” 10 minutes ago Up 10 minutes 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp tyk-gateway
692790a78058 redis “docker-entrypoint.s…” 10 minutes ago Up 10 minutes 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp tyk-redis
e22f5b3e30e0 tykio/portal:v1.5.0 “/opt/portal/entrypo…” 10 minutes ago Exited (1) 4 minutes ago tyk-pro-docker-demo-tyk-ent-portal-1
ubuntu@www02:~/jk_workspace/tyk-pro-docker-demo$

Inspecting failed dashboard docker says, postgres connection issues.

time=“Sep 28 18:16:16” level=info msg=“Configuration loaded ok” path=/opt/tyk-dashboard/tyk_analytics.conf
time=“Sep 28 18:16:16” level=info msg=“Listening on port: 3000”
time=“Sep 28 18:16:16” level=warning msg=“Default tyk_api_config.secret 352d20ee67be67f6340b4c0605b044b7 should be changed for production use.”
time=“Sep 28 18:16:16” level=warning msg=“Default admin_secret 12345 should be changed for production use.”
time=“Sep 28 18:16:16” level=warning msg=“Default shared_node_secret 352d20ee67be67f6340b4c0605b044b7 should be changed for production use.”
time=“Sep 28 18:16:16” level=info msg=“Initializing Main storage with postgres database”
time=“Sep 28 18:20:37” level=error msg=“Could not connect gorm” error=“failed to connect to host=tyk-postgres user=postgres database=tyk_analytics: dial error (dial tcp 172.20.0.3:5432: connect: connection timed out)”
time=“2023-09-28T18:20:37Z” level=fatal msg=“Could not connect to config store” error=“failed to connect to host=tyk-postgres user=postgres database=tyk_analytics: dial error (dial tcp 172.20.0.3:5432: connect: connection timed out)”

But, postgres docker is up & running; please see previous docker ps dump.

Please let me know iif I am missing any steps.

Rgards
Jayakumar

Hi @jkinfysta ,

Welcome to Tyk Community and thanks for your question.

Can you try restarting your dashboard? It is possible that Postgres took some time before it started initializing creating a race condition with the Dashboard. If you restart the Dashboard, it should work properly.

Re-stared dashboard docker, but still same issue, but postgres docker is up & running. Please see logs,
time=“Oct 05 14:59:30” level=info msg=“Tyk Analytics Dashboard 5.1.2”
time=“Oct 05 14:59:30” level=info msg=“Copyright Tyk Technologies Ltd 2019”
time=“Oct 05 14:59:30” level=info msg=“https://www.tyk.io
time=“Oct 05 14:59:30” level=info msg=“Using /opt/tyk-dashboard/tyk_analytics.conf for configuration”
time=“Oct 05 14:59:30” level=info msg=“Loading configuration file” path=/opt/tyk-dashboard/tyk_analytics.conf
time=“Oct 05 14:59:30” level=info msg=“Configuration loaded ok” path=/opt/tyk-dashboard/tyk_analytics.conf
time=“Oct 05 14:59:30” level=info msg=“Listening on port: 3000”
time=“Oct 05 14:59:30” level=warning msg=“Default tyk_api_config.secret 352d20ee67be67f6340b4c0605b044b7 should be changed for production use.”
time=“Oct 05 14:59:30” level=warning msg=“Default admin_secret 12345 should be changed for production use.”
time=“Oct 05 14:59:30” level=warning msg=“Default shared_node_secret 352d20ee67be67f6340b4c0605b044b7 should be changed for production use.”
time=“Oct 05 14:59:30” level=info msg=“Initializing Main storage with postgres database”
time=“Oct 05 15:03:52” level=error msg=“Could not connect gorm” error=“failed to connect to host=tyk-postgres user=postgres database=tyk_analytics: dial error (dial tcp 172.26.0.5:5432: connect: connection timed out)”
time=“2023-10-05T15:03:52Z” level=fatal msg=“Could not connect to config store” error=“failed to connect to host=tyk-postgres user=postgres database=tyk_analytics: dial error (dial tcp 172.26.0.5:5432: connect: connection timed out)”

But postgres docker is up; please see below,
ubuntu@www02:~/jk_workspace/tyk-pro-docker-demo$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e70325851706 redis “docker-entrypoint.s…” 37 hours ago Up 37 hours 0.0.0.0:6379->6379/tcp, :::6379->6379/tcp tyk-redis
cc76a410abb7 postgres:latest “docker-entrypoint.s…” 37 hours ago Up 37 hours (healthy) 0.0.0.0:5432->5432/tcp, :::5432->5432/tcp tyk-postgres
24263fca0928 tykio/tyk-gateway:v5.1.2 “/opt/tyk-gateway/ty…” 37 hours ago Up 37 hours 0.0.0.0:8080->8080/tcp, :::8080->8080/tcp tyk-gateway
ubuntu@www02:~/jk_workspace/tyk-pro-docker-demo$ docker exec -it cc76a410abb7
“docker exec” requires at least 2 arguments.
See ‘docker exec --help’.

Usage: docker exec [OPTIONS] CONTAINER COMMAND [ARG…]

Run a command in a running container
ubuntu@www02:~/jk_workspace/tyk-pro-docker-demo$ docker exec -it cc76a410abb7 /bin/bash
root@cc76a410abb7:/# psql tyk_analytics postgres
psql (16.0 (Debian 16.0-1.pgdg120+1))
Type “help” for help.

tyk_analytics=# \dt

Please guide me how to rectify the issues.

Hi,

It looks like a local networking issue with the docker install. Could you try running these commands please?

docker-compose down -v

and start again from scratch

git checkout confs/tyk_analytics.env confs/tyk_portal.env
./up.sh

Please try this and let us know if it works.

Cheers,
Pete

Still issue exists; not worked.

I’m really sorry to hear that. We’ve tried to reproduce the issue an haven’t been able to so I think it may well be a docker issue.

Could you let us know what version of docker you’re running and which OS you’re running it on?

It would also be helpful to know if other multi-pod docker-compose installs work correctly?

Cheers,
Pete