Unhandled Exception (yes another one)

Status
Not open for further replies.

Simon Tiplady

Dabbler
Joined
Jun 19, 2015
Messages
20
I know there are other threads about this, but...

I noticed the GUI was not loading, so I checked the error log, /var/log/nginx-error.log

Code:
2015/07/19 08:09:01 [error] 2626#0: *31 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 558, in run
    protocolStatus, appStatus = self.server.handler(self)
  File "/usr/local/lib/python2.7/site-packages/flup/server/fcgi_base.py", line 1118, in handler
    result = self.application(environ, start_response)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 206, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 194, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 232, in handle_uncaught_exception
    if resolver.urlconf_module is None:
  File "/usr/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 360, in urlconf_module
    self._urlconf_module = import_module(self.urlconf_name)
  File "/usr/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
    __import__(name)
  File "/usr/local/www/freenasUI/../freenasUI/urls.py", line 37, in <module>
    from freenasUI.api.resources import (
ImportError: cannot import name AlertResource" while reading response header from upstream, client: 192.168.1.5, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9042", host: "freenas.local"


I also checked
Code:
zpool status -v


Code:
 pool: freenas-boot
 state: ONLINE
status: One or more devices has experienced an error resulting in data
corruption.  Applications may be affected.
action: Restore the file in question if possible.  Otherwise restore the
entire pool from backup.
  see: http://illumos.org/msg/ZFS-8000-8A
  scan: none requested
config:

NAME                                          STATE     READ WRITE CKSUM
freenas-boot                                  ONLINE       0     0     2
  gptid/080df121-144d-11e5-8f8f-c80aa98a23b9  ONLINE       0     0     4

errors: Permanent errors have been detected in the following files:

        //var/db/pkg/local.sqlite
        //var/db/pkg/repo-local.sqlite
        //usr/local/www/freenasUI/api/resources.py


the error in resources.py seems to concur with the nginx log.

the 2 sqlite files appear to be 0 bytes, is that normal?

The USB drive is only about 2 weeks old (as is the entire system, cables/motherboard/cpu/ram/drives/psu/drives) why would it fail so soon, would it be a software fault (file not being written properly after an upgrade) or a hardware failure? Should I send the drive back under warranty?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Your usb drive has failed, replace it with a better one and think about doing mirrored boot drives. Doing that will decrease the chances of seeing a failure because it will fix its self or just keep working. This isn't a software issue just that usb are cheap and not made very well.
 

Simon Tiplady

Dabbler
Joined
Jun 19, 2015
Messages
20
Surely a USB drive should last longer than 2 weeks? It's not a heavily used NAS system, mostly just used for backups, but I am going to start using i for media storage.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
What type of USB? Some are better than others. If you want something good look at sata doms.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
That USB drive doesn't look like a good one. Get a san disk cruzer fit, that will last you a couple years unless you just get a bad batch. I have had move for 2 years and it's going strong.
 

Simon Tiplady

Dabbler
Joined
Jun 19, 2015
Messages
20
If I reboot and choose one of the older boot environments, would that get me back into the system? And then I can download the config file? or would that also give me an old config? Should I just copy /data/freenas-v1.db , setup the new usb drive and then restore the config file to it?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
That's not the one I told you but it should work. I said the fit is what people around here like. Make sure it's the USB 2.0 version.

You should backup your configuration using the gui and reinstall on a new usb. Then upload your configuration to the new install.

No reason to even mess with the old USB it's a crappy one.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Comparability issues
 

Simon Tiplady

Dabbler
Joined
Jun 19, 2015
Messages
20
ok, did an upgrade on the old usb and it kept all configuration and got me working again. Couldn't access the web gui earlier. I've also used the 2nd spare drive I had so that they're mirrored. Will use this until the new ones arrive. Thanks for the product recommendation.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
ok, did an upgrade on the old usb and it kept all configuration and got me working again. Couldn't access the web gui earlier. I've also used the 2nd spare drive I had so that they're mirrored. Will use this until the new ones arrive. Thanks for the product recommendation.
Thanks for listening to my advice and improving your setup. Now I just hope that USB does work for you so I don't look like an idiot.
 

Simon Tiplady

Dabbler
Joined
Jun 19, 2015
Messages
20
I just hope that USB does work for you so I don't look like an idiot
:) I'd always meant to use 2nd device as a mirror, but never got around to doing it.

Will upgrade them for the new ones when they arrive.

For anyone else having trouble with boot devices, the option of upgrading over the top of the "broken" device could allow you short term access to the gui to download config for your new device.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
It will be fine, if it's the 2.0 version it won't need the usb3 drivers.
 
Status
Not open for further replies.
Top