concourse / concourse-docker

Offical concourse/concourse Docker image.
Apache License 2.0
241 stars 153 forks source link

Web not connecting to Db on Fedora 32 #63

Closed RealOrko closed 4 years ago

RealOrko commented 4 years ago

Hi

I have just taken the latest cut of master and I am noticing in the logs for docker-compose up that the web is having trouble connecting to the database:

{"timestamp":"2020-06-01T15:37:52.206102235Z","level":"error","source":"atc","message":"atc.db.failed-to-open-db-retrying","data":{"error":"dial tcp 172.23.0.2:5432: connect: no route to host","session":"3"}}

I am using docker community edition on fedora 22 with the following details:

$ uname -r
5.6.14-300.fc32.x86_64
$ cat /etc/os-release
NAME=Fedora
VERSION="32 (Workstation Edition)"
ID=fedora
VERSION_ID=32
VERSION_CODENAME=""
PLATFORM_ID="platform:f32"
PRETTY_NAME="Fedora 32 (Workstation Edition)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:32"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f32/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=32
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=32
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="Workstation Edition"
VARIANT_ID=workstation
$ docker -v
Docker version 19.03.10, build 9424aeaee9
$ docker-compose -v
docker-compose version 1.25.4, build unknown
$ docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                    NAMES
f139c503fb4b        concourse/concourse   "dumb-init /usr/loca…"   10 minutes ago      Up 7 minutes                                 concourse-docker_worker_1
c1892dcd79da        concourse/concourse   "dumb-init /usr/loca…"   10 minutes ago      Up 7 minutes        0.0.0.0:8080->8080/tcp   concourse-docker_web_1
c17ec6e66ba3        postgres              "docker-entrypoint.s…"   10 minutes ago      Up 7 minutes        5432/tcp                 concourse-docker_db_1

I also tried a few network mode configurations (bridge & host) without any luck. Is there anything else you could recommend that I could try?

Thanks

RealOrko commented 4 years ago

Finally found the problem! After disabling firewalld everything started working.

sudo systemctl stop firewalld
sudo systemctl disable firewalld