Database errors after upgrade

Status
Not open for further replies.

ronch

Cadet
Joined
Jul 4, 2011
Messages
7
Hi Everybody,

I just upgraded my FreeNAS box from 8.0.4 to 8.2.0. The install seems to have worked fine but when I booted the install for the first time it got stuck at the "Applying database schema" line. I let it go for about an hour before figuring it was stuck. So I rebooted. There were errors being reported during boot up but things do seem to be working now. The web interface is up and running and my data all seems to be mounted OK and accessible. However under the Services tab I have database errors being reported. They are:
no such column: services_activedirectory.ad_allow_trusted_doms
Environment:

Software Version: FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
Request Method: GET
Request URL: http://freenas/services/core/?dojo.preventCache=1349217061699


Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
105. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/freeadmin/middleware.py" in process_view
166. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/services/views.py" in core
113. activedirectory = models.ActiveDirectory.objects.order_by("-id")[0]
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in __getitem__
190. return list(qs)[0]
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in __len__
84. self._result_cache.extend(self._iter)
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator
273. for row in compiler.results_iter():
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter
680. for rows in self.execute_sql(MULTI):
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 /services/core/
Exception Value: no such column: services_activedirectory.ad_allow_trusted_doms
--------------
and:


no such table: plugins_plugins

Environment:

Software Version: FreeNAS-8.2.0-RELEASE-p1-x64 (r11950)
Request Method: GET
Request URL: http://freenas/services/plugins/?dojo.preventCache=1349217753507


Traceback:
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
105. response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/usr/local/www/freenasUI/freeadmin/middleware.py" in process_view
166. return login_required(view_func)(request, *view_args, **view_kwargs)
File "/usr/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/usr/local/www/freenasUI/services/views.py" in plugins
67. for plugin in plugins:
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in _result_iter
107. self._fill_cache()
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in _fill_cache
772. self._result_cache.append(self._iter.next())
File "/usr/local/lib/python2.7/site-packages/django/db/models/query.py" in iterator
273. for row in compiler.results_iter():
File "/usr/local/lib/python2.7/site-packages/django/db/models/sql/compiler.py" in results_iter
680. for rows in self.execute_sql(MULTI):
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 /services/plugins/
Exception Value: no such table: plugins_plugins
-----------------
I have a backup of the database like the upgrade instructions say but I don't know how to re-initialize the database using the saved copy.

So what should I do now? Any help would be greatly appreciated.

Thanks, John
 

ronch

Cadet
Joined
Jul 4, 2011
Messages
7
Well, it's not completely working. Due to the database errors I can't configure any of the services I'd like to use. So the upgrade is kind of broken at this point. Any ideas? Thanks.
 

ronch

Cadet
Joined
Jul 4, 2011
Messages
7
After looking at this can I just upload the config that I saved previously? Will the new version convert the config to the new database entries if I do this? Thanks again.
 

ronch

Cadet
Joined
Jul 4, 2011
Messages
7
Well, just to update this thread, I fixed it. I was able to use the WebGUI to upload my old config file to the FreeNAS system. Upon reboot the FreeNAS system took over an hour to convert the config database to the new 8.2.0 format. Now all is correct once again. Everything is up and all interfaces are available. So I guess this is solved at this point.

I would like to make a comment about the documentation though. There should probably be something added to the upgrade page saying that when it's converting the config to the new format that it can take a _very_ long time to do, even for what look like small config files. A warning like that sure would have helped.

Hope this helps others,
John
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I would like to make a comment about the documentation though. There should probably be something added to the upgrade page saying that when it's converting the config to the new format that it can take a _very_ long time to do, even for what look like small config files. A warning like that sure would have helped.

Hope this helps others,
John

John,

You can add to the documentation yourself, it's a wiki.

It is really VERY strange it took so long, it usually takes a couple minutes or less. You didn't post any details about your hardware either.

It would be helpful if you added a problem ticket for this at support.freenas.org, the developers don't always see everything here.

Cheers
 

ronch

Cadet
Joined
Jul 4, 2011
Messages
7
Ok, I'll do both things. I'll open a problem ticket with full HW description and I'll submit a change to the installation/upgrade wiki page.

The HW is an Atom based motherboard with 6 SATA ports. I don't have the exact details here since I'm at work right now. It has a 1 gig Ethernet port (actually two of them) and it has a USB stick which the OS runs off of. It has been running 8.0.4 for a long time but I ran into some system hangs when using rsync to the system from one of my Linux systems. The FreeNAS system would just completely hang and needed to be rebooted. So I figured I should try to upgrade to see if it made things better. It looks like it has as my rsync from last night was successful.

I'll update the wiki and submit a problem report when I get home tonight. Thanks.
 
Status
Not open for further replies.
Top