0.5.0RC3 barfing SQLite errors

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
wolrah
Release Testers
Release Testers
Posts: 8
Joined: June 15th, 2008, 7:29 pm

0.5.0RC3 barfing SQLite errors

Post by wolrah »

I just upgraded from 0.4.12 (official package) to 0.5.0RC3 (PPA).  On initial access and maybe 1/5 accesses from there on out rather than displaying the page or information expected I get an error such as this:

Code: Select all

Unrecoverable error in the server.
Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/_cpwsgi.py", line 78, in setapp
    self.request = self.get_request()
  File "/usr/share/sabnzbdplus/cherrypy/_cpwsgi.py", line 233, in get_request
    request, resp = self.cpapp.get_serving(local, remote, scheme, sproto)
  File "/usr/share/sabnzbdplus/cherrypy/_cptree.py", line 112, in get_serving
    cherrypy.engine.publish('acquire_thread')
  File "/usr/share/sabnzbdplus/cherrypy/process/wspbus.py", line 147, in publish
    output.append(listener(*args, **kwargs))
  File "/usr/share/sabnzbdplus/cherrypy/process/plugins.py", line 514, in acquire_thread
    self.bus.publish('start_thread', i)
  File "/usr/share/sabnzbdplus/cherrypy/process/wspbus.py", line 147, in publish
    output.append(listener(*args, **kwargs))
  File "/usr/share/sabnzbdplus/sabnzbd/__init__.py", line 155, in connect_db
    cherrypy.thread_data.history_db = sabnzbd.database.get_history_handle()
  File "/usr/share/sabnzbdplus/sabnzbd/database.py", line 50, in get_history_handle
    return HistoryDB(_HISTORY_DB)
  File "/usr/share/sabnzbdplus/sabnzbd/database.py", line 66, in __init__
    self.con = sqlite3.connect(db_path)
OperationalError: unable to open database file
Pressing refresh a time or two always makes it do what's expected, but it's still annoying.

I had hoped I could just add the PPA, launch aptitude, upgrade the packages, and call it a day.  Unfortunately that got me where I am right now.

Since my SAB config isn't exactly complicated I did a full purge of all sabnzbdplus packages as well as my config file, emptying the entire cache directory.  I then started it back up with a config file consisting of nothing but my log directory (since it won't run as a service without that).  Still no change.

Another bit of information is on launch I see it try to create the directory '/etc/admin'.  It fails and never tries again as far as I can tell, but it seems like this might be related if these SQLite databases are supposed to go in the admin directory, just it's not allowing me to configure where that admin directory lives apparently.
wolrah
Release Testers
Release Testers
Posts: 8
Joined: June 15th, 2008, 7:29 pm

Re: 0.5.0RC3 barfing SQLite errors

Post by wolrah »

By comparing with my Mac, I found the admin directory setting in the config file and it seems to be working now after setting it to a place it had write permissions.

edit: While admin_dir is now set, SAB apparently doesn't read it early enough and still throws these errors every time it's started:

Code: Select all

#

2010-01-26 21:12:41,599
ERROR:
#error-createDir# /etc/admin

#

2010-01-26 21:12:41,599
ERROR:
#error-createDir# /etc/admin
Last edited by wolrah on January 26th, 2010, 9:18 pm, edited 1 time in total.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.5.0RC3 barfing SQLite errors

Post by shypike »

Thanks for the tip, I'll check this.
Usually the base folder is writable, so the problem does not occur.
99% of the users have the admin/cache/logs folders relative to the location of the sabnzbd.ini file.
The latter file needs to be in a writable location anyway.
User avatar
jcfp
Release Testers
Release Testers
Posts: 989
Joined: February 7th, 2008, 12:45 pm

Re: 0.5.0RC3 barfing SQLite errors

Post by jcfp »

wolrah, just for my understanding: with your 0.4.x setup, sabnzbd.ini was stored somewhere in /etc ?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: 0.5.0RC3 barfing SQLite errors

Post by shypike »

wolrah wrote: edit: While admin_dir is now set, SAB apparently doesn't read it early enough and still throws these errors every time it's started:
Actually, the creation problem is not caused by the sqlite database, but by the HTTPS certificate files.
Those files reside by default in admin too, only for those files the admin folder path is not taken from the INI file.
I will fix that for 0.5.0.
Post Reply