Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using offical docker compose config leads to database error #8929

Closed
Jack17432 opened this issue Mar 30, 2024 · 2 comments
Closed

Using offical docker compose config leads to database error #8929

Jack17432 opened this issue Mar 30, 2024 · 2 comments

Comments

@Jack17432
Copy link

Jack17432 commented Mar 30, 2024

Summary

When I follow the official docker compose tutorial https://concourse-ci.org/quick-start.html and run the commands it fails to connect to the database

Steps to reproduce

curl -O https://concourse-ci.org/docker-compose.yml
sudo docker-compose up

Expected results

Connects to database

Actual results

concourse-db_1  | 2024-03-30 02:18:49.710 UTC [1] LOG:  starting PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
concourse-db_1  | 2024-03-30 02:18:49.719 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
concourse-db_1  | 2024-03-30 02:18:49.719 UTC [1] LOG:  listening on IPv6 address "::", port 5432
concourse-db_1  | 2024-03-30 02:18:49.721 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
concourse-db_1  | 2024-03-30 02:18:49.724 UTC [29] LOG:  database system was shut down at 2024-03-30 02:16:00 UTC
concourse-db_1  | 2024-03-30 02:18:49.728 UTC [1] LOG:  database system is ready to accept connections
concourse_1     | {"timestamp":"2024-03-30T02:18:50.214482205Z","level":"info","source":"atc","message":"atc.cmd.start","data":{"session":"1"}}
concourse_1     | {"timestamp":"2024-03-30T02:18:53.271547806Z","level":"error","source":"atc","message":"atc.db.failed-to-open-db-retrying","data":{"error":"dial tcp 172.27.0.2:5432: connect: no route to host","session":"3"}}

Additional context

first time running concourse on local machine and removed old all old PostgreSQL incase it might be interfearing

Triaging info

  • Concourse version: concourse/concourse image
  • Browser (if applicable): Na
  • Did this used to work? Na
@taylorsilva
Copy link
Member

taylorsilva commented Apr 3, 2024

You do immediately get an atc.db.failed-to-open-db-retrying from concourse_1 which is the container running the web/worker. It's possible that in further logs, Concourse was able to connect to the db and failed for some other reason. If it couldn't connect to the db then we'd see that error message multiple times.

I did try reproducing this issue and found I got this error:

concourse-1     | containerd-garden-backend exited with error: setup host network failed: create chain or flush if exists failed: running [/usr/sbin/iptables -t filter -N CONCOURSE-OPERATOR --wait]: exit status 3: iptables v1.8.7 (legacy): can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
concourse-1     | Perhaps iptables or your kernel needs to be upgraded.
concourse-1     |
concourse-1     | containerd exited with nil
concourse-1     |
concourse-1     | healthcheck exited with nil
concourse-1     | debug exited with nil
concourse-1     | baggageclaim exited with nil
concourse-1     | container-sweeper exited with nil
concourse-1     | volume-sweeper exited with nil
concourse-1     | beacon exited with nil
concourse-1     |
concourse-1     | web exited with nil

Which I was able to fix by running sudo modprobe iptables_filter. So this was just an issue with my host machine. Maybe you're running in a similar problem?

You can share more logs since further errors may tell us whats wrong.
If the concourse_1 container never has network connectivity to the concourse_db_1 container, then this would be an issue with your docker setup (I think). More logs would help!

@taylorsilva
Copy link
Member

No further info provided and no one else reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants