Read/Write errors, now service won't start

Support for the Debian/Ubuntu package, created by JCFP.
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
AlphaWolf
Newbie
Newbie
Posts: 9
Joined: April 12th, 2013, 3:49 pm

Read/Write errors, now service won't start

Post by AlphaWolf »

Hi,
A couple of days ago I had some errors (seemed to be related to running out of disk space) that were along the lines of "unable to write" for the config file and I think the log file.
I tried restarting SABnzbd, but it failed. I tried rebooting the server, but it still doesn't start.
If I run "sudo service sabnzbdplus start" I just the status "[fail]". My log file doesn't seem to show anything (I guess because there was a lack of diskspace and now it doesn't even start)
I should note that the config and the backup config files got wiped (a little annoying!). I downloaded SABnzbd for Mac, set it up and the transferred the config file, but it still fails to start.
Any ideas? :)
User avatar
sander
Release Testers
Release Testers
Posts: 9264
Joined: January 22nd, 2008, 2:22 pm

Re: Read/Write errors, now service won't start

Post by sander »

I would run SABnzbd from the command line. So:

Code: Select all

sabnzbdplus
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: Read/Write errors, now service won't start

Post by jcfp »

If sab is started with the --daemon option (as the service does automatically), the program requires that it can write to the log file. If for whatever reason it cannot, it will refuse to start. You may be able to get more details this way:

Code: Select all

sudo sh -x /etc/init.d/sabnzbdplus start
AlphaWolf
Newbie
Newbie
Posts: 9
Joined: April 12th, 2013, 3:49 pm

Re: Read/Write errors, now service won't start

Post by AlphaWolf »

jcfp wrote:If sab is started with the --daemon option (as the service does automatically), the program requires that it can write to the log file. If for whatever reason it cannot, it will refuse to start. You may be able to get more details this way:

Code: Select all

sudo sh -x /etc/init.d/sabnzbdplus start
I meant to mention that I've since deleted some files and sab should now be able to write to any files it needs to.
I can't figure out where/why the error(s) are, so I'll paste the full output, and hopefully it'll make sense to you?
I can't find a spoiler tag, so it's a pretty big post! :(
+ DAEMON=/usr/bin/sabnzbdplus
+ SETTINGS=/etc/default/sabnzbdplus
+ [ -x /usr/bin/sabnzbdplus ]
+ [ -r /etc/default/sabnzbdplus ]
+ DESC=SABnzbd+ binary newsgrabber
+ DEFOPTS=--daemon
+ sed -n 1s/^#\! \?\([a-z0-9\.\/]\+\)\(.*\)/\1(\2)?/p /usr/bin/sabnzbdplus
+ PYTHONEXEC=^/usr/bin/python( -OO)?
+ PIDFILE=/var/run/sabnzbdplus.pid
+ SETTINGS_LOADED=FALSE
+ unset USER CONFIG HOST PORT EXTRAOPTS
+ . /lib/lsb/init-functions
+ FANCYTTY=
+ [ -e /etc/lsb-base-logging.sh ]
+ . /etc/lsb-base-logging.sh
+ LOG_DAEMON_MSG=
+ start_sab
+ load_settings
+ [ FALSE != TRUE ]
+ . /etc/default/sabnzbdplus
+ USER=joseph
+ CONFIG=
+ HOST=
+ PORT=
+ EXTRAOPTS=
+ [ -z joseph ]
+ [ -z joseph ]
+ OPTIONS=--daemon
+ [ -n ]
+ [ -n ]
+ SERVER=
+ [ -n ]
+ [ -n ]
+ [ -n ]
+ SETTINGS_LOADED=TRUE
+ return 0
+ is_running
+ pgrep -f -x -u joseph ^/usr/bin/python( -OO)? /usr/bin/sabnzbdplus --daemon.*
+ PID=
+ RET=1
+ [ 1 -gt 1 ]
+ return 1
+ log_daemon_msg Starting SABnzbd+ binary newsgrabber
+ [ -z Starting SABnzbd+ binary newsgrabber ]
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ [ -t 1 ]
+ [ xxterm-256color != x ]
+ [ xxterm-256color != xdumb ]
+ [ -x /usr/bin/tput ]
+ [ -x /usr/bin/expr ]
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ [ -z ]
+ FANCYTTY=1
+ true
+ /usr/bin/tput xenl
+ /usr/bin/tput cols
+ COLS=80
+ [ 80 ]
+ [ 80 -gt 6 ]
+ /usr/bin/expr 80 - 7
+ COL=73
+ log_use_plymouth
+ [ n = y ]
+ plymouth --ping
+ printf * Starting SABnzbd+ binary newsgrabber
* Starting SABnzbd+ binary newsgrabber + /usr/bin/expr 80 - 1
+ /usr/bin/tput hpa 79
+ printf
+ start-stop-daemon --quiet --chuid joseph --start --exec /usr/bin/sabnzbdplus -- --daemon
+ check_retval
+ [ 2 -eq 0 ]
+ log_end_msg 1
+ [ -z 1 ]
+ [ 73 ]
+ [ -x /usr/bin/tput ]
+ log_use_plymouth
+ [ n = y ]
+ plymouth --ping
+ printf \r
+ /usr/bin/tput hpa 73
+ [ 1 -eq 0 ]
+ printf [
[+ /usr/bin/tput setaf 1
+ printf fail
fail+ /usr/bin/tput op
+ echo ]
]
+ return 1
+ exit 1
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: Read/Write errors, now service won't start

Post by jcfp »

AlphaWolf wrote:I meant to mention that I've since deleted some files and sab should now be able to write to any files it needs to.
Then check the application's debug log, or start from the command line when logged in as user "joseph":

Code: Select all

sabnzbdplus -l2
AlphaWolf
Newbie
Newbie
Posts: 9
Joined: April 12th, 2013, 3:49 pm

Re: Read/Write errors, now service won't start

Post by AlphaWolf »

jcfp wrote:
AlphaWolf wrote:I meant to mention that I've since deleted some files and sab should now be able to write to any files it needs to.
Then check the application's debug log, or start from the command line when logged in as user "joseph":

Code: Select all

sabnzbdplus -l2
I still can't start sab with the service, but I ran the above command and it brought up the configuration wizard. I filled this out and it said I should be able to connect the sab. However, I cannot access it locally or remotely. If I run the command again I do no get the configuration wizard, but I still can't access sab.
I have tried

Code: Select all

apt-get purge sabnzbdplus
and then

Code: Select all

apt-get install sabnzbdplus
, but this doesn't seem to have helped
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: Read/Write errors, now service won't start

Post by jcfp »

AlphaWolf wrote:I still can't start sab with the service, but I ran the above command and it brought up the configuration wizard. I filled this out and it said I should be able to connect the sab. However, I cannot access it locally or remotely. If I run the command again I do no get the configuration wizard, but I still can't access sab.
So post the console output...
AlphaWolf
Newbie
Newbie
Posts: 9
Joined: April 12th, 2013, 3:49 pm

Re: Read/Write errors, now service won't start

Post by AlphaWolf »

jcfp wrote:
AlphaWolf wrote:I still can't start sab with the service, but I ran the above command and it brought up the configuration wizard. I filled this out and it said I should be able to connect the sab. However, I cannot access it locally or remotely. If I run the command again I do no get the configuration wizard, but I still can't access sab.
So post the console output...
It seems to slowly be getting there. I can now start it using the service. My sabnzbd.log file shows:

Code: Select all

013-04-22 22:32:13,908::INFO::[sabnzbdplus:1244] --------------------------------
2013-04-22 22:32:13,908::INFO::[sabnzbdplus:1245] sabnzbdplus-0.7.11 (rev=a50412a32751f4d1d555020dea20a2da43d6a309)
2013-04-22 22:32:13,908::INFO::[sabnzbdplus:1257] Platform = posix
2013-04-22 22:32:13,908::INFO::[sabnzbdplus:1258] Python-version = 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3]
2013-04-22 22:32:13,908::INFO::[sabnzbdplus:1259] Arguments = /usr/bin/sabnzbdplus --daemon
2013-04-22 22:32:13,908::INFO::[sabnzbdplus:1272] Read INI file /home/joseph/.sabnzbd/sabnzbd.ini
2013-04-22 22:32:13,910::INFO::[__init__:928] Loading data for bookmarks.sab from /home/joseph/.sabnzbd/admin/bookmarks.sab
2013-04-22 22:32:13,910::INFO::[__init__:928] Loading data for rss_data.sab from /home/joseph/.sabnzbd/admin/rss_data.sab
2013-04-22 22:32:13,910::INFO::[__init__:928] Loading data for totals9.sab from /home/joseph/.sabnzbd/admin/totals9.sab
2013-04-22 22:32:13,911::DEBUG::[bpsmeter:171] Read quota q=0.0 l=0.0 reset=0
2013-04-22 22:32:13,911::INFO::[postproc:90] Loading postproc queue
2013-04-22 22:32:13,911::INFO::[__init__:928] Loading data for postproc1.sab from /home/joseph/.sabnzbd/admin/postproc1.sab
2013-04-22 22:32:13,911::INFO::[__init__:928] Loading data for queue9.sab from /home/joseph/.sabnzbd/admin/queue9.sab
2013-04-22 22:32:13,912::DEBUG::[__init__:863] Loading data for SABnzbd_nzo_lZaHVb from /temp/Not.Going.Out.S06E03.720p.HDTV.x264-TLA/__ADMIN__/SABnzbd_nzo_lZaHVb
2013-04-22 22:32:13,928::DEBUG::[downloader:127] Initializing downloader/decoder
2013-04-22 22:32:13,929::INFO::[__init__:928] Loading data for watched_data.sab from /home/joseph/.sabnzbd/admin/watched_data.sab
2013-04-22 22:32:13,929::DEBUG::[scheduler:138] Scheduling RSS interval task every 60 min (delay=57)
2013-04-22 22:32:13,930::DEBUG::[scheduler:150] Scheduling VersionCheck on day 4 at 18:19
2013-04-22 22:32:13,930::INFO::[scheduler:170] Setting schedule for midnight BPS reset
2013-04-22 22:32:13,930::INFO::[downloader:211] Resuming
2013-04-22 22:32:13,930::DEBUG::[__init__:532] PAUSED_ALL inactive
2013-04-22 22:32:13,930::INFO::[__init__:330] All processes started
2013-04-22 22:32:13,931::INFO::[sabnzbdplus:335] Web dir is /usr/share/sabnzbdplus/interfaces/Plush
2013-04-22 22:32:13,931::INFO::[sabnzbdplus:335] Web dir is /usr/share/sabnzbdplus/interfaces/Config
2013-04-22 22:32:13,946::INFO::[sabnzbdplus:451] _yenc module... found!
2013-04-22 22:32:13,947::INFO::[sabnzbdplus:459] par2 binary... found (/usr/bin/par2)
2013-04-22 22:32:13,947::INFO::[sabnzbdplus:467] unrar binary... found (/usr/bin/unrar)
2013-04-22 22:32:13,947::INFO::[sabnzbdplus:472] unzip binary... found (/usr/bin/unzip)
2013-04-22 22:32:13,947::INFO::[sabnzbdplus:478] nice binary... found (/usr/bin/nice)
2013-04-22 22:32:13,948::INFO::[sabnzbdplus:482] ionice binary... found (/usr/bin/ionice)
2013-04-22 22:32:13,948::INFO::[sabnzbdplus:487] pyOpenSSL... found (True)
2013-04-22 22:32:13,955::INFO::[sabnzbdplus:1471] Starting web-interface on 0.0.0.0:9090
2013-04-22 22:32:13,956::INFO::[_cplogging:55] [22/Apr/2013:22:32:13] ENGINE Bus STARTING
2013-04-22 22:32:13,963::INFO::[_cplogging:55] [22/Apr/2013:22:32:13] ENGINE Started monitor thread '_TimeoutMonitor'.
2013-04-22 22:32:14,070::INFO::[_cplogging:55] [22/Apr/2013:22:32:14] ENGINE Serving on 0.0.0.0:9090
2013-04-22 22:32:19,192::ERROR::[_cplogging:55] [22/Apr/2013:22:32:19] ENGINE Error in 'start' listener <bound method ServerAdapter.start of <cherrypy.process.servers.ServerAdapter object at 0x306dbd0>>
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/process/wspbus.py", line 147, in publish
    output.append(listener(*args, **kwargs))
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 62, in start
    self.wait()
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 103, in wait
    wait_for_occupied_port(host, port)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 275, in wait_for_occupied_port
    raise IOError("Port %r not bound on %r" % (port, host))
IOError: Port 0 not bound on '0.0.0.0'

2013-04-22 22:32:19,193::ERROR::[_cplogging:55] [22/Apr/2013:22:32:19] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/process/wspbus.py", line 184, in start
    self.publish('start')
  File "/usr/share/sabnzbdplus/cherrypy/process/wspbus.py", line 147, in publish
    output.append(listener(*args, **kwargs))
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 62, in start
    self.wait()
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 103, in wait
    wait_for_occupied_port(host, port)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 275, in wait_for_occupied_port
    raise IOError("Port %r not bound on %r" % (port, host))
IOError: Port 0 not bound on '0.0.0.0'

2013-04-22 22:32:19,193::INFO::[_cplogging:55] [22/Apr/2013:22:32:19] ENGINE Bus STOPPING
2013-04-22 22:32:20,079::INFO::[_cplogging:55] [22/Apr/2013:22:32:20] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 9090)) shut down
2013-04-22 22:32:20,080::INFO::[_cplogging:55] [22/Apr/2013:22:32:20] ENGINE HTTP Server cherrypy._cpwsgi_server.CPWSGIServer(('0.0.0.0', 0)) already shut down
2013-04-22 22:32:20,093::INFO::[_cplogging:55] [22/Apr/2013:22:32:20] ENGINE Stopped thread '_TimeoutMonitor'.
2013-04-22 22:32:20,093::INFO::[_cplogging:55] [22/Apr/2013:22:32:20] ENGINE Bus STOPPED
2013-04-22 22:32:20,093::INFO::[_cplogging:55] [22/Apr/2013:22:32:20] ENGINE Bus EXITING
2013-04-22 22:32:20,094::INFO::[_cplogging:55] [22/Apr/2013:22:32:20] ENGINE Bus EXITED
2013-04-22 22:32:20,094::ERROR::[sabnzbdplus:1486] Failed to start web-interface: 
Traceback (most recent call last):
  File "/usr/bin/sabnzbdplus", line 1478, in main
    cherrypy.engine.start()
  File "/usr/share/sabnzbdplus/cherrypy/process/wspbus.py", line 184, in start
    self.publish('start')
  File "/usr/share/sabnzbdplus/cherrypy/process/wspbus.py", line 147, in publish
    output.append(listener(*args, **kwargs))
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 62, in start
    self.wait()
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 103, in wait
    wait_for_occupied_port(host, port)
  File "/usr/share/sabnzbdplus/cherrypy/process/servers.py", line 275, in wait_for_occupied_port
    raise IOError("Port %r not bound on %r" % (port, host))
IOError: Port 0 not bound on '0.0.0.0'
2013-04-22 22:32:20,096::ERROR::[sabnzbdplus:304] Failed to start web-interface : Port 0 not bound on '0.0.0.0'
Nothing else is running on port 9090 from what I can see.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1022
Joined: February 7th, 2008, 12:45 pm

Re: Read/Write errors, now service won't start

Post by jcfp »

2013-04-22 22:32:14,070::INFO::[_cplogging:55] [22/Apr/2013:22:32:14] ENGINE Serving on 0.0.0.0:9090
2013-04-22 22:32:20,096::ERROR::[sabnzbdplus:304] Failed to start web-interface : Port 0 not bound on '0.0.0.0'
https on 9090, http on port zero...? The latter will fail. Check and fix in sabnzbd.ini.
AlphaWolf
Newbie
Newbie
Posts: 9
Joined: April 12th, 2013, 3:49 pm

Re: Read/Write errors, now service won't start

Post by AlphaWolf »

jcfp wrote:
2013-04-22 22:32:14,070::INFO::[_cplogging:55] [22/Apr/2013:22:32:14] ENGINE Serving on 0.0.0.0:9090
2013-04-22 22:32:20,096::ERROR::[sabnzbdplus:304] Failed to start web-interface : Port 0 not bound on '0.0.0.0'
https on 9090, http on port zero...? The latter will fail. Check and fix in sabnzbd.ini.
welp. Now I feel stupid. Thanks for all the help! Sorry for being silly >.<
Post Reply