Docker image not running on IPv6-disabled systems

Поиск
Список
Период
Сортировка
От Diego Augusto Molina
Тема Docker image not running on IPv6-disabled systems
Дата
Msg-id CAGOxLdF3HNqW0odzJ52FS5oaAB-Cnr=GKC8k+3gWiN7MnsSgtg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Docker image not running on IPv6-disabled systems  (Diego Augusto Molina <diegoaugustomolina@gmail.com>)
Список pgadmin-support
Hi, thanks for the great job!


* Description:

I have docker installed in updated Void Linux and use "ipv6.disable=1"
in the kernel cmdline to hard-disable IPv6 support systemwide. In
these conditions, the container fails to start with the following log
messages:

$LOG$
NOTE: Configuring authentication for SERVER mode.

[2019-01-15 20:21:22 +0000] [1] [INFO] Starting gunicorn 19.8.1
[2019-01-15 20:21:22 +0000] [1] [ERROR] Retrying in 1 second.
[2019-01-15 20:21:23 +0000] [1] [ERROR] Retrying in 1 second.
[2019-01-15 20:21:24 +0000] [1] [ERROR] Retrying in 1 second.
[2019-01-15 20:21:25 +0000] [1] [ERROR] Retrying in 1 second.
[2019-01-15 20:21:26 +0000] [1] [ERROR] Retrying in 1 second.
[2019-01-15 20:21:27 +0000] [1] [ERROR] Can't connect to ('::', 80)
$LOG$

After that it fails and will fail again if restarted.


* Problem:

So I find it's the "exec gunicorn" lines near the end of the
entrypoint script ("/entrypoint.sh"). It's specifying "[::]" in the
address part of the argument to the "--bind" option to "gunicorn".


* Solution:

It would be enough to change the argument of the "--bind" option to
"gunicorn" from "[::]:${PGADMIN_LISTEN_PORT:-443}" to
"0.0.0.0:${PGADMIN_LISTEN_PORT:-443}" and from
"[::]:${PGADMIN_LISTEN_PORT:-80}" to
"0.0.0.0:${PGADMIN_LISTEN_PORT:-80}".


* Workaround:

As a workaround, I make a new image from the following Dockerfile:

$Dockerfile$
FROM dpage/pgadmin4:latest
RUN sed -i 's/\[::\]/0.0.0.0/' /entrypoint.sh
# This is just candy:
SHELL ["/bin/sh"]
$Dockerfile$


* Notes:

I also tested removing the aforementioned kernel cmdline option and
the original image works like a charm. So this might only affect IPv6
hard-disabled systems.


Thanks again.


В списке pgadmin-support по дате отправления:

Предыдущее
От: Janus
Дата:
Сообщение: Re: Editing integer array cell clears data
Следующее
От: Khushboo Vashi
Дата:
Сообщение: Re: Editing integer array cell clears data