Port resets no matter what [docker]

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
SLR
Newbie
Newbie
Posts: 11
Joined: February 23rd, 2019, 11:13 pm

Port resets no matter what [docker]

Post by SLR » February 23rd, 2019, 11:37 pm

I'm running sabnzbd inside a docker container on a linux / arm device. I set the port for the docker container, and try setting sabnzbd's port within the interface, cfg file, even within the container, yet it reverts back. Only after setting the port within the container (usr/bin/sabnzbdplus) and (usr/share/sabnzbdplus/cherrypy/_cpserver(DOT)py), the cfg file stays as what I set it, but the log seems to suggest startup arguments that make the port 8080.

I would post more of the log, but it's recognized as a link, and blocked because I'm a new user. Here's the line I suspect:

Arguments = /usr/bin/sabnzbdplus --config-file /config --server 0.0.0.0:8080



Many thanks to anyone who helps.

User avatar
safihre
Administrator
Administrator
Posts: 3270
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: Port resets no matter what [docker]

Post by safihre » February 24th, 2019, 2:49 am

This is set by the Dockerfile. What specific Docker are you using? Because for example the one we usually recommend from linuxserver has a command line option when starting the Docker to set the port.

SLR
Newbie
Newbie
Posts: 11
Joined: February 23rd, 2019, 11:13 pm

Re: Port resets no matter what [docker]

Post by SLR » February 24th, 2019, 8:42 am

I'm using "lsioarmhf/sabnzbd" which is by linuxserver. I set the port with "-p 8081:8081" with docker, and within sabnzbd's cfg file, but it doesn't work. When I do this with other docker containers (from linuxserver too) it's fine. I've tried many different ports.

Where is the Dockerfile? Maybe I can check if the option is present and correct within there.

User avatar
safihre
Administrator
Administrator
Posts: 3270
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: Port resets no matter what [docker]

Post by safihre » February 24th, 2019, 2:35 pm

I think it's then best to ask them at Github, we don't actually manage these dockers.

It does mention this on the Docker website:
THIS IMAGE IS DEPRECATED. PLEASE USE THE MULTI-ARCH IMAGES AT linuxserver/sabnzbd

SLR
Newbie
Newbie
Posts: 11
Joined: February 23rd, 2019, 11:13 pm

Re: Port resets no matter what [docker]

Post by SLR » February 24th, 2019, 4:19 pm

Thanks for pointing that out, they still list the old image on their website. I switched to the new version, and the same problem persists. Not being able to set the port to anything but the default is quite a big issue, I think the only option is to report this to them as a bug.

I can't keep port 8080, and I can't find a single other sabnzbd image for arm, so do you have any idea how to edit the Dockerfile or where it's stored? Sorry this is more of a docker question, I'll ask elsewhere if you don't know.

User avatar
sander
Release Testers
Release Testers
Posts: 6675
Joined: January 22nd, 2008, 2:22 pm

Re: Port resets no matter what [docker]

Post by sander » February 24th, 2019, 4:53 pm

SLR wrote:
February 24th, 2019, 8:42 am
I set the port with "-p 8081:8081" with docker, and within sabnzbd's cfg file, but it doesn't work.
Why don't you use "-p 8081:8080", meaning "map port 8081 of the host unto 8080 of the docker container". Then no need to reconfigure sabnzbd within the docker.

SLR
Newbie
Newbie
Posts: 11
Joined: February 23rd, 2019, 11:13 pm

Re: Port resets no matter what [docker]

Post by SLR » February 24th, 2019, 5:29 pm

I didn't realize that's why there's two ports, just tried your suggestion and it worked. Problem is, I thought "8080" was being taken up at boot, which would have explained why I couldn't access the interface after rebooting. It seems the interface just doesn't work after a reboot until I remove and create the docker container, regardless of the port.

Again, this only happens with this sabnzbd container. Could there be variables set by the Dockerfile on boot that would cause this effect? I'm stumped.

User avatar
safihre
Administrator
Administrator
Posts: 3270
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: Port resets no matter what [docker]

Post by safihre » February 25th, 2019, 3:21 am

Aaaah that's how that works...

SLR
Newbie
Newbie
Posts: 11
Joined: February 23rd, 2019, 11:13 pm

Re: Port resets no matter what [docker]

Post by SLR » February 25th, 2019, 8:33 am

I tested manually running with python "sabnzbdplus" after reboot, and it doesn't work - python seems to not work at all within the container after reboot. However, it works when the container is removed and created again. Otherwise, these python errors are printed over ssh:

Code: Select all

Traceback (most recent call last):
  File "/usr/lib/python2.7/site.py", line 563, in <module>
    main()
  File "/usr/lib/python2.7/site.py", line 545, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python2.7/site.py", line 272, in addusersitepackages
    user_site = getusersitepackages()
  File "/usr/lib/python2.7/site.py", line 247, in getusersitepackages
    user_base = getuserbase() # this will also set USER_BASE
  File "/usr/lib/python2.7/site.py", line 237, in getuserbase
    USER_BASE = get_config_var('userbase')
  File "/usr/lib/python2.7/sysconfig.py", line 582, in get_config_var
    return get_config_vars().get(name)
  File "/usr/lib/python2.7/sysconfig.py", line 528, in get_config_vars
    _init_posix(_CONFIG_VARS)
  File "/usr/lib/python2.7/sysconfig.py", line 412, in _init_posix
    from _sysconfigdata import build_time_vars
  File "/usr/lib/python2.7/_sysconfigdata.py", line 6, in <module>
    from _sysconfigdata_nd import *
ImportError: No module named _sysconfigdata_nd

User avatar
sander
Release Testers
Release Testers
Posts: 6675
Joined: January 22nd, 2008, 2:22 pm

Re: Port resets no matter what [docker]

Post by sander » February 25th, 2019, 9:58 am

If you have problems with the docker image / container, report them to the docker image maintainers.

A tip about docker containers: treat them like "cattle, not pets". So if it doesn't work, don't try to heal/repair it, but kill it.

roidflower
Newbie
Newbie
Posts: 1
Joined: May 15th, 2019, 2:42 am

Re: Port resets no matter what [docker]

Post by roidflower » May 15th, 2019, 2:44 am

Hi SLR,

Just wanted to share my workaround for this problem. I saw the same behavior on my system, what you sometimes need to do with containers is put them on the bridge network rather then the host network.
After changing my docker-compose to set the network_mode: bridge it redirected the port just fine

Post Reply