unable to open database file

Status
Not open for further replies.

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
I'm at loss again. Two times have my NAS gotten in a state where it mails me a mail every hour on the hour with this error:

Code:
tar: Failed to open '/data/rrd_dir.tar.bz2.38390'
with the last five digits different each time.

When I try to log in through the webgui I get this error (there are more but this is the traceback) I do not understand what this might be since I'm not fluent in bsd. I'm sure that someone here knows what to do and understands it.

Code:
Environment:


Request Method: POST
Request URL: https://192.168.0.110/account/login/

Django Version: 1.3.1
Python Version: 2.7.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.staticfiles',
 'freeadmin',
 'south',
 'dojango',
 'account',
 'system',
 'network',
 'storage',
 'sharing',
 'services',
 'plugins']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'freenasUI.freeadmin.middleware.LocaleMiddleware',
 'freenasUI.freeadmin.middleware.CatchError',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'freenasUI.freeadmin.middleware.RequireLoginMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware')


Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/www/freenasUI/account/views.py" in login_wrapper
  236.           current_app=current_app, extra_context=extra_context)
File "/usr/local/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  93.                     response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
  79.         response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/views.py" in login
  48.             auth_login(request, form.get_user())
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/__init__.py" in login
  85.     user_logged_in.send(sender=user.__class__, request=request, user=user)
File "/usr/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py" in send
  172.             response = receiver(signal=self, sender=sender, **named)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/models.py" in update_last_login
  51.     user.save()
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py" in save
  460.         self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/usr/local/lib/python2.7/site-packages/django/db/models/base.py" in save_base
  526.                         rows = manager.using(using).filter(pk=pk_val)._update(values)
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in _update
  491.         return query.get_compiler(self.db).execute_sql(None)
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  869.         cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in execute_sql
  735.         cursor.execute(sql, params)
File "/usr/local/lib/python2.7/site-packages/django/db/backends/sqlite3/base.py" in execute
  234.             return Database.Cursor.execute(self, query, params)

Exception Type: DatabaseError at /account/login/
Exception Value: unable to open database file
 

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
Bump. It just happened again and I still can't even guess where this is comming from. my diagnosis mail that comes at 3 am each day doesn't show anything out of the ordinary
 

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
Looks like your USB flash drive is starting to fail. Try replacing it.

Already? I only had it for like 1-2 years. Easiest way to do this is to just save my config file, reinstall it on a new USB drive and load the config into the new installation?
 

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
Getting an insane ammount of these as well when trying to watch a movie.

Code:
Oct 25 22:19:43 alexandria kernel: pid 11513 (smbd), uid 0: exited on signal 6
Oct 25 22:19:43 alexandria kernel: vnode_pager_getpages: I/O read error
Oct 25 22:19:43 alexandria kernel: vm_fault: pager read error, pid 11514 (smbd)
 

tingo

Contributor
Joined
Nov 5, 2011
Messages
137
How is the memory usage? Is your FreeNAS box swapping?
 

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
How is the memory usage? Is your FreeNAS box swapping?


How can I tell? I have 8 GB of RAM whereof 7775MB is available after the OS is loaded. my setup is in my signature.
 

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
good news is that I haven't seen the database error in a couple of days now. I'm, not sure if it has something to do with me turning SSH and SMART services off. I have afp and cifs turned on only among the services.

Now I'm getting alot of messages from the NAS about afp. They haven't been there earlier that I know if, I'm not using my macbook that often anymore.

Code:
Oct 30 18:17:50 alexandria afpd[50981]: AFP3.3 Login by creepwood
Oct 30 18:17:50 alexandria afpd[50981]: afp_disconnect: trying primary reconnect
Oct 30 18:17:50 alexandria afpd[2402]: Reconnect: transfering session to child[48743]
Oct 30 18:17:50 alexandria afpd[2402]: Reconnect: killing new session child[50981] after transfer
Oct 30 18:17:50 alexandria afpd[48743]: afp_dsi_transfer_session: succesfull primary reconnect
Oct 30 18:17:52 alexandria afpd[50981]: afp_disconnect: primary reconnect succeeded
Oct 30 18:19:23 alexandria afpd[50980]: AFP logout by creepwood
Oct 30 18:19:23 alexandria afpd[50980]: dsi_stream_read: len:0, unexpected EOF
Oct 30 18:19:23 alexandria afpd[50980]: afp_over_dsi: client logged out, terminating DSI session
Oct 30 18:19:23 alexandria afpd[50980]: AFP statistics: 7.38 KB read, 2.96 KB written
Oct 30 18:19:36 alexandria afpd[48743]: afp_zzz: entering extended sleep
Oct 30 20:29:36 alexandria afpd[48743]: read: Operation timed out
Oct 30 20:29:36 alexandria afpd[48743]: dsi_stream_read: len:-1, Operation timed out
Oct 30 20:29:36 alexandria afpd[48743]: dsi_stream_read: len:0, unexpected EOF
Oct 30 20:29:36 alexandria afpd[48743]: dsi_disconnect: entering disconnected state
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
The afp messages are normal.

The i/o message also points to USB thumb failure, like the db error. Did you replace it yet? Don't think about the age, they do just fail sometimes.
 

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
The afp messages are normal.

The i/o message also points to USB thumb failure, like the db error. Did you replace it yet? Don't think about the age, they do just fail sometimes.

Thank you for your anwers.
I haven't replaced it yet. I was unsure if I only need save the config file, make a new installation on a new thumbdrive and load the config into the new installation and I'll be fine?
 

JaimieV

Guru
Joined
Oct 12, 2012
Messages
742
Exactly right.

You might prefer to use an older config file from before the problem occurred, if you have it, then remake the changes since manually. Just in case there's some problem reading the files to make the config backup.
If that's not available, do check through the options to make sure everything is set up the way you expect after doing the update/config load.

Remember you can keep the old stick in case there's some trouble getting going.
 

creepwood

Explorer
Joined
Jul 12, 2011
Messages
86
I've been keeping my eyes open for the past month and it seems the problem is gone. I shut down all services I had running for a few days, and then sporadically started them one by one, and alas, the problem haven't resurfaced yet.

Thanks for your help. I might get back to this thread again.
 
Status
Not open for further replies.
Top