# SABnzbd wont start



## john_rambo (Apr 6, 2014)

Hi,
I have installed SABnzbd plus from the ports. The installation went okay but when I try to start SABnzbd I get the sollowing in FIrefox 


```
SABnzbd.py 0.7.16

 

    SABnzbd needs a free tcp/ip port for its internal web server.
    Port 8080 on 127.0.0.1 was tried , but it is not available.
    Some other software uses the port or SABnzbd is already running.

    Please restart SABnzbd with a different port number.

    Open a Terminal window and type the line (example):
        /usr/local/bin/SABnzbd.py --server 127.0.0.1:8081

    If you get this error message again, please try a different number.


Program did not start!
```

No matter which port I try to use with SABnzbd the same result.


----------



## Toast (Apr 6, 2014)

What does `sockstat -46` say?


----------



## john_rambo (Apr 6, 2014)

Toast said:
			
		

> What does `sockstat -46` say?



I have made some configuration changes to rc.conf and /usr/local/etc/sabnzbd

Now when I try to start SABnzbd by `/usr/local/etc/rc.d/sabnzbd start` the command completes without any errors but when I do 

```
$ /usr/local/etc/rc.d/sabnzbd status
sabnzbd is not running.
```


```
$ sockstat -46
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
smmsp    sendmail   1326  6  tcp4   127.0.0.1:47739       127.0.0.1:25
user1    VirtualBox 1317  39 udp4   *:34912               *:*
user1    VirtualBox 1317  40 udp4   *:56270               *:*
user1    VirtualBox 1317  41 udp4   *:46359               *:*
user1    VirtualBox 1317  42 tcp4   192.168.1.2:24016     38.121.104.71:443
user1    VirtualBox 1317  43 udp4   *:45126               *:*
user1    xchat      1302  10 tcp4   192.168.1.2:12881     93.152.160.101:6667
root     Xorg       1140  1  tcp6   *:6000                *:*
root     Xorg       1140  3  tcp4   *:6000                *:*
root     sendmail   1029  3  tcp4   127.0.0.1:25          *:*
user1    python2.7  894   7  tcp4   127.0.0.1:8080        *:*
root     syslogd    703   6  udp6   *:514                 *:*
root     syslogd    703   7  udp4   *:514                 *:*
```


----------



## Toast (Apr 6, 2014)

`cat [file]/etc/rc.conf[/file] && cat [file]/usr/local/etc/sabnzbd/sabnzbd.ini[/file]`
Try `pkill python && service sabnzbd restart`. If your using a firewall (PF/IPFW/IPFILTER), try turning it off.


----------



## john_rambo (Apr 6, 2014)

Toast said:
			
		

> `cat [file]/etc/rc.conf[/file] && cat [file]/usr/local/etc/sabnzbd/sabnzbd.ini[/file]`
> Try `pkill python && service sabnzbd restart`.




```
$  cat /etc/rc.conf && cat /usr/local/etc/sabnzbd/sabnzbd.ini
hostname="sec1"
ifconfig_nfe0="DHCP mtu 1200"
moused_enable="YES"
ntpd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
dbus_enable="YES"
hald_enable="YES"
pf_enable="YES"
pflog_enable="YES"
devfs_system_ruleset="system"
sabnzbd_enable="YES"

cat: /usr/local/etc/sabnzbd/sabnzbd.ini: No such file or directory
$ pkill python && service sabnzbd restart
sabnzbd not running? (check /var/run/sabnzbd/sabnzbd-8080.pid).
Starting sabnzbd.
```


----------



## john_rambo (Apr 6, 2014)

I copied the folder `/root/.sabnzbd/` to`/home/user1/.sabnzbd` because I have mention user1 which is my username in `/usr/local/etc/rc.d/sabnzbd`

Please have a look at this http://paste2.org/MMNXY2xs

sabnzbd.ini

http://paste2.org/HDckgK1y


----------



## Hewitson (Apr 6, 2014)

john_rambo said:
			
		

> Now when I try to start SABnzbd by `/usr/local/etc/rc.d/sabnzbd start` the command completes without any errors but when I do
> 
> ```
> $ /usr/local/etc/rc.d/sabnzbd status
> ...


Run `SABnzbd.py` manually and see if you get any error messages.


----------



## john_rambo (Apr 6, 2014)

Hewitson said:
			
		

> Run `SABnzbd.py` manually and see if you get any error messages.



http://paste2.org/MpC4mP6G


----------



## john_rambo (Apr 6, 2014)

Toast said:
			
		

> If your using a firewall (PF/IPFW/IPFILTER), try turning it off.



I am using PF. I will try turning it off temporarily but if SABnzbd requires PF to be turned off I will have to let it go.


----------



## john_rambo (Apr 6, 2014)

@Toast

Disabling PF worked. The web interface opens now but I cant disable PF permanently. Please give me a workaround.


----------



## trh411 (Apr 6, 2014)

john_rambo said:
			
		

> Disabling PF worked. The web interface opens now but I cant disable PF permanently. Please give me a workaround.


You don't need a workaround so much as you need to configure your pf rules to allow news/sabnzbdplus traffic. Maybe Firewalls and Virus scanners will help?


----------



## john_rambo (Apr 6, 2014)

trh411 said:
			
		

> john_rambo said:
> 
> 
> 
> ...



I found this while watching the logs

```
00:00:00.000000 AF IPv4 (2), length 64: (tos 0x0, ttl 64, id 13394, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (->868)!)
    localhost.21806 > localhost.8080: Flags [S], cksum 0x6ef0 (correct), seq 2324298893, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 15508520 ecr 0], length 0
00:00:01.023210 AF IPv4 (2), length 64: (tos 0x0, ttl 64, id 13395, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (->867)!)
    localhost.26453 > localhost.8080: Flags [S], cksum 0x61f4 (correct), seq 397502012, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 15509543 ecr 0], length 0
00:00:01.046333 AF IPv4 (2), length 64: (tos 0x0, ttl 64, id 13397, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (->865)!)
    localhost.32422 > localhost.8080: Flags [S], cksum 0x12e5 (correct), seq 48803501, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 15510589 ecr 0], length 0
00:00:01.015020 AF IPv4 (2), length 64: (tos 0x0, ttl 64, id 13398, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (->864)!)
    localhost.42603 > localhost.8080: Flags [S], cksum 0x9bcf (correct), seq 3055634125, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 15511604 ecr 0], length 0
00:00:00.139198 AF IPv4 (2), length 64: (tos 0x0, ttl 64, id 13399, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (->863)!)
    localhost.63233 > localhost.23053: Flags [S], cksum 0x7610 (correct), seq 2601843706, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 15511743 ecr 0], length 0
00:00:03.019183 AF IPv4 (2), length 64: (tos 0x0, ttl 64, id 13401, offset 0, flags [DF], proto TCP (6), length 60, bad cksum 0 (->861)!)
    localhost.63233 > localhost.23053: Flags [S], cksum 0x6a44 (correct), seq 2601843706, win 65535, options [mss 16344,nop,wscale 6,sackOK,TS val 15514763 ecr 0], length 0
```

Those localhost.xxxxx, are those port numbers ? If yes then how do I define a rule in pf.conf ?


----------



## john_rambo (Apr 6, 2014)

Solved by adding `set skip on lo0` and reboot. Reloading the rules didn't work for some reason.

Thanks everyone.


----------

