Page 1 of 1

Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 16th, 2012, 10:13 am
by rvrijbroek
Description of the bug and steps to reproduce:
Sabnzbd crashes at startup after i've changed the ipv6 settings in the windows registry.
I've used the Microsoft instruction to set behaviour that windows first picks ipv4, and uses ipv6 as backup using the instructions at: http://support.microsoft.com/kb/929852#letmefixit
Step 5b: value: 0x20

I currently do not have a workaround yet, except changing the registry settings back to default.

System information:
Version: 0.7.1
OS: windows 7 Pro 64bit
Install-type: windows installer
Skin: default
Firewall software: Windows 7 firewall
Virusscanner: Microsoft Security Essentials
Ipv6: Yes
Issue reproducable: yes, follow the steps in MS link above.
Log when starting using console:
C:\Program Files (x86)\SABnzbd>SABnzbd-console.exe
2012-07-16 17:09:47,966::ERROR::[_cplogging:55] [16/Jul/2012:17:09:47] ENGINE Er
ror in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server
object at 0x0246BB90>>
Traceback (most recent call last):
File "cherrypy\process\wspbus.pyo", line 147, in publish
File "cherrypy\_cpserver.pyo", line 90, in start
File "cherrypy\process\servers.pyo", line 55, in start
File "cherrypy\process\servers.pyo", line 260, in wait_for_free_port
IOError: Port 8080 not free on 'localhost'

2012-07-16 17:09:47,967::ERROR::[_cplogging:55] [16/Jul/2012:17:09:47] ENGINE Sh
utting down due to error in start listener:
Traceback (most recent call last):
File "cherrypy\process\wspbus.pyo", line 184, in start
File "cherrypy\process\wspbus.pyo", line 147, in publish
File "cherrypy\_cpserver.pyo", line 90, in start
File "cherrypy\process\servers.pyo", line 55, in start
File "cherrypy\process\servers.pyo", line 260, in wait_for_free_port
IOError: Port 8080 not free on 'localhost'

2012-07-16 17:09:48,072::ERROR::[sabnzbd:1487] Failed to start web-interface:
Traceback (most recent call last):
File "SABnzbd.py", line 1479, in main
File "cherrypy\process\wspbus.pyo", line 184, in start
File "cherrypy\process\wspbus.pyo", line 147, in publish
File "cherrypy\_cpserver.pyo", line 90, in start
File "cherrypy\process\servers.pyo", line 55, in start
File "cherrypy\process\servers.pyo", line 260, in wait_for_free_port
IOError: Port 8080 not free on 'localhost'
2012-07-16 17:09:48,072::ERROR::[sabnzbd:302] Kan web interface niet starten : P
ort 8080 not free on 'localhost'

C:\Program Files (x86)\SABnzbd>

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 16th, 2012, 10:33 am
by sander
Patient: "Doctor, it hurts when I press here"
Doctor: "Don't press then!"

Changing your registry: bad!
Changing your registry to give IPv6 a lower priority: very bad!

;-)

A bit more serious:
you could have a look at the netstat analysis on http://wiki.sabnzbd.org/faq#toc32 and report what's on port 8080
instead of 'localhost' fill out 127.0.0.1 and then 0.0.0.0 to what that gives

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 16th, 2012, 11:31 am
by rvrijbroek
Hi Sander.
Thanks for your response.

FYI: ipv6 is currently not supported by my ISP and is therefore running via a tunnel. That's why ipv6 in my set-up is currently is way slower than via ipv4.
So i prefer ipv4 to ipv6 until my ISP is ready for dual stack (should be end of 2012).

Regarding your 'morge serious' reply ;)
I've checked netstat quickly but found no entries at port 8080.
Will do a better analysis shortly. Will let you know the results asap.

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 17th, 2012, 10:30 am
by rvrijbroek
Update: Just installed 0.7.2RC2 (SABnzbd-0.7.2RC2-win32-setup.exe).
It installed fine, but when i apply the IPV6 settings as described in my post, it shuts down again.

Output of console:
C:\Program Files (x86)\SABnzbd>SABnzbd-console.exe
2012-07-17 17:22:57,125::ERROR::[_cplogging:55] [17/Jul/2012:17:22:57] ENGINE Er
ror in 'start' listener <bound method Server.start of <cherrypy._cpserver.Server
object at 0x028DBB90>>
Traceback (most recent call last):
File "cherrypy\process\wspbus.pyo", line 147, in publish
File "cherrypy\_cpserver.pyo", line 90, in start
File "cherrypy\process\servers.pyo", line 55, in start
File "cherrypy\process\servers.pyo", line 260, in wait_for_free_port
IOError: Port 8080 not free on 'localhost'

2012-07-17 17:22:57,125::ERROR::[_cplogging:55] [17/Jul/2012:17:22:57] ENGINE Sh
utting down due to error in start listener:
Traceback (most recent call last):
File "cherrypy\process\wspbus.pyo", line 184, in start
File "cherrypy\process\wspbus.pyo", line 147, in publish
File "cherrypy\_cpserver.pyo", line 90, in start
File "cherrypy\process\servers.pyo", line 55, in start
File "cherrypy\process\servers.pyo", line 260, in wait_for_free_port
IOError: Port 8080 not free on 'localhost'

2012-07-17 17:22:57,246::ERROR::[sabnzbd:1485] Failed to start web-interface:
Traceback (most recent call last):
File "SABnzbd.py", line 1477, in main
File "cherrypy\process\wspbus.pyo", line 184, in start
File "cherrypy\process\wspbus.pyo", line 147, in publish
File "cherrypy\_cpserver.pyo", line 90, in start
File "cherrypy\process\servers.pyo", line 55, in start
File "cherrypy\process\servers.pyo", line 260, in wait_for_free_port
IOError: Port 8080 not free on 'localhost'
2012-07-17 17:22:57,246::ERROR::[sabnzbd:302] Kan web interface niet starten : P
ort 8080 not free on 'localhost'

C:\Program Files (x86)\SABnzbd>
Netstat results: Following steps from: http://wiki.sabnzbd.org/faq#toc32
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\rijbroek>netstat -aon | find ":8080"

C:\Users\rijbroek>netstat -aon | find ":8090"

C:\Users\rijbroek>netstat -aon | find ":8080"

C:\Users\rijbroek>netstat -aon | find ":9090"

C:\Users\rijbroek>

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 17th, 2012, 11:38 am
by shypike
What happens when you type this in a command prompt?
ping localhost

Also, can you try this work-around, from a command prompt:
"c:\program files (x86)\sabnzbd\sabnzbd-console.exe" --server 127.0.0.1:8080

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 17th, 2012, 1:20 pm
by shypike
rvrijbroek wrote: I've used the Microsoft instruction to set behaviour that windows first picks ipv4, and uses ipv6 as backup using the instructions at: http://support.microsoft.com/kb/929852#letmefixit
Step 5b: value: 0x20
I'm trying to reproduce your problem.
Step 5b is not 0x20, that value is listed under 5c

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 17th, 2012, 1:31 pm
by shypike
Right, I got it now.
There is something going wrong, because Win7 behaves not like expected.

The work-around for you is this:
"c:\program files (x86)\SABnzbd\sabnzbd.exe" --no_ipv6

You have to start only once like this, because the --no_ipv6 flag is remembered.

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 17th, 2012, 7:31 pm
by rvrijbroek
Will try! Keep you posted. Tnx

Re: Help With Categories

Posted: July 18th, 2012, 12:14 am
by shypike
I figured it all out. 0.7.2 will have a proper fix.

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 18th, 2012, 4:44 am
by rvrijbroek
Super service! many Thanks!

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 18th, 2012, 7:36 am
by rvrijbroek
Just installed 0.7.2 and applied IPV6 settings described above.
Result: Problem solved, excellent!
Thanks again.

Re: Sabnzbd crashes at startup with changed ipv6 settings

Posted: July 18th, 2012, 8:02 am
by shypike
Actually, the --no_ipv6 avoids the bug permanently.
You should actually reset the no_ipv6 flag in Config->Special and restart.
Only that will show you that the problem is really gone.
I have confidence that it has.
BTW: for your case it doesn't really matter.
The faulty code was intended to compensate for the situation where
::1 has precedence over 127.0.0.1. That's not a problem on your system.