Upgrade from 9.10 to 11.1, gives errors in update.failed, no GUI but jails are working.

Status
Not open for further replies.
Joined
Nov 25, 2013
Messages
9
Here it goes.
I've been running freenas 9.10-U1 or -U2 for a LONG time more or less stable, but wanted to upgrade to 11.1-U1, that was the easy part.
Tried using GUI, no luck.
Tried using CLI, no luck.
Used USB to upgrade, no luck. (goes for CD and DVD as well.
Here is the update.failed info:


Operations to perform:
Apply all migrations: account, auth, contenttypes, directoryservice, jails, network, plugins, services, sessions, sharing, storage, system, tasks, vcp, vm
Running migrations:
Applying account.0001_initial... FAKED
Applying account.0002_add_consul_user... OK
Applying account.0003_add_nomad_user... OK
Applying account.0004_add_minio_user... OK
Applying account.0005_add_netdata_user... OK
Applying account.0006_bsdusers_bsdusr_attributes... OK
Applying contenttypes.0001_initial... FAKED
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0001_initial... FAKED
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying system.0001_initial...Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 410, in execute
return self.locked_retry(Database.Cursor.execute, query)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 389, in locked_retry
rv = method(self, *args, **kwargs)
sqlite3.OperationalError: table "system_advanced" already exists

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/www/freenasUI/manage.py", line 42, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 294, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 345, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 204, in handle
fake_initial=fake_initial,
File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 115, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.6/site-packages/django/db/migrations/executor.py", line 244, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/local/lib/python3.6/site-packages/django/db/migrations/migration.py", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/local/lib/python3.6/site-packages/django/db/migrations/operations/models.py", line 96, in database_forwards
schema_editor.create_model(model)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 295, in create_model
self.execute(sql, params or None)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/base/schema.py", line 112, in execute
cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python3.6/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/local/lib/python3.6/site-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/django/db/backends/utils.py", line 62, in execute
return self.cursor.execute(sql)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 410, in execute
return self.locked_retry(Database.Cursor.execute, query)
File "/usr/local/www/freenasUI/freeadmin/sqlite3_ha/base.py", line 389, in locked_retry
rv = method(self, *args, **kwargs)
django.db.utils.OperationalError: table "system_advanced" already exists

Jails work, but WEB interface to the freenas does not work, gives the error in the attached picture.

I've tried MANY thing here but I'm stuck.

And YES, the easiest thing to do would be booting the old boot environment, but that is also not fixing the problem.

Reinstall/not upgrade and upload config:
I have a backup of the freenas, but when I did the same thing on another server nothing was working so I had to reinstall everything, config everything all over again, because of this that would be a no-go.

Several threads is marked with solved, but most end up going back to the old boot environment, that, as stated, does NOT fix the problem.

Sorry if I've posted this and the answer is on the forum, however, I could not find it.

Also, when in CLi on the server, I does not get the screen that shows options like reboot, configure etc. the same issue happens what ever newer version I try upgrading to.

Picture attached show error in browser when using http:// , when using https:// it only gives "ERR_CONNECTION_REFUSED"
 

Attachments

  • freenaserror.JPG
    freenaserror.JPG
    180.5 KB · Views: 391
Last edited:
D

dlavigne

Guest
What happens if you do a fresh install and restore your config?
 
Joined
Nov 25, 2013
Messages
9
What happens if you do a fresh install and restore your config?
Tried explaining it in my post, nothing works except web UI with errors and I end up reinstalling every plugin, configuring everything, mounts for plugins, plugin settings, IP adresses, etc. from scratch, and it takes up too much time.

I've booted with the old working config because I have alot of documentation that I use at work and need every day, but I want this issue fixed without reinstalling freenas.

The stable release 9.10 FreeNAS-9.10-STABLE-201605021851 (35c85f7) is the latest update that works on my servers.
I tried doing a fresh install to a usb drive and restore backup (disconnected the harddrive that I have the working 9.10 on) but it did not work at all, did not even get ssh up and running.

When I check the update.failed file, it complains about errors, but I don't have the time to investigate this any deeper, kids, wife etc. this is why I posted on the forum :)
 
Last edited:
Joined
Nov 25, 2013
Messages
9
I tried reinstall again and restored the config last saturday, today I got everything back in order, still on old 9.10 version.
It seems I have two opions, reinstall and config everything all over again or continue without updates.
 
Status
Not open for further replies.
Top