11.2 Beta 1 Login Issues

Status
Not open for further replies.

cipehr

Cadet
Joined
Aug 27, 2018
Messages
4
Thanks for the output, I checked my update.failed and had the same failure.

Code:
% cat update.failed
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 86, in handle
	executor.loader.check_consistent_history(connection)
  File "/usr/local/lib/python3.6/site-packages/django/db/migrations/loader.py", line 292, in check_consistent_history
	connection.alias,
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration system.0022_cert_serial is applied before its dependency system.0021_merge_20180507_1315 on database 'default'.


but had differing results from the showmigrations

Code:
system
 [X] 0001_initial
 [X] 0002_auto_consulalerts
 [X] 0003_auto_20170411_1445
 [X] 0004_auto_20170503_0608
 [X] 0005_auto_20170712_1137
 [X] 0006_update_tun_var_size
 [X] 0007_auto_201708211858
 [X] 0008_auto_20170906_2335
 [X] 0009_auto_20171023_2159
 [X] 0017_auto_20180219_1615
 [X] 0020_auto_20180502_1200
 [X] 0016_encrypt_cloud_credentials
 [ ] 0018_merge_20180409_1538
 [ ] 0019_increase_motd
 [ ] 0021_merge_20180507_1315
 [X] 0022_cert_serial
 [ ] 0022_cloud_sync
 [X] 0021_merge_20180612_2332
 [ ] 0010_syscons_to_vt
 [ ] 0011_auto_20180219_1615
 [ ] 0012_add_filesystem_model
 [ ] 0013_rename_consulalerts_to_alertservice
 [ ] 0014_alert_default_settings
 [ ] 0015_alert
 [ ] 0023_merge_20180612_2359
 [ ] 0024_rename_bes
 [ ] 0025_remove_screensaver


May just submit a bug report and rollback rather then risk blowing something up...

I actually think mine looked identical to that, however i can't be sure. I definitely had these three checked

[X] 0016_encrypt_cloud_credentials
[ ] 0018_merge_20180409_1538
[ ] 0019_increase_motd
[ ] 0021_merge_20180507_1315
[X] 0022_cert_serial
[ ] 0022_cloud_sync
[X] 0021_merge_20180612_2332


and you're also failing on the exact same file is me.

But, this is not advice, good luck.
 

Attilas

Cadet
Joined
Aug 28, 2018
Messages
1
I was running into the same issues after upgrading from 11.1-U6 to 11.2-beta2.



Thanks for the bug hexley, I was able to diagnose and fix the issue on my machine, which i'll document here...

Warning i have no idea if this is a good idea for anyone other than me to run... so know what you're doing.

Because of @hexley's post i was able to find that my website db migration had failed. I looked at this file.
cat /data/update.failed
and saw this line at the end
Code:
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration system.0022_cert_serial is applied before its dependency system.0021_merge_20180507_1315 on database 'default'.


i then found the directory of the django site from the stack trace above and changed to it:
/usr/local/www/freenasUI

its a django site, so i ran

# ./manage.py showmigrations
.....
system
[X] 0001_initial
....
[X] 0010_syscons_to_vt
[X] 0011_auto_20180219_1615
[X] 0012_add_filesystem_model
[X] 0013_rename_consulalerts_to_alertservice
[X] 0014_alert_default_settings
[X] 0015_alert
[X] 0016_encrypt_cloud_credentials
[ ] 0021_merge_20180507_1315
[ ] 0024_rename_bes
[X] 0022_cert_serial
[ ] 0018_merge_20180409_1538
[ ] 0019_increase_motd
...


(note this isn't my real output but an example since i didn't save it)

You can see the migration status and that somehow a later migration had been ran before and earlier.

at this point i looked in settings.py to find where my database was stored
grep 'DATABASE_PATH' -A 2 settings.py

which happend to be in /data/freenas-v1.db for me
i then hopefully backed up my database using
cp /data/freenas-v1.db /root/backup.db

and then edited the failing migration to change its dependencies
vi system/migrations/0022_cert_serial.py

i changed this line

dependencies = [
('system', '0021_merge_20180507_1315'),
]


to depend on the last successful migration, which was '0016_encrypt_cloud_credentials'

i then tried to revert the migration to the last known good one
./manage.py migrate system 0016_encrypt_cloud_credentials

this complained (but succeeded i think) that i need to make a merged migration, so i ran
./manage.py makemigrations --merge

which made a new migration 0026_merge_20180827_1833

and then i ran that migration which included everything

./manage.py migrate system 0026_merge_20180827_1833

and the ui started working.
i ran all the remaining migration using:
./manage.py migrate

and my system seemed quite happy.

Good luck

Thanks that fixed it !! Thanks for sharing all that information. I had to reboot to get the UI responding after getting to your last step. Then ISCSI, SMB and UI got back online.
 

dudemanbacon

Dabbler
Joined
Jun 11, 2014
Messages
17
I was running into the same issues after upgrading from 11.1-U6 to 11.2-beta2.



Thanks for the bug hexley, I was able to diagnose and fix the issue on my machine, which i'll document here...

Warning i have no idea if this is a good idea for anyone other than me to run... so know what you're doing.

Because of @hexley's post i was able to find that my website db migration had failed. I looked at this file.
cat /data/update.failed
and saw this line at the end
Code:
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration system.0022_cert_serial is applied before its dependency system.0021_merge_20180507_1315 on database 'default'.


i then found the directory of the django site from the stack trace above and changed to it:
/usr/local/www/freenasUI

its a django site, so i ran

# ./manage.py showmigrations
.....
system
[X] 0001_initial
....
[X] 0010_syscons_to_vt
[X] 0011_auto_20180219_1615
[X] 0012_add_filesystem_model
[X] 0013_rename_consulalerts_to_alertservice
[X] 0014_alert_default_settings
[X] 0015_alert
[X] 0016_encrypt_cloud_credentials
[ ] 0021_merge_20180507_1315
[ ] 0024_rename_bes
[X] 0022_cert_serial
[ ] 0018_merge_20180409_1538
[ ] 0019_increase_motd
...


(note this isn't my real output but an example since i didn't save it)

You can see the migration status and that somehow a later migration had been ran before and earlier.

at this point i looked in settings.py to find where my database was stored
grep 'DATABASE_PATH' -A 2 settings.py

which happend to be in /data/freenas-v1.db for me
i then hopefully backed up my database using
cp /data/freenas-v1.db /root/backup.db

and then edited the failing migration to change its dependencies
vi system/migrations/0022_cert_serial.py

i changed this line

dependencies = [
('system', '0021_merge_20180507_1315'),
]


to depend on the last successful migration, which was '0016_encrypt_cloud_credentials'

i then tried to revert the migration to the last known good one
./manage.py migrate system 0016_encrypt_cloud_credentials

this complained (but succeeded i think) that i need to make a merged migration, so i ran
./manage.py makemigrations --merge

which made a new migration 0026_merge_20180827_1833

and then i ran that migration which included everything

./manage.py migrate system 0026_merge_20180827_1833

and the ui started working.
i ran all the remaining migration using:
./manage.py migrate

and my system seemed quite happy.

Good luck




THANK YOU!!!!!!!! This resolved my issues as well!!! One thing to note is that the new migration file will have a different name with todays date. Mine was named:

0026_merge_20180829_1836

You can find the new migration file in /usr/local/www/freenasUI/system/migrations if you need to verify.

Nick
 

iwan

Cadet
Joined
Feb 12, 2016
Messages
1
I am the same error
Code:
django.db.migrations.exceptions.InconsistentMigrationHistory: Migration system.0022_cert_serial is applied before its dependency system.0021_merge_20180507_1315 on database 'default'.


Unfortunately I am not able to fix it with a remigration. If I "cd /usr/local/www/freenasUI/"
then:
# ./manage.py showmigrations
Traceback (most recent call last):
File "./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 341, in execute
django.setup()
File "/usr/local/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/usr/local/lib/python3.6/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/usr/local/lib/python3.6/site-packages/django/apps/config.py", line 199, in import_models
self.models_module = import_module(models_module_name)
File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/usr/local/www/freenasUI/services/models.py", line 367, in <module>
class NFS(Model):
File "/usr/local/www/freenasUI/freeadmin/models/__init__.py", line 50, in __new__
new_class = ModelBase.__new__(cls, name, tuple(bases), attrs)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 157, in __new__
new_class.add_to_class(obj_name, obj)
File "/usr/local/lib/python3.6/site-packages/django/db/models/base.py", line 316, in add_to_class
value.contribute_to_class(cls, name)
File "/usr/local/www/freenasUI/freeadmin/models/fields.py", line 229, in contribute_to_class
self.choices
File "/usr/local/www/freenasUI/choices.py", line 618, in __iter__
self._NIClist = list(super(IPChoices, self).__iter__())
File "/usr/local/www/freenasUI/choices.py", line 482, in __iter__
conn = sqlite3.connect(freenasUI.settings.DATABASES['default']['NAME'])
sqlite3.OperationalError: unable to open database file

The only thing I did was updated today to 11.2
here the uname -a output:
FreeBSD nas.fritz.box 11.2-STABLE FreeBSD 11.2-STABLE #0 r325575+5e9e52d405e(freenas/11-stable): Wed Aug 1 11:23:44 EDT 2018 root@nemesis.tn.ixsystems.com:/freenas-11.2-releng/freenas/_BE/objs/freenas-11.2-releng/freenas/_BE/os/sys/FreeNAS.amd64 amd64

I also pasted my middlewared.log at pastebin: https://pastebin.com/Tc1WwS1g
What can I do?

#edit: added paste bin link
 

Ochirasu

Cadet
Joined
Jan 15, 2018
Messages
4
The fix is already done but not released, so if you can ssh into your host you can perform an update
Code:
/usr/local/bin/freenas-update -v -T FreeNAS-11-Nightlies update

Reboot after this completes.
 

kjparenteau

Explorer
Joined
Jul 13, 2012
Messages
70
The fix is already done but not released, so if you can ssh into your host you can perform an update
Code:
/usr/local/bin/freenas-update -v -T FreeNAS-11-Nightlies update

Reboot after this completes.

I have the same issue with the following message after changing to 11.2-STABLE and running the update:
"Connecting to NAS... Make sure the NAS system is powered on and connected to the network."

I have 2 IP's to get to the management interface. One is through the built in Intel NIC on the Motherboard. The other is via 2x NIC's in a LAGG. Both IP Addresses give the same issue. Tried all browsers as well.

I can connect to SSH and I tried executing the command you suggested, but get the following... Please advise...

Code:
root@freenas:~ # /usr/local/bin/freenas-update -v -T FreeNAS-11-Nightlies update
[freenasOS.Configuration:693] TryGetNetworkFile(['http://update-master.ixsystems.com/FreeNAS/FreeNAS-11-Nightlies/LATEST'])
[freenasOS.Configuration:773] Unable to load http://update-master.ixsystems.com/FreeNAS/FreeNAS-11-Nightlies/LATEST: <urlopen error [Errno 8] hostname nor servname provided, or not known>
[freenasOS.Configuration:787] Unable to load ['http://update-master.ixsystems.com/FreeNAS/FreeNAS-11-Nightlies/LATEST']: <urlopen error [Errno 8] hostname nor servname provided, or not known>
[freenas-update:197] <urlopen error [Errno 8] hostname nor servname provided, or not known>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/urllib/request.py", line 1318, in do_open
	encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
	self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
	self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
	self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
	self.send(msg)
  File "/usr/local/lib/python3.6/http/client.py", line 964, in send
	self.connect()
  File "/usr/local/lib/python3.6/http/client.py", line 936, in connect
	(self.host,self.port), self.timeout, self.source_address)
  File "/usr/local/lib/python3.6/socket.py", line 704, in create_connection
	for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
	for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] hostname nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/freenas-update", line 171, in DoDownload
	rv = Update.DownloadUpdate(train, cache_dir, pkg_type=pkg_type, ignore_space=ignore_space)
  File "/usr/local/lib/freenasOS/Update.py", line 892, in DownloadUpdate
	latest_mani = conf.FindLatestManifest(train, require_signature=True)
  File "/usr/local/lib/freenasOS/Configuration.py", line 1182, in FindLatestManifest
	reason="GetLatestManifest",
  File "/usr/local/lib/freenasOS/Configuration.py", line 788, in TryGetNetworkFile
	raise url_exc
  File "/usr/local/lib/freenasOS/Configuration.py", line 762, in TryGetNetworkFile
	furl = opener.open(req, timeout=30)
  File "/usr/local/lib/python3.6/urllib/request.py", line 526, in open
	response = self._open(req, data)
  File "/usr/local/lib/python3.6/urllib/request.py", line 544, in _open
	'_open', req)
  File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
	result = func(*args)
  File "/usr/local/lib/python3.6/urllib/request.py", line 1346, in http_open
	return self.do_open(http.client.HTTPConnection, req)
  File "/usr/local/lib/python3.6/urllib/request.py", line 1320, in do_open
	raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 8] hostname nor servname provided, or not known>
Received exception during download phase, cannot update
root@freenas:~ #
 

PnoT

Dabbler
Joined
Apr 12, 2017
Messages
41
I have the same issue with the following message after changing to 11.2-STABLE and running the update:
"Connecting to NAS... Make sure the NAS system is powered on and connected to the network."

I have 2 IP's to get to the management interface. One is through the built in Intel NIC on the Motherboard. The other is via 2x NIC's in a LAGG. Both IP Addresses give the same issue. Tried all browsers as well.

I can connect to SSH and I tried executing the command you suggested, but get the following... Please advise...

Code:
root@freenas:~ # /usr/local/bin/freenas-update -v -T FreeNAS-11-Nightlies update
[freenasOS.Configuration:693] TryGetNetworkFile(['http://update-master.ixsystems.com/FreeNAS/FreeNAS-11-Nightlies/LATEST'])
[freenasOS.Configuration:773] Unable to load http://update-master.ixsystems.com/FreeNAS/FreeNAS-11-Nightlies/LATEST: <urlopen error [Errno 8] hostname nor servname provided, or not known>
[freenasOS.Configuration:787] Unable to load ['http://update-master.ixsystems.com/FreeNAS/FreeNAS-11-Nightlies/LATEST']: <urlopen error [Errno 8] hostname nor servname provided, or not known>
[freenas-update:197] <urlopen error [Errno 8] hostname nor servname provided, or not known>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/urllib/request.py", line 1318, in do_open
	encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/local/lib/python3.6/http/client.py", line 1239, in request
	self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1285, in _send_request
	self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1234, in endheaders
	self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1026, in _send_output
	self.send(msg)
  File "/usr/local/lib/python3.6/http/client.py", line 964, in send
	self.connect()
  File "/usr/local/lib/python3.6/http/client.py", line 936, in connect
	(self.host,self.port), self.timeout, self.source_address)
  File "/usr/local/lib/python3.6/socket.py", line 704, in create_connection
	for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.6/socket.py", line 745, in getaddrinfo
	for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno 8] hostname nor servname provided, or not known

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/freenas-update", line 171, in DoDownload
	rv = Update.DownloadUpdate(train, cache_dir, pkg_type=pkg_type, ignore_space=ignore_space)
  File "/usr/local/lib/freenasOS/Update.py", line 892, in DownloadUpdate
	latest_mani = conf.FindLatestManifest(train, require_signature=True)
  File "/usr/local/lib/freenasOS/Configuration.py", line 1182, in FindLatestManifest
	reason="GetLatestManifest",
  File "/usr/local/lib/freenasOS/Configuration.py", line 788, in TryGetNetworkFile
	raise url_exc
  File "/usr/local/lib/freenasOS/Configuration.py", line 762, in TryGetNetworkFile
	furl = opener.open(req, timeout=30)
  File "/usr/local/lib/python3.6/urllib/request.py", line 526, in open
	response = self._open(req, data)
  File "/usr/local/lib/python3.6/urllib/request.py", line 544, in _open
	'_open', req)
  File "/usr/local/lib/python3.6/urllib/request.py", line 504, in _call_chain
	result = func(*args)
  File "/usr/local/lib/python3.6/urllib/request.py", line 1346, in http_open
	return self.do_open(http.client.HTTPConnection, req)
  File "/usr/local/lib/python3.6/urllib/request.py", line 1320, in do_open
	raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 8] hostname nor servname provided, or not known>
Received exception during download phase, cannot update
root@freenas:~ #

From your FreeNAS box via ssh:

try to ping google.com

The ping will probably fail because /etc/resolve.conf file is empty or at least mine was. I edited it and put in some proper name servers and the patch is installing right now.
 

Juise99

Cadet
Joined
Sep 15, 2017
Messages
3
From your FreeNAS box via ssh:

try to ping google.com

The ping will probably fail because /etc/resolve.conf file is empty or at least mine was. I edited it and put in some proper name servers and the patch is installing right now.

Thanks for sharing this! I am currently running the patch because of your help. I figured DNS wasn't being resolved but the menu driven network configuration options at the terminal weren't working.

Interesting definition of the word "stable" around here. :)

All joking aside I just upgraded to the 11.2 build on my lunch break and didn't even know anything was wrong until I tried to access my smb share 20 minutes ago. Oddly enough my Plex install was up and running fine.
 

kjparenteau

Explorer
Joined
Jul 13, 2012
Messages
70
From your FreeNAS box via ssh:

try to ping google.com

The ping will probably fail because /etc/resolve.conf file is empty or at least mine was. I edited it and put in some proper name servers and the patch is installing right now.

I was finally able to edit the resolve.conf file and was able to get in. However I am not interested in running a beta version at this point. I only changed the train to 11.2 because it said "STABLE", but come to find out it is indeed still beta. After getting the DNS fixed and able to login, I changed the boot options to revert back to 11.1 U6 and all is well with the world again.

All joking aside I just upgraded to the 11.2 build on my lunch break and didn't even know anything was wrong until I tried to access my smb share 20 minutes ago. Oddly enough my Plex install was up and running fine.

I had this EXACT same issue once I was in. SMB was busted, but the Plex jail and plugin was fine, including drawing the media from the FreeNAS media sources. I didn't test SMB unfortunately because I was more interested in reverting back to 11.1 U6 and didn't think to spend the extra time checking for this thread. Sorry!
 

Juise99

Cadet
Joined
Sep 15, 2017
Messages
3
Ugh you guys may want to update your upgrade paths... System / Update seems to think the base-os-11.2-BETA2-1d550a8d16529e9c9fa507a6e3c6804d is newer than the base-os-11.2-MASTER-201809050856-2ba6e030abed637668a79161fcc4a62a
 

dudemanbacon

Dabbler
Joined
Jun 11, 2014
Messages
17
Which train should I be on? I'm currently on Train FreeNAS-11.2-STABLE.

My current OS Version is: FreeNAS-11.2-MASTER-201809110900

My system is telling me that I have an update available to 11.2-BETA3. Which is newer and/or the release I want to be on?

Upgrade base-os-11.2-MASTER-201809110900-b5293f4df533d622e3b9ccece95e9005 -> base-os-11.2-BETA3-3fd5a2ce1af4ee5fdcb8ea48c05ee891
Upgrade docs-11.2-MASTER-201809110900-b5293f4df533d622e3b9ccece95e9005 -> docs-11.2-BETA3-3fd5a2ce1af4ee5fdcb8ea48c05ee891
Upgrade freebsd-pkgdb-11.2-MASTER-201809110900-b5293f4df533d622e3b9ccece95e9005 -> freebsd-pkgdb-11.2-BETA3-3fd5a2ce1af4ee5fdcb8ea48c05ee891
Upgrade freenas-pkg-tools-11.2-MASTER-201809110900-b5293f4df533d622e3b9ccece95e9005 -> freenas-pkg-tools-11.2-BETA3-3fd5a2ce1af4ee5fdcb8ea48c05ee891
Upgrade FreeNASUI-11.2-MASTER-201809110900-b5293f4df533d622e3b9ccece95e9005 -> FreeNASUI-11.2-BETA3-3fd5a2ce1af4ee5fdcb8ea48c05ee891
 
Last edited:

styno

Patron
Joined
Apr 11, 2016
Messages
466
I had this very issue with beta2 and rolled back and deleted the new boot environment. Updating to beta3 today and I am able to login.
 

pixel8383

Explorer
Joined
Apr 19, 2018
Messages
80
Hello, I just updated to the STABLE RELEASE and I am stuck on this issue using Safari on iOS. I can login via SSH and can ping google from it. Any suggestion?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Clear the browser cache and try again. If that doesn't work, please open a new thread.
 
Status
Not open for further replies.
Top