linuxserver / docker-sabnzbd

GNU General Public License v3.0
268 stars 66 forks source link

How do i disable ipv6 #237

Closed awptechnologies closed 2 weeks ago

awptechnologies commented 2 weeks ago

Is there an existing issue for this?

Current Behavior

The Container fails to start the listener on port 8080. Im guessing this is because my host has ipv6 disabled at kernel level. This is to ensure it is only routing through my vlan that is connected to nord vpn.

In your other containers there is a folder called defaults. Which contains an nginx config. For all the other containers of yours i use i just map this as a volume and edit the nginx config to remove the ipv6 server and they work flawlessly. The sabnzbd image has the defaults folder but it is empty. The only thing i see to configure the container is sabnzbd.ini and in that config is a variable host = :: which im sure is listening on ipv6. When i try to change it to 0.0.0.0 it is automatically changed back to the ::. Very frustrating.

Expected Behavior

I exspect the container to listen on port 8080 and allow me to use this. There is no clear way to disable ipv6.

Steps To Reproduce

Start container It fails

Environment

Arch Linux

Pacman Repo

CPU architecture

x86-64

Docker creation

docker compose up -d

Container logs

2024-10-17 20:33:09,946::INFO::[_cplogging:213] [17/Oct/2024:20:33:09] ENGINE Bus EXITING

2024-10-17 20:33:09,946::INFO::[_cplogging:213] [17/Oct/2024:20:33:09] ENGINE Bus EXITED

2024-10-17 20:33:12,957::INFO::[SABnzbd:1142] --------------------------------

2024-10-17 20:33:12,958::INFO::[SABnzbd:1143] SABnzbd.py-4.3.3

2024-10-17 20:33:12,958::INFO::[SABnzbd:1153] Commit = f24b3ced280e381d0aac8bd9d9d98930ad397a59

2024-10-17 20:33:12,958::INFO::[SABnzbd:1155] Full executable path = /app/sabnzbd/SABnzbd.py

2024-10-17 20:33:12,958::INFO::[SABnzbd:1156] Arguments = "/app/sabnzbd/SABnzbd.py" "--config-file" "/config" "--server" "::"

2024-10-17 20:33:12,958::INFO::[SABnzbd:1157] Python-version = 3.12.7 (main, Oct  7 2024, 11:30:19) [GCC 13.2.1 20240309]

2024-10-17 20:33:12,959::INFO::[SABnzbd:1158] Dockerized = True

2024-10-17 20:33:12,959::INFO::[SABnzbd:1159] CPU architecture = x86_64

2024-10-17 20:33:12,967::INFO::[SABnzbd:1162] Platform = posix - Linux-6.11.3-arch1-1-x86_64-with

2024-10-17 20:33:12,967::INFO::[SABnzbd:1168] Preferred encoding = UTF-8

2024-10-17 20:33:12,968::INFO::[SABnzbd:1190] SSL version = OpenSSL 3.3.2 3 Sep 2024

2024-10-17 20:33:12,970::INFO::[SABnzbd:1199] Certifi version = 2024.07.04

2024-10-17 20:33:12,970::INFO::[SABnzbd:1200] Loaded additional certificates from /lsiopy/lib/python3.12/site-packages/certifi/cacert.pem

2024-10-17 20:33:12,971::INFO::[SABnzbd:1210] Using INI file /config/sabnzbd.ini

2024-10-17 20:33:12,972::INFO::[filesystem:1160] [N/A] /config/admin/totals10.sab missing

2024-10-17 20:33:12,995::INFO::[postproc:143] Loading postproc queue

2024-10-17 20:33:12,996::INFO::[filesystem:1160] [N/A] /config/admin/postproc2.sab missing

2024-10-17 20:33:12,997::INFO::[filesystem:1160] [N/A] /config/admin/watched_data2.sab missing

2024-10-17 20:33:12,997::INFO::[filesystem:1160] [N/A] /config/admin/rss_data.sab missing

2024-10-17 20:33:12,997::INFO::[scheduler:190] Scheduling RSS interval task every 60 min (delay=17)

2024-10-17 20:33:12,998::INFO::[scheduler:200] Scheduling version check in 10 minutes and daily at 19:38

2024-10-17 20:33:12,998::INFO::[scheduler:215] Setting schedule for midnight auto history-purge

2024-10-17 20:33:12,998::INFO::[scheduler:224] Setting schedule for midnight BPS reset

2024-10-17 20:33:12,999::INFO::[scheduler:233] Setting schedule for midnight server expiration check

2024-10-17 20:33:12,999::INFO::[scheduler:242] Setting schedule for server quota check

2024-10-17 20:33:12,999::INFO::[filesystem:1160] [N/A] /config/admin/queue10.sab missing

2024-10-17 20:33:13,000::INFO::[__init__:328] All processes started

2024-10-17 20:33:13,000::INFO::[SABnzbd:340] Template location for Glitter is /app/sabnzbd/interfaces/Glitter

2024-10-17 20:33:13,001::INFO::[SABnzbd:340] Template location for Config is /app/sabnzbd/interfaces/Config

2024-10-17 20:33:13,002::INFO::[misc:1260] [N/A] Running external command: ['/usr/bin/unrar']

2024-10-17 20:33:13,009::INFO::[misc:1260] [N/A] Running external command: ['/usr/bin/7zz']

2024-10-17 20:33:13,017::INFO::[misc:1260] [N/A] Running external command: ['/usr/local/bin/par2', '-V']

2024-10-17 20:33:13,023::INFO::[SABnzbd:425] SABCTools module (v8.2.5)... found!

2024-10-17 20:33:13,023::INFO::[SABnzbd:426] SABCTools module is using SIMD set: AVX2

2024-10-17 20:33:13,024::INFO::[SABnzbd:427] SABCTools module is linked to OpenSSL: True

2024-10-17 20:33:13,024::INFO::[SABnzbd:447] Cryptography module (v43.0.0)... found!

2024-10-17 20:33:13,024::INFO::[SABnzbd:453] par2 binary... found (/usr/local/bin/par2)

2024-10-17 20:33:13,024::INFO::[SABnzbd:460] UNRAR binary... found (/usr/bin/unrar)

2024-10-17 20:33:13,025::INFO::[SABnzbd:468] UNRAR binary version 7.01

2024-10-17 20:33:13,025::INFO::[SABnzbd:475] 7za binary... found (/usr/bin/7zz)

2024-10-17 20:33:13,025::INFO::[SABnzbd:477] 7za binary version 23.01

2024-10-17 20:33:13,025::INFO::[SABnzbd:483] nice binary... found (/bin/nice)

2024-10-17 20:33:13,026::INFO::[SABnzbd:487] ionice binary... found (/bin/ionice)

2024-10-17 20:33:13,032::INFO::[SABnzbd:1404] Starting web-interface on :::8080

2024-10-17 20:33:13,033::INFO::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE Bus STARTING

2024-10-17 20:33:13,049::INFO::[notifier:157] Sending notification: Error - [17/Oct/2024:20:33:13] ENGINE Error in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server object at 0x71779aa91820>>

Traceback (most recent call last):

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/process/wspbus.py", line 229, in publish

    output.append(listener(*args, **kwargs))

                  ^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/_cpserver.py", line 191, in start

    super(Server, self).start()

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/process/servers.py", line 176, in start

    portend.free(*self.bind_addr, timeout=Timeouts.free)

  File "/lsiopy/lib/python3.12/site-packages/portend.py", line 122, in free

    Checker(timeout=0.1).assert_free(host, port)

  File "/lsiopy/lib/python3.12/site-packages/portend.py", line 71, in assert_free

    list(itertools.starmap(self._connect, info))

  File "/lsiopy/lib/python3.12/site-packages/portend.py", line 74, in _connect

    s = socket.socket(af, socktype, proto)

        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/socket.py", line 233, in __init__

    _socket.socket.__init__(self, family, type, proto, fileno)

OSError: [Errno 97] Address family not supported by protocol

 (type=error, job_cat=None)

2024-10-17 20:33:13,049::ERROR::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE Error in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server object at 0x71779aa91820>>

Traceback (most recent call last):

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/process/wspbus.py", line 229, in publish

    output.append(listener(*args, **kwargs))

                  ^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/_cpserver.py", line 191, in start

    super(Server, self).start()

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/process/servers.py", line 176, in start

    portend.free(*self.bind_addr, timeout=Timeouts.free)

  File "/lsiopy/lib/python3.12/site-packages/portend.py", line 122, in free

    Checker(timeout=0.1).assert_free(host, port)

  File "/lsiopy/lib/python3.12/site-packages/portend.py", line 71, in assert_free

    list(itertools.starmap(self._connect, info))

  File "/lsiopy/lib/python3.12/site-packages/portend.py", line 74, in _connect

    s = socket.socket(af, socktype, proto)

        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.12/socket.py", line 233, in __init__

    _socket.socket.__init__(self, family, type, proto, fileno)

OSError: [Errno 97] Address family not supported by protocol

2024-10-17 20:33:13,051::ERROR::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE Shutting down due to error in start listener:

Traceback (most recent call last):

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/process/wspbus.py", line 267, in start

    self.publish('start')

  File "/lsiopy/lib/python3.12/site-packages/cherrypy/process/wspbus.py", line 247, in publish

    raise exc

cherrypy.process.wspbus.ChannelFailures: OSError(97, 'Address family not supported by protocol')

2024-10-17 20:33:13,051::INFO::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE Bus STOPPING

2024-10-17 20:33:13,051::INFO::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('::', 8080)) already shut down

2024-10-17 20:33:13,052::INFO::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE Bus STOPPED

2024-10-17 20:33:13,052::INFO::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE Bus EXITING

2024-10-17 20:33:13,052::INFO::[_cplogging:213] [17/Oct/2024:20:33:13] ENGINE Bus EXITED
github-actions[bot] commented 2 weeks ago

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

Roxedus commented 2 weeks ago

-e HAS_IPV6=false

awptechnologies commented 2 weeks ago

does this work on all linuxserver containers?

Roxedus commented 2 weeks ago

No, as disabling ipv6 is a solution from 2010, and shouldn't still be used. You should look into the source of each container to check if we have a implementation.

awptechnologies commented 2 weeks ago

ah gotcha thank you so much though. Worked right away.

awptechnologies commented 2 weeks ago

where do i find this in sorce?