No restricted local running posible

Report & discuss bugs found in 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.
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

No restricted local running posible

Post by Saiya_Jin_Vegeta »

Simple description:

When I set the host to 127.0.0.1, localhost or ::1 the webinterface stays available on all interfaces and is therefore not limited to only the local computer.
Have tried to re-setup, manual change etc. All same result.

Running Sabnzbd 0.7.0 Final
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: No restricted local running posible

Post by sander »

Which os?

Did you restart SABnzbd?
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

Re: No restricted local running posible

Post by Saiya_Jin_Vegeta »

OpenSuse 12.1 X64
Yes I did multiple times try to get it working by restart.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: No restricted local running posible

Post by sander »

Post the output of the following commands :

Code: Select all

 grep -i  starting  ~/.sabnzbd/logs/sabnzbd.log
 grep host ~/.sabnzbd/sabnzbd.ini
 netstat -apon | grep :8080
NB: the last command assumes that SAB is running on port 8080. If not, change the command accordingly.
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

Re: No restricted local running posible

Post by Saiya_Jin_Vegeta »

I am using an alternate location for my config file:
/etc/sabnzbd/

But underneath it states clearly that it listens on all ports, while in my config file clearly is stated localhost? What is going wrong?

Code: Select all

linux-7ffb:/var/log # grep -i  starting  ~/.sabnzbd/logs/sabnzbd.log
2012-06-11 22:13:17,147::INFO::[SABnzbd:1459] Starting web-interface on 0.0.0.0:8080
2012-06-11 22:13:17,147::INFO::[_cplogging:55] [11/Jun/2012:22:13:17] ENGINE Bus STARTING
2012-06-11 22:13:23,109::INFO::[SABnzbd:1528] Starting SABnzbd.py-0.7.0
2012-06-11 22:13:23,111::INFO::[dirscanner:265] Dirscanner starting up
2012-06-11 22:13:23,112::INFO::[urlgrabber:78] URLGrabber starting up
2012-06-11 22:19:38,820::INFO::[SABnzbd:1459] Starting web-interface on 0.0.0.0:8080
2012-06-11 22:19:38,820::INFO::[_cplogging:55] [11/Jun/2012:22:19:38] ENGINE Bus STARTING
2012-06-11 22:19:41,860::INFO::[SABnzbd:1528] Starting SABnzbd.py-0.7.0
2012-06-11 22:19:41,862::INFO::[dirscanner:265] Dirscanner starting up
2012-06-11 22:19:41,863::INFO::[urlgrabber:78] URLGrabber starting up
linux-7ffb:/var/log # grep host ~/.sabnzbd/sabnzbd.ini
host = 0.0.0.0
host = news.ziggo.nl
linux-7ffb:/var/log # netstat -apon | grep :8080
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      13608/python        off (0.00/0/0)
tcp        0      0 192.168.178.11:8080     192.168.178.12:54437    TIME_WAIT   -                   timewait (9.60/0/0)
tcp        0      0 ::1:8080                :::*                    LISTEN      13608/python        off (0.00/0/0)
linux-7ffb:/var/log # grep host /etc/sabnzbd/sabnzbd.ini
host = localhost
host = test.test.com
linux-7ffb:/var/log #
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: No restricted local running posible

Post by shypike »

0.0.0.0 means: listen on all interfaces including the IP of your system,
making it accessible for other computers.
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

Re: No restricted local running posible

Post by Saiya_Jin_Vegeta »

In the sabini, which is used is clearly standing localhost. So or this is wrong or something else is not OK (in config or in SAB)
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: No restricted local running posible

Post by sander »

Saiya_Jin_Vegeta wrote:In the sabini, which is used is clearly standing localhost. So or this is wrong or something else is not OK (in config or in SAB)
Can you do the grep on that sabini and post the output? And how do you know SABnzbd is using the sabini?
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

Re: No restricted local running posible

Post by Saiya_Jin_Vegeta »

I already inlcuded the dump from:
/etc/sabnzbd/sabnzbd.ini

In the webinterface is clearly stated it uses this config:

Code: Select all

Version:	0.7.0
Uptime:	45m
Config File:	/etc/sabnzbd/sabnzbd.ini
Used cache:	Cached 0 articles (0 B)
Parameters:	/opt/SABnzbd/SABnzbd.py -f /etc/sabnzbd -d --pid /var/run/sabnzbd
Python Version:	2.7.2 (default, Aug 19 2011, 20:41:43) [GCC]
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

Re: No restricted local running posible

Post by Saiya_Jin_Vegeta »

No-one?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: No restricted local running posible

Post by shypike »

What does it say in Config->General? It shows the host address.
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

Re: No restricted local running posible

Post by Saiya_Jin_Vegeta »

SABnzbd Host : localhost
Host SABnzbd should listen on.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: No restricted local running posible

Post by sander »

Can you do this:

Stop SABnzbd
rename all sabnzbd.ini occurences to something else, for example sabnzbd.NNN
Start SABnzbd ... it shoud start the wizard. If so, fill it out with "listen locally only"
After the wizard, what is the situation with netstat etc ...
Saiya_Jin_Vegeta
Release Testers
Release Testers
Posts: 12
Joined: November 7th, 2009, 4:20 pm

Re: No restricted local running posible

Post by Saiya_Jin_Vegeta »

Same result.
Did already do that before and just checked again.
User avatar
sander
Release Testers
Release Testers
Posts: 9062
Joined: January 22nd, 2008, 2:22 pm

Re: No restricted local running posible

Post by sander »

I found this piece of code in SABnzbd.py:

Code: Select all

    try:
        info = socket.getaddrinfo(socket.gethostname(), None)
    except:
        # Hostname does not resolve, use 0.0.0.0
        cherryhost = '0.0.0.0'
        info = socket.getaddrinfo(localhost, None)
So ... maybe it is caused there? Some ways to check for that:

Easy check #1: edit SABnzbd.py and change that line to cherryhost = '1.2.3.4'. Run SAB and see what port it binds too.
Easy check #2: edit SABnzbd.py, and put in that except something like "logging.error("ouch ... wrong wrong")
Easy check #3: open python, and type two commands like below.

Code: Select all

sander@R540:~$ python
Python 2.7.3 (default, Apr 20 2012, 22:39:59) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import socket
>>> socket.getaddrinfo(socket.gethostname(), None)

[(2, 1, 6, '', ('127.0.1.1', 0)), (2, 2, 17, '', ('127.0.1.1', 0)), (2, 3, 0, '', ('127.0.1.1', 0))]
>>> 
sander@R540:~$ 

And bit further is also a '0.0.0.0' assignment, but only if it is already '0.0.0.0' ???

Code: Select all

    # 0.0.0.0 will listen on all ipv4 interfaces (no ipv6 addresses)
    elif cherryhost == '0.0.0.0':
        # Just take the gamble for this
        cherryhost = '0.0.0.0'
        browserhost = localhost
So I don't understand this piece of code, but I assume it is not setting it to 0.0.0.0.


HTH
Post Reply