Page 1 of 1

Glitter: 500 Internal Server Error, bootstrap.min.js not fou

Posted: January 13th, 2016, 11:50 am
by TheCowGod
I had been running SAB on Ubuntu 14.04.2 for a while, using the Glitter theme. I recently upgraded Ubuntu (in steps) to 15.10, and now I'm dealing with all the various issues that have cropped up, mostly related to the switch to systemd. I mention all that just as background, in case it could be related in a way I don't understand.

After upgrading Ubuntu, I upgraded SABnzbd, and it seemed to work at first, but when I took its advice and added a "cache articles in memory" setting and restarted SABnzbd, I got a 500 Internal Server Error:

Code: Select all

 500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

Traceback (most recent call last):
  File "/usr/share/sabnzbdplus/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/share/sabnzbdplus/cherrypy/lib/encoding.py", line 217, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/share/sabnzbdplus/cherrypy/_cpdispatch.py", line 61, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/share/sabnzbdplus/sabnzbd/interface.py", line 322, in index
    return template.respond()
  File "_usr_share_sabnzbdplus_interfaces_Glitter_templates_main_tmpl.py", line 1343, in respond
  File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1610, in _handleCheetahInclude
    self._CHEETAH__cheetahIncludes[_includeID] = self.getFileContents(path)
  File "/usr/lib/python2.7/dist-packages/Cheetah/Template.py", line 1426, in getFileContents
    fp = open(path, 'r')
IOError: [Errno 2] No such file or directory: '/usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap/js/bootstrap.min.js'
Powered by CherryPy 3.8.0
Manually editing ~/.sabnzbd/sabnzbd.ini and changing web_dir from "Glitter" to "Plush" (and restarting the service) got me back in. I tried switching to the "smpl" skin and that one works too. But if I switch back to Glitter, once SABnzbd is restarted, I get the 500 error again.

I checked on disk, and sure enough, there's nothing in the /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap dir:

Code: Select all

$ ls -alh /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap
total 8.0K
drwxr-xr-x 2 root root 4.0K Jan 13 10:53 .
drwxr-xr-x 6 root root 4.0K Sep 29 12:43 ..
I don't know what's supposed to be in there, so I offer all this in hopes that it helps you figure out what the issue is. In the meantime I'm just running the smpl skin, but I defintely prefer Glitter, so I hope the issue can get resolved. Thanks.

Re: Glitter: 500 Internal Server Error, bootstrap.min.js not

Posted: January 13th, 2016, 12:05 pm
by safihre
I assume you installed via the JCFP PPA?
Try uninstalling it and then installing it again.
I remember it shouldn't remove your sabnzbd.ini, but just to be sure make a backup before you do.
It's very weird that a file was there and now it's missing..

Re: Glitter: 500 Internal Server Error, bootstrap.min.js not

Posted: January 13th, 2016, 12:11 pm
by TheCowGod
Thanks, I should have thought to try that. I removed all four packages (sabnzbdplus and the three themes) and re-installed them, and that resolved it:

Code: Select all

$ ls -alh /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap
lrwxrwxrwx 1 root root 35 Jan 11 10:46 /usr/share/sabnzbdplus/interfaces/Glitter/templates/static/bootstrap -> ../../../../../javascript/bootstrap
It now loads fine with the Glitter theme again. Thanks for the quick response!

Re: Glitter: 500 Internal Server Error, bootstrap.min.js not

Posted: January 13th, 2016, 1:59 pm
by jcfp
TheCowGod wrote:I had been running SAB on Ubuntu 14.04.2 for a while, using the Glitter theme. I recently upgraded Ubuntu (in steps) to 15.10
The distro upgrade is key here; part of that process automatically disables 3rd party sources such as the ppa. Somewhat ironically, that may actually result in sab not getting upgraded at all when the version available on the ppa (currently at 0.8.0 beta4) is newer than that in your upgraded os release (0.7.20). At the same time some of its dependencies may get auto-removed since records as to why they were needed and installed are gone. End result being that sab is still at the version available in the ppa for your old (pre-upgrade) ubuntu release, while some dependencies may no longer be installed. :'( Out of my hands, unfortunately.

The only safe way to go about distro upgrades with the ppa is to uninstall sab and its theme packages beforehand, disable the ppa, and then do the distro upgrade without sab installed at all (not even the older version that came with the old ubuntu release!). After the distro upgrade completes, re-add the ppa following the standard instructions, install sab and you're back in business.
safihre wrote:I remember it shouldn't remove your sabnzbd.ini, but just to be sure make a backup before you do.
You remember correctly. As far as the os is concerned, sabnzbd.ini & co are just a bunch of random files in a homedir. That said, backups are always a good idea, more so with distro upgrades.

Re: Glitter: 500 Internal Server Error, bootstrap.min.js not

Posted: January 13th, 2016, 4:23 pm
by TheCowGod
That makes sense. Yeah, I did have to re-enable the repository after the upgrades. Thanks for the response.