Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unraid WebGUI HTTP 500 on /Main :: Issue and workaround

Featured Replies

I ran into an issue where the Unraid WebGUI login page worked normally, but immediately after logging in, /Mainreturned:

HTTP 500 Internal Server Error

This happened while a disk reconstruction was actively running, so rebooting, stopping the array, or restarting emhttpdwas not an acceptable troubleshooting option.

Nginx itself was working, PHP-FPM was running, the PHP socket existed, and there was plenty of free RAM-filesystem space/inodes. Nginx's error log also wasn't showing anything useful when /Main failed.

The breakthrough was checking PHP's actual error log:

tail -f /var/log/phplog

When I attempted to load /Main, it showed:

PHP Fatal error: Uncaught TypeError:
extract(): Argument #1 ($array) must be of type array, false given
in /usr/local/emhttp/plugins/dynamix/template.php:55

Looking at that section of template.php showed:

// Read network settings
extract(parse_ini_file('state/network.ini',true));

Checking the expected file:

ls -l /usr/local/emhttp/state/network.ini

returned:

No such file or directory

However, searching for the runtime copy found it here:

/var/local/emhttp/network.ini

I initially restored that individual file:

cp -a /var/local/emhttp/network.ini /usr/local/emhttp/state/network.ini

That got PHP past line 55, but /Main still returned HTTP 500. Checking /var/log/phplog again showed the next error:

PHP Fatal error: Uncaught TypeError:
date(): Argument #2 ($timestamp) must be of type ?int, string given
in /usr/local/emhttp/plugins/dynamix/template.php:59

That line depended on another state file, state/var.ini. This established that the problem wasn't limited to network.ini: multiple runtime .ini files were missing from /usr/local/emhttp/state/.

Final fix

Instead of restoring them individually, I copied the existing runtime state INI files from /var/local/emhttp/ into the location Dynamix was expecting:

cp -a /var/local/emhttp/*.ini /usr/local/emhttp/state/

I then refreshed /Main.

The Unraid WebGUI immediately started working normally again.

Root cause

The immediate cause was missing runtime state files under:

/usr/local/emhttp/state/

Dynamix's template.php expected files such as:

state/network.ini
state/var.ini

but they weren't present. Valid copies still existed under:

/var/local/emhttp/

Because parse_ini_file('state/network.ini', true) returned false, PHP 8 threw a fatal TypeError when Dynamix passed that result to extract(). After restoring network.ini, PHP progressed further and failed on the missing data normally supplied by var.ini.

Copying the complete set of existing .ini runtime files resolved the GUI.

Important note

This is not the first time this has happened. It is usually when intense disk activity runs for an extended period such as a rebuild or disk to disk copy operation. While a reboot generally resolves it, I did not reboot Unraid, stop the array, restart emhttpd, restart PHP-FPM, or interrupt the disk reconstruction. The repair was performed while the reconstruction continued running.

The remaining question is why /usr/local/emhttp/state/ lost these runtime state files in the first place. The fix restored the GUI, but the underlying event that caused those files to disappear still needs to be determined.

nasvm-diagnostics-20260915-1922.zip

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.