FreeNAS 9.2 GUI not responding

I've had a couple of FreeNAS boxes running for a while now and decided I should put forth my experiences in the hope that it will help others.

When something goes wrong you can always just restart the FreeNAS box and hope it is fixed, but that usually doesn't stop the same problem happening again!

If you have a problem of the FreeNAS GUI not responding (for example an 'unable to connect' error in your web browser), there are a few things to check to see why.

I'm assuming you can still SSH into your FreeNAS box, becasue if you cant you will need a monitor and keyboard attached to your FreeNAS box and have to work locally.

First off, the FreeNAS GUI is served by the 'nginx' web serving service, so we need to check that the nginx service is running.

SSH into your FreeNAS box and enter:

% sudo service nginx status

If you get 'nginx is not running' or similar, then you need to start it by running:

% sudo service nginx start

Which should display something like this:

Performing sanity check on nginx configuration:
nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
Starting nginx.

If you cannot start nginx, then you need to look up the errors displayed to you to try and find out why it wont start.

If your nginx service starts ok, then try and connect via your web browser.

nginx service is running

SSH into your FreeNAS box and enter:

% sudo service nginx status

If you get 'nginx is running as pid 01234' or similar, then something is stopping nginx from serving you the FreeNAS GUI.

First try and restart the service and see if you can connect via your web browser:

% sudo service nginx restart

Check the output here to make sure the nginx service restarts ok, then go to your web browser and see if it is fixed.

If it is not fixed (and your nginx service seemed to start ok), then we need to find out what is wrong with the system, as it doesn't appear to be the nginx service.

Finding the cause of nginx problems

Viewing your log files is always a good idea, and they should be in the directory '/var/log', go ahead and enter the following:

% ls /var/log

Take note of the files in the directory, they may help you troubleshoot a different problem with your system in the future. The files we are wanting to look at are 'nginx-access.log' and 'nginx-error.log'.

Switch to your web browser and try to connect to the FreeNAS GUI, then switch back to your SSH terminal and enter:

% cat /var/log/nginx-access.log

The last entry should be your attempt to access the GUI, if it isn't then make sure your nginx service is running and try again.

Since we are having trouble with the FreeNAS GUI, we should also check the nginx error log as well, so enter the following:

% cat /var/log/nginx-error.log

The last error in the file should also be your latest attempt to connect to the FreeNAS GUI.

Depending on what error(s) you have will decide how you need to approach the problem. Unforntunately, the error codes and text don't always point you in the right direction. Another place to check for system errors that might be affecting your nginx service is in the 'messages' logfile. This logfile can also be displayed by entering:

% dmesg


% cat /var/log/messages

The error output here may help to point you in the right direction and this is where your natural troubleshooting abilities need to kick in.

In my latest case of the FreeNAS GUI going down 'dmesg' had a lot of unsuccessful swap space allocation attempts and the last line of the messages log said that the system had killed off a process (Python) to try and free up memory.

The swap space errors and the killing of the Python process made me think that perhaps something had used up all of the systems memory. Then I connected that I had just installed and started a service inside a FreeNAS jail, and the FreeNAS GUI going down.

After some unsuccessful attempts to get the FreeNAS GUI working correctly again I decided to turn off the automatic start up of service in the jail and restart the system.

The FreeNAS GUI came back online and now I need to decide whether I want the new service I installed in the jail or not.

Example issue causing the FreeNAS GUI to stop responding

I recently just installed a ClamAV service into a FreeNAS jail and started it, scanning the '/home'directory. The FreeNAS box serves as storage for backups and file storage and I thought having ClamAV run on the files would be a good idea.

I then went to connect to the FreeNAS GUI to see what the CPU load was during a scan.

I couldn't get the GUI to display.

I went through the troubleshooting process, and searched the internet too.

After looking at the log files I worked out that the ClamAV service in the jail had used up all of the systems memory. The system had also killed off a Python proces, which may or may not have been causing the FreeNAS GUI error, I'm not sure yet.

I edited the '/etc/rc.conf' file and set the ClamAV services to disabled:


After a reboot, the FreeNAS GUI came online again.

The amount of RAM I have in this FreeNAS box is 2GB, and is quite a bit lower than the recommended 8GB. I suspect that a RAM upgrade will be required or I won't be able to run ClamAV.

After getting back into the FreeNAS GUI I had a look at the swap space figures and saw this:

full swap

Something is eating up the swap space periodically. The right of the screen shows the system after a restart - zero swap space used.


It seems that it was a coincidence that I had just installed ClamAV and the FreeNAS GUI stopped responding. I have enabled the ClamAV daemon in the jail, and the swap space is still staying at 0%. More troubleshooting will have to be performed to find out why the swap space was being consumed.