[GH-ISSUE #593] bash: /dev/tcp/db/5432: Invalid argument #435

Closed
opened 2026-02-25 23:42:26 +03:00 by kerem · 1 comment
Owner

Originally created by @verilog15 on GitHub (Dec 24, 2021).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/593

Hi! I'm trying to test Healthchecks to see if it can help me. I want to be able to host it on my own so I wanted to try to create a Docker image. I tried to follow the steps but I'm getting:

$ cd docker
$ sudo docker-compose up --build
Building web
Step 1/22 : FROM python:3.9-slim-buster as builder
---> 2f2210ecbb1c
Step 2/22 : ENV http_proxy=http://proxy.mycompany.com:911
---> Using cache
---> 5fa7e64f0b54
Step 3/22 : ENV https_proxy=http://proxy.mycompany.com:912
---> Using cache
---> 087836e1ba67
Step 4/22 : COPY requirements.txt /tmp
---> Using cache
---> 7f3fc1b67d2c
Step 5/22 : RUN apt update && apt install -y build-essential libpq-dev
---> Using cache
---> 009ee312c0e6
Step 6/22 : RUN if [ dpkg --print-architecture = "armhf" ]; then printf "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; fi
---> Using cache
---> e86f635113fe
Step 7/22 : RUN pip wheel --wheel-dir /wheels -r /tmp/requirements.txt
---> Using cache
---> fe7fd995dfc5
Step 8/22 : RUN pip wheel --wheel-dir /wheels apprise uwsgi
---> Using cache
---> a3cca45f7f11

Step 9/22 : FROM python:3.9-slim-buster
---> 2f2210ecbb1c
Step 10/22 : ENV http_proxy=http://proxy.mycompany.com:911
---> Using cache
---> 5fa7e64f0b54
Step 11/22 : ENV https_proxy=http://proxy.mycompany.com:912
---> Using cache
---> 087836e1ba67
Step 12/22 : RUN useradd --system hc
---> Using cache
---> 69c7b079fbd5
Step 13/22 : ENV PYTHONUNBUFFERED=1
---> Using cache
---> c23c6b79976e
Step 14/22 : WORKDIR /opt/healthchecks
---> Using cache
---> c038e7bfd043
Step 15/22 : COPY requirements.txt /tmp
---> Using cache
---> 8231b716c566
Step 16/22 : COPY --from=builder /wheels /wheels
---> Using cache
---> a3b2c7c3309d
Step 17/22 : RUN apt update && apt install -y libpq5 && rm -rf /var/apt/cache
---> Using cache
---> e698a0cbd41a
Step 18/22 : RUN pip install --no-cache /wheels/*
---> Using cache
---> 5a77a039a08d
Step 19/22 : COPY . /opt/healthchecks/
---> Using cache
---> 7bb3ae6d4a88
Step 20/22 : RUN rm -f /opt/healthchecks/hc/local_settings.py && DEBUG=False SECRET_KEY=build-key ./manage.py collectstatic --noinput && DEBUG=False SECRET_KEY=build-key ./manage.py compress
---> Using cache
---> 66a146cf00fd
Step 21/22 : USER hc
---> Using cache
---> 14f73c334cba
Step 22/22 : CMD [ "uwsgi", "/opt/healthchecks/docker/uwsgi.ini"]
---> Using cache
---> 3f260fbaab69

Successfully built 3f260fbaab69
Successfully tagged docker_web:latest
Creating docker_db_1 ... done
Creating docker_web_1 ... done
Attaching to docker_db_1, docker_web_1
db_1 | ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
docker_db_1 exited with code 2
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument
web_1 | bash: db: Temporary failure in name resolution
web_1 | bash: /dev/tcp/db/5432: Invalid argument

Two things to note:

  • I'm behind proxy (you can see that I edited the Dockerfile to set PROXY envs in both sections).
  • I didn't change the .env file. Maybe this is the reason, but all of the envs that were asked to update in the README, are related to mails and I'm currently just want to test the UI without setting the emails.

How to fix it?

Originally created by @verilog15 on GitHub (Dec 24, 2021). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/593 Hi! I'm trying to test Healthchecks to see if it can help me. I want to be able to host it on my own so I wanted to try to create a Docker image. I tried to follow the [steps](https://healthchecks.io/docs/self_hosted_docker/) but I'm getting: > $ cd docker > $ sudo docker-compose up --build Building web Step 1/22 : FROM python:3.9-slim-buster as builder ---> 2f2210ecbb1c Step 2/22 : ENV http_proxy=http://proxy.mycompany.com:911 ---> Using cache ---> 5fa7e64f0b54 Step 3/22 : ENV https_proxy=http://proxy.mycompany.com:912 ---> Using cache ---> 087836e1ba67 Step 4/22 : COPY requirements.txt /tmp ---> Using cache ---> 7f3fc1b67d2c Step 5/22 : RUN apt update && apt install -y build-essential libpq-dev ---> Using cache ---> 009ee312c0e6 Step 6/22 : RUN if [ `dpkg --print-architecture` = "armhf" ]; then printf "[global]\nextra-index-url=https://www.piwheels.org/simple\n" > /etc/pip.conf ; fi ---> Using cache ---> e86f635113fe Step 7/22 : RUN pip wheel --wheel-dir /wheels -r /tmp/requirements.txt ---> Using cache ---> fe7fd995dfc5 Step 8/22 : RUN pip wheel --wheel-dir /wheels apprise uwsgi ---> Using cache ---> a3cca45f7f11 > > Step 9/22 : FROM python:3.9-slim-buster ---> 2f2210ecbb1c Step 10/22 : ENV http_proxy=http://proxy.mycompany.com:911 ---> Using cache ---> 5fa7e64f0b54 Step 11/22 : ENV https_proxy=http://proxy.mycompany.com:912 ---> Using cache ---> 087836e1ba67 Step 12/22 : RUN useradd --system hc ---> Using cache ---> 69c7b079fbd5 Step 13/22 : ENV PYTHONUNBUFFERED=1 ---> Using cache ---> c23c6b79976e Step 14/22 : WORKDIR /opt/healthchecks ---> Using cache ---> c038e7bfd043 Step 15/22 : COPY requirements.txt /tmp ---> Using cache ---> 8231b716c566 Step 16/22 : COPY --from=builder /wheels /wheels ---> Using cache ---> a3b2c7c3309d Step 17/22 : RUN apt update && apt install -y libpq5 && rm -rf /var/apt/cache ---> Using cache ---> e698a0cbd41a Step 18/22 : RUN pip install --no-cache /wheels/* ---> Using cache ---> 5a77a039a08d Step 19/22 : COPY . /opt/healthchecks/ ---> Using cache ---> 7bb3ae6d4a88 Step 20/22 : RUN rm -f /opt/healthchecks/hc/local_settings.py && DEBUG=False SECRET_KEY=build-key ./manage.py collectstatic --noinput && DEBUG=False SECRET_KEY=build-key ./manage.py compress ---> Using cache ---> 66a146cf00fd Step 21/22 : USER hc ---> Using cache ---> 14f73c334cba Step 22/22 : CMD [ "uwsgi", "/opt/healthchecks/docker/uwsgi.ini"] ---> Using cache ---> 3f260fbaab69 > > Successfully built 3f260fbaab69 Successfully tagged docker_web:latest Creating docker_db_1 ... done Creating docker_web_1 ... done Attaching to docker_db_1, docker_web_1 db_1 | ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument docker_db_1 exited with code 2 web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument web_1 | bash: db: Temporary failure in name resolution web_1 | bash: /dev/tcp/db/5432: Invalid argument Two things to note: - I'm behind proxy (you can see that I edited the `Dockerfile` to set PROXY envs in both sections). - I didn't change the `.env` file. Maybe this is the reason, but all of the envs that were asked to update in the README, are related to mails and I'm currently just want to test the UI without setting the emails. How to fix it?
kerem closed this issue 2026-02-25 23:42:26 +03:00
Author
Owner

@cuu508 commented on GitHub (Jan 7, 2022):

Hello,

The issue is that the database container does not come up, and consequently the web container fails too because it cannot connect to the database. I googled ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted and found this issue: https://github.com/docker-library/postgres/issues/884#issuecomment-926855364

In that issue, the suggestion is to update docker version.

@verilog15, can you check if you're on a relatively recent docker version? For the record, I'm currently running

$ docker --version
Docker version 20.10.12, build e91ed57
$ docker-compose --version
docker-compose version 1.25.0, build unknown
<!-- gh-comment-id:1007413408 --> @cuu508 commented on GitHub (Jan 7, 2022): Hello, The issue is that the database container does not come up, and consequently the web container fails too because it cannot connect to the database. I googled `ls: cannot access '/docker-entrypoint-initdb.d/': Operation not permitted` and found this issue: https://github.com/docker-library/postgres/issues/884#issuecomment-926855364 In that issue, the suggestion is to update docker version. @verilog15, can you check if you're on a relatively recent docker version? For the record, I'm currently running ``` $ docker --version Docker version 20.10.12, build e91ed57 $ docker-compose --version docker-compose version 1.25.0, build unknown ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#435
No description provided.