"No space left on device" after cleaning up disk / API
Posted: January 17th, 2015, 6:42 am
Tonight a backup went to wrong folder (NFS share didn't mount) so my root drive got filled 100%.
1. First issue is that, my whole settings reset if this happens. Got a few friends that didn't have limit set and if there is no space left, ini writing fails.
Maybe make sure there is a few MB free before writing an empty ini?
2. So I cleanup the files, 30GB now left on and setup SAB like before. Still it fails. So I dig a little deeper and see the following error is returned when sending an nzb file:
I tried restarting SAB, with the same issue. Only a full reboot of the system fixed the issue.
I see the issue is in python (or the filesystem) itself, so you can't fix that. But you can at least catch the error and return a proper response from the api (json formated).
I got a few users of CouchPotato coming in with same issues where it reported "wrong api key" and they know the api key is the same. But as long as there isn't json returned, I don't have a way of catching the error and notifying the user.
1. First issue is that, my whole settings reset if this happens. Got a few friends that didn't have limit set and if there is no space left, ini writing fails.
Maybe make sure there is a few MB free before writing an empty ini?
2. So I cleanup the files, 30GB now left on and setup SAB like before. Still it fails. So I dig a little deeper and see the following error is returned when sending an nzb file:
Code: Select all
01-17 12:23:57 INFO [.core.downloaders.sabnzbd] Sending "Movie 2014.720p BluRay x264 Dts-NOHATE" to SABnzbd.
01-17 12:23:57 INFO [hpotato.core.plugins.base] Opening url: post http://192.168.2.3:5052/api?nzbname=Movie+2014.720p+BluRay+x264+Dts-NOHATE.cp%28tt1065073%29&apikey=xxx&cat=films&priority=0&mode=addfile&output=json, data: []
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<title>500 Internal Server Error</title>
<style type="text/css">
#powered_by {
margin-top: 20px;
border-top: 2px solid black;
font-style: italic;
}
#traceback {
color: red;
}
</style>
</head>
<body>
<h2>500 Internal Server Error</h2>
<p>The server encountered an unexpected condition which prevented it from fulfilling the request.</p>
<pre id="traceback">Traceback (most recent call last):
File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 612, in respond
self.process_body()
File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 733, in process_body
keep_blank_values=1)
File "/usr/share/sabnzbdplus/cherrypy/_cpcgifs.py", line 8, in __init__
cgi.FieldStorage.__init__(self, *args, **kwds)
File "/usr/lib/python2.7/cgi.py", line 507, in __init__
self.read_multi(environ, keep_blank_values, strict_parsing)
File "/usr/lib/python2.7/cgi.py", line 636, in read_multi
environ, keep_blank_values, strict_parsing)
File "/usr/share/sabnzbdplus/cherrypy/_cpcgifs.py", line 8, in __init__
cgi.FieldStorage.__init__(self, *args, **kwds)
File "/usr/lib/python2.7/cgi.py", line 509, in __init__
self.read_single()
File "/usr/lib/python2.7/cgi.py", line 646, in read_single
self.read_lines()
File "/usr/lib/python2.7/cgi.py", line 668, in read_lines
self.read_lines_to_outerboundary()
File "/usr/share/sabnzbdplus/cherrypy/_cpcgifs.py", line 54, in read_lines_to_outerboundary
self.__write(odelim + line)
File "/usr/lib/python2.7/cgi.py", line 678, in __write
self.file.write(line)
IOError: [Errno 28] No space left on device
</pre>
<div id="powered_by">
<span>Powered by <a href="http://www.cherrypy.org">CherryPy 3.2.0</a></span>
</div>
</body>
</html>
I see the issue is in python (or the filesystem) itself, so you can't fix that. But you can at least catch the error and return a proper response from the api (json formated).
I got a few users of CouchPotato coming in with same issues where it reported "wrong api key" and they know the api key is the same. But as long as there isn't json returned, I don't have a way of catching the error and notifying the user.