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

[BUG] nginx socket() fails when ipv6 disabled #24

Closed
1 task done
zwimer opened this issue Dec 27, 2023 · 3 comments
Closed
1 task done

[BUG] nginx socket() fails when ipv6 disabled #24

zwimer opened this issue Dec 27, 2023 · 3 comments

Comments

@zwimer
Copy link

zwimer commented Dec 27, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Running the docker container when ipv6 is disabled by the kernel gives: nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol).

Specifically ipv6 was disabled by sudo grubby --args=ipv6.disable=1 --update-kernel=ALL on Fedora 39.

Expected Behavior

It should work just like when ipv6 is enabled.

Steps To Reproduce

  1. Disable ipv6 via sudo grubby --args=ipv6.disable=1 --update-kernel=ALL on Fedora 39 and in docker daemon via {"ipv6": false} in /etc/docker/daemon.json then reboot
  2. docker compose up snapdrop given the compose file below

Environment

- OS: Fedora 39
- How docker service was installed: sudo dnf install docker

CPU architecture

x86-64

Docker creation

From my docker-compose.yml:

  snapdrop:
    image: "lscr.io/linuxserver/snapdrop:latest"
    container_name: "snapdrop"
    restart: always
    ports:
      - 1180:80
    environment:
      - PUID=${SNAPDROP_UID}
      - PGID=${SNAPDROP_GID}
      - TZ=${USER_TZ}
    volumes:
      - ${CONFIG}/snapdrop:/config

Where ${CONFIG}/snapdrop is a valid path on my host system

Container logs

$ docker compose up snapdrop
[+] Running 1/0
 ✔ Container snapdrop  Created                                                                                       0.0s
Attaching to snapdrop
snapdrop  | [migrations] started
snapdrop  | [migrations] 01-nginx-site-confs-default: skipped
snapdrop  | [migrations] 02-default-location: skipped
snapdrop  | [migrations] done
snapdrop  | usermod: no changes
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  |       ██╗     ███████╗██╗ ██████╗
snapdrop  |       ██║     ██╔════╝██║██╔═══██╗
snapdrop  |       ██║     ███████╗██║██║   ██║
snapdrop  |       ██║     ╚════██║██║██║   ██║
snapdrop  |       ███████╗███████║██║╚██████╔╝
snapdrop  |       ╚══════╝╚══════╝╚═╝ ╚═════╝
snapdrop  |
snapdrop  |    Brought to you by linuxserver.io
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  | To support LSIO projects visit:
snapdrop  | https://www.linuxserver.io/donate/
snapdrop  |
snapdrop  | ───────────────────────────────────────
snapdrop  | GID/UID
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  | User UID:    1006
snapdrop  | User GID:    1006
snapdrop  | ───────────────────────────────────────
snapdrop  |
snapdrop  | using keys found in /config/keys
snapdrop  | [custom-init] No custom files found, skipping...
snapdrop  | [ls.io-init] done.
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | Snapdrop is running on port 3000
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
snapdrop  | nginx: [emerg] socket() [::]:80 failed (97: Address family not supported by protocol)
Copy link

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@thespad
Copy link
Member

thespad commented Dec 27, 2023

You'll need to manually update the /config/nginx/site-confs/default.conf to remove the IPv6 listeners on the server blocks, we can't sensibly change our shipped default confs to accomodate users who are inexplicably still disabling IPv6 in (nearly) 2024.

@thespad thespad closed this as not planned Won't fix, can't repro, duplicate, stale Dec 27, 2023
@zwimer
Copy link
Author

zwimer commented Dec 27, 2023

It's disabled due to external firewall issues. But thanks for the info on how to do this!

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

No branches or pull requests

2 participants