Web UI unavailable in fresh 9.2.1.5 install after uploading settings from 9.1

Status
Not open for further replies.

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
I just installed 9.2.1.5 on a fresh usb disk and uploaded my settings db from 9.1 (after setting the root password in the very first screen). Now I can't find the web UI, though I can ssh to the box. "ps" can't find nginx but django seems to be running. My plugins in my jail seem to be running ok: I can access their gui from my bookmarks.

This is probably absurd, but still:

Code:
laptop:db sghosh$ nmap -p1-65535 192.168.1.100
 
Starting Nmap 6.40-2 ( http://nmap.org ) at 2014-05-04 16:10 IST
Nmap scan report for freenas (192.168.1.100)
Host is up (0.0019s latency).
Not shown: 65528 closed ports
PORT    STATE SERVICE
22/tcp  open  ssh
111/tcp  open  rpcbind
548/tcp  open  afp
770/tcp  open  cadlock
794/tcp  open  unknown
873/tcp  open  rsync
2049/tcp open  nfs
 
Nmap done: 1 IP address (1 host up) scanned in 337.28 seconds


So nothing seems to be running on port 80 or 443.

My /var/log is a broken symlink to somewhere in one of my data partitions. But I have a /var/log.log.20140504144855 (the suffix looks like today's timestamp)
Code:
[saurav@freenas /var/log.20140504144855]$ ls -l
total 1
-rw-------  1 root  wheel  966 Apr 24 00:21 userlog
-rw-r--r--  1 root  wheel    0 May  4 14:48 utx.lastlogin
-rw-r--r--  1 root  wheel    0 May  4 14:48 utx.log

My ssh login doesn't have root, or else I would try to (re)start nginx. Is there anything I can do to get the web UI?
Thanks,
Saurav.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Are you sure your config file isn't corrupted? Clearly the GUI worked well enough to upload the config file, so I tend to think your config file is corrupt.

On the 9.1 box if you do this command it'll tell you if your config file is corrupt:

# sqlite3 /data/freenas-v1.db "pragma integrity_check;"

If it returns "ok" then your config isn't damaged. Your settings may be wrong, but the file structure is correct.

If it returns anything else then your config file is damaged and you will have to recreate your config from scratch(or use an older backup that isn't corrupted).

So check your config and see what it says... we can go from there.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
You can list all open ports with netstat directly in the FreeNAS shell:
Code:
netstat -na | egrep 'Proto|LISTEN'

Indeed, port 80 should be open here (provided your config didn't enable https exclusively on port 443).

Your scan indicates that nginx couldn't be started. You usually would find more information in the nginx-error.log in /var/log or in the system log /var/log/messages. Since the symlink is broken, something is fundamentally wrong with the installation. Under normal circumstances, it should either point to a .system dataset on one of your pools, where the logs are saved since 9.2.1.x, or alternatively just be a plain folder.

So follow cyberjocks advice and see if the database is corrupted..

EDIT: Actually, re-reading your OP, you mention that you don't have root rights via SSH. This makes a database check impossible, so you might need to hook up a monitor and do it manually from the physical system.
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
I'll have to wait till tomorrow to "verify" the freenas-v1.db as cyberjock suggested, but in the meanwhile I tried these:

1. I ran the cyberjock's command on the settings db I exported from 9.1 on OS X, and it gave me this:

Code:
laptop:Freenas-9.2 sghosh$ sqlite3 ~/Downloads/freenas-FreeNAS-9.1.1-RELEASE-x64\ \(a752d35\)-20140504123443.db "pragma integrity_check;"
ok


2. I rebooted with 9.1, inserted the 9.2 thumbdrive and mounted the new device, but couldn't find the freenas-v1.db:

Code:
[saurav@freenas] ~# mkdir /tmp/blade && mount /dev/da1s1a /tmp/blade && cd /tmp/blade
[saurav@freenas] /tmp/blade# ls
./        .profile  bin/      conf/      etc/      libexec/  ports/    root/      tmp@
../        .snap/    boot/      data/      home@      media/    proc/      sbin/      usr/
.cshrc    COPYRIGHT* cfg/      dev/      lib/      mnt/      rescue/    sys@      var/
[saurav@freenas] /tmp/blade# cat etc/version
FreeNAS-9.2.1.5-RELEASE-x64 (80c1d35)
[saurav@freenas] /tmp/blade# ls data
./  ../  zfs/
[saurav@freenas] /tmp/blade#

That is, I couldn't find the freenas-v1.db on the unmounted 9.2.1.5 disk, provided I mounted the correct partition.

I will try again tomorrow (once I get a keyboard) on a live 9.2.1.5 system, but even if the freenas-v1.db exists and it is corrupt (or not), what would I do differently to migrate to a 9.2 system with my settings from 9.1 (without upgrading the 9.1 disk)?

Thanks for your help.

Regards,
Saurav.
 

warri

Guru
Joined
Jun 6, 2011
Messages
1,193
The database should be on the 4th partition of the stick.
You could try installing a fresh 9.1, importing your 9.1 config and then upgrading this new system to 9.2.x.

Since there seems to be no way to see your logs, there is unfortunately not much room for other diagnosis..
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
saurav: Can you post your server hardware specs? I'm wondering if you have <8GB of RAM.... ;)
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
Its an HP N36L box, which is easy to add/remove HDs to. Indeed, I have 4GB of RAM (actually 5GB, 1 + 4, but this box needs both cards to be identical, so it uses only 4GB). But then I don't use ZFS at all. All my shares are UFS. The usb stick is 8GB.

This hardware is pretty old but good enough for my purposes. Here is one working link I found that describes the hardware:

http://blog.samat.org/2010/12/10/Hardware-review-of-the-Hewlett-Packard-ProLiant-N36L-Microserver

Here's the "System Information" panel. Let me know if I should post anything else.

Hostname freenas.local
Build FreeNAS-9.1.1-RELEASE-x64 (a752d35)
Platform AMD Athlon(tm) II Neo N36L Dual-Core Processor
Memory 3819MB
System Time Sun May 04 22:53:11 IST 2014
Uptime 10:53PM up 2:48, 0 users
Load Average 0.10, 0.08, 0.08

Thanks,
Saurav.

ps: here's another post that looks similar to my problem:
http://forums.freenas.org/index.php?threads/web-gui-not-accessible.18937/
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
You use UFS.. wowzers. You know FreeNAS plans to discontinue UFS support with 9.2.2, right?

Better start planning your next strategy. :P
 

saurav

Contributor
Joined
Jul 29, 2012
Messages
139
Finally I could run cyberjock's "integrity_check" command, and it said "ok".

Regards,
Saurav.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Well, there's 3 possibilities:

1. You've got some kind of configuration problem in your config file, like a setting conflict.
2. There's some big with 9.2.1.5 that's causing your problems.
3. Your RAM is insufficient and/or UFS support is causing problems.

FreeNAS behaves very erratically when it doesn't have enough RAM and the only way to definitively prove you don't have a RAM problem is to add more RAM. Probably not the problem here, but there's no way to know for certain except to upgrade.

UFS has been a problem for the developers. Basically nobody uses it and nobody tests it for bugs anymore since it's being removed.

I'm really not sure what to recommend except to go back to your old version that works and keep using that while you determine how to proceed. UFS support is gone, so you're going to very shortly be unable to upgrade and enjoy the bug fixes and security patches that come with newer version. Clearly your future path is unsustainable, I just don't know what you should do next.
 
Status
Not open for further replies.
Top