Web interface not accessible after migration - new forums version

So, I have a similar situation to this topic: SOLVED - Web interface not accessible after migration | TrueNAS Community

I did a test migration from CORE to SCALE on a ‘backup’ machine with no issues. Installing a fresh SCALE installation and uploading the CORE configuration (via WebUI) brought me to the unreacahble WebUI situation.

I have a DHCP served IP on my NIC. Going through the linked topic (on the old forums), it looks like the WebUI IP is set to 192.168.0.10 (looks like I set it ages ago on my old network - moved the server to current network and had no issues accessing it via current P of 10.0.0.10). Using the command to change the IP:

sudo midclt call system.general.update ‘{ “ui_address”: [ “10.0.0.10” ] }’

returns the following:

[EINVAL] general_settings_update.ui_address: 10.0.0.10 ipv4 address is not associated with this machine

The weird thing is that before exporting the settings on CORE, I did update this IP specifically to the current one…

Any ideas how I can force the change of UI IP?

Set the address to “0.0.0.0” instead, it’s a lot less picky and should ideally just work (it’s also the default).

Okay, I booted CORE, set the UI IP to 0.0.0.0 and uploaded the modified config to SCALE again. Now I get the info that the IP is 10.0.0.10, but my browser doesn’t load the page. I can obviously ping the IP, but there is nothing that loads in the browser.

EDIT: pushed the command to update it to 0.0.0.0, looks like it went through, but like I said, nothing is happening in the browser… Connection refused.

EDIT2: the command did nothing, 0.0.0.0 comes from the updated config file (whereas it was previously 192.168.0.10).

And you verified that the server claims to be listening on the address you listed?
Hmm, did you also change the allow list from the default?

If that sounds familiar, try removing that with:
sudo midclt call system.general.update ‘{ “ui_allowlist”: [] }’

I am not sure what you mean by the command not doing anything, it clearly changed which IP the webserver would be linked to to something less specific.

Edit: I am not sure, but you may need to restart the middleware to get it to use these new settings. This can be by simply restarting the server.

    @accepts()
    @returns(Dict('available_ui_address_choices', additional_attrs=True, title='Available UI IPv4 Address Choices'))
    async def ui_address_choices(self):
        """
        Returns UI ipv4 address choices.
        """
        return {
            d['address']: d['address'] for d in await self.middleware.call(
                'interface.ip_in_use', {'ipv4': True, 'ipv6': False, 'any': True, 'static': True}
            )
        }

SCALE requires static addresses for UI bind ips. Just FYI.

Okay, timeline…

Weeks ago I exported CORE settings and applied them to a fresh Electric Eel install on a separate system. No issues.

Today I exported CORE settings, setup a new SSD mirror array and installed Electric Eel. Worked fine, applying CORE settings broke the UI.

midclt calls worked except for the IP not associated error.

I booted CORE again, set the UI IP to 0.0.0.0 8, exported settings, reset SCALE settings and applied them again. UI IP is now set to 0.0.0.0 instead of 192.168.0.10. System reports UI is accessible at 10.0.0.10 (IP of NIC), but it doesn’t load.

midctl calls to change IP give an error:

root@freenas[~]# sudo midclt call system.general.update ‘{ “ui_address”: [ “10.0.0.10” ] }’
ConfigService.update() takes 3 positional arguments but 8 were given
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 211, in call_method
result = await self.middleware.call_with_audit(message[‘method’], serviceobj, methodobj, params, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1529, in call_with_audit
result = await self._call(method, serviceobj, methodobj, params, app=app,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/middlewared/main.py”, line 1460, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ConfigService.update() takes 3 positional arguments but 8 were given

It was changing the IP in CORE that did the trick, not the command.

Now, restarting the middleware and nginx…

root@freenas[~]# service middleware restart
Failed to restart middleware.service: Unit middleware.service not found.
root@freenas[~]# service nginx restart
Job for nginx.service failed because the control process exited with error code.
See “systemctl status nginx.service” and “journalctl -xeu nginx.service” for >details.

I don’t recommend trying to bind the WebGUI to a specific IP (10.0.0.10) like that. At the very least right now, when you are having issues connecting. More so because of what awalkerx said, it being an invalid configuration together with DHCP (for good reason!).

In a home network it seems more likely to introduce frustration when running into an issue rather than provide any actual security. A likely entrypoint for an intruder is through your primary client PC, which probably all the passwords stored on it as an added bonus.

Without more information I don’t know what else to say.
Possible causes are that you made other changes from the default regarding accessing the server or its network configuration.

I don’t want to bind anything. I set the IP of the NAS via DHCP. What I want is to upgrade my CORE installation to SCALE and transfer all the settings. Doing it on a separate machine caused no issues. Here I have issues. I want to fix these issues. What more information can or should I provide? Setting IPs for the UI were just steps to try to fix the issue. If there’s a proper way to do it I’m all ears.

But, as I said, the basic question should be: why were there no issues on a separate machine, but there are issues on the same machine upgrading CORE to SCALE?

FWIW, I will now install a fresh version of CORE 13.0 U6.2 and restore my setting there, then try the upgrade package to SCALE.

Looks like I found the problem. I imported my CORE 13.0 U5 settings to SCALE 24.10.

I got it to work by upgrading CORE U5 to U6.4 and importing the settings to a fresh U6.2 install (as I installed CORE onto new drives, finally moving from USB drives to SATA SSDs - the CORE was originally installed 8 years ago as FreeNAS), I then upgraded to 22.10 and upgraded that to 24.10. Then everything worked fine.