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

docker version tag > 2021.11: ERROR: ServerIPv6 Environment variable (X:X:X:X:X:X:X:X) doesn't appear to be a valid IPv6 address #961

Closed
martialt opened this issue Jan 1, 2022 · 11 comments

Comments

@martialt
Copy link

martialt commented Jan 1, 2022

Versions

  • Pi-hole: ??
  • AdminLTE: ??
  • FTL: v5.12
  • Docker tag: 2021.12

Platform

  • OS and version: Ubuntu 20.04.3 LTS
  • Platform: Docker

Expected behavior

Start Pi-hole container with IPv6 support.

Actual behavior / bug

RTNETLINK answers: Network is unreachable
ERROR: ServerIPv6 Environment variable (X:X:X:X:X:X:X:X) doesn't appear to be a valid IPv6 address
  TIP: If your server is not IPv6 enabled just remove '-e ServerIPv6' from your docker container

Steps to reproduce

Steps to reproduce the behavior:

  1. Start container with image version > 2021.11 and env var ServerIPv6
@DL6ER DL6ER transferred this issue from pi-hole/FTL Jan 1, 2022
@dschaper
Copy link
Member

dschaper commented Jan 1, 2022

Without seeing the value of the envar entry or the docker-compose file, it's hard to troubleshoot.

@martialt
Copy link
Author

martialt commented Jan 1, 2022

Hi Dan,

I cannot show you my public IPv6 address but she is normal, I just upgrade the version of the docker image from v2021.11 to v2021.12, an error is raising and the container did not start anymore.
I attached the docker inspect output and the docker compose file.
My IPv4, IPv6 and virtual hostname are masked.

Regards,

docker-compose.yml.log
pihole_container_inspect.json.log

@martialt
Copy link
Author

martialt commented Jan 1, 2022

Also the docker container logs output.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying... 
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing... 
 ::: Starting docker specific checks & setup for docker pihole/pihole
Assigning random password: aYpZtJlq
RTNETLINK answers: Network is unreachable
ERROR: ServerIPv6 Environment variable (mypublicipv6masked) doesn't appear to be a valid IPv6 address
  TIP: If your server is not IPv6 enabled just remove '-e ServerIPv6' from your docker container
[cont-init.d] 20-start.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.

@PromoFaux
Copy link
Member

Here is where the checks are failing (line 65) :

if [[ "$(nc -6 -w1 -z "$ServerIPv6" 53 2>&1)" != "" ]] && ! ip route get "$ServerIPv6" > /dev/null ; then
echo "ERROR: ServerIPv6 Environment variable ($ServerIPv6) doesn't appear to be a valid IPv6 address"
echo " TIP: If your server is not IPv6 enabled just remove '-e ServerIPv6' from your docker container"
exit 1
fi

This code has not been touched for a couple of years, so nothing should have changed here between the two tagged versions.

I can maybe suggest running those two checks manually on the CLI, and from within the container to see if that gives you any clues, but it looks as though maybe it's a networking issue - as opposed to an issue with the IP string you are passing in

@martialt
Copy link
Author

martialt commented Jan 2, 2022

Hi,

I did some tests and I think the nc command is not included anymore inside the base image.
The base image has changed between 2021.11 and 2021.12.

ARG PIHOLE_BASE
FROM "${PIHOLE_BASE:-ghcr.io/pi-hole/docker-pi-hole-base:buster-slim}"

@PromoFaux
Copy link
Member

Oh, yes of course - egg on my face! It was removed from the core Pi-hole install script (although it will be re-added for the next release), and so it does not get installed when it runs in the docker build script.

I'll add it to the base image and tag a new container asap

PromoFaux added a commit to pi-hole/docker-base-images that referenced this issue Jan 2, 2022
@martialt
Copy link
Author

martialt commented Jan 3, 2022

Happens !
Thank you and happy new year...

@X-Xadro
Copy link

X-Xadro commented Jan 4, 2022

With me what made it work was that my ENV was using 'ServerIP' and 'ServerIPv6' and i read in the README.md that they were going to be deprecated so i changed them into 'FTLCONF_REPLY_ADDR4' and 'FTLCONF_REPLY_ADDR6'

But right before that i also did this: https://docs.docker.com/config/daemon/ipv6/ 'Enable IPv6 support'

Also want to point i'm a total newb so i only half understood what i did. But it did work so i'm happy.

@PromoFaux
Copy link
Member

This should be fixed in the latest image.

ServerIP and ServerIPv6 will be deprecated at some point, just need to face the task of going through and untangling them from the rest of the image... (per #956)

@arctic-alpaca
Copy link

Using ServerIP and ServerIPv6 with the latest image still leads to the error described in #961 (comment).

Replacing ServerIP and ServerIPv6 with FTLCONF_REPLY_ADDR4 and FTLCONF_REPLY_ADDR6 allowed the container to start as normal.

@martialt
Copy link
Author

martialt commented Jan 7, 2022

I replace them and works with image tag 2022.01.1.
Thanks

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

No branches or pull requests

5 participants