Unnable to connect to Home Assistant

My Home Assistant is running on an Intel NUC. I want to move it to another NUC. I’ll call them NUC1 and NUC2. Here’s my process:

  1. Perform a full backup of NUC1 to an external storage location.
  2. Unplug the Ethernet cable from NUC1 to avoid conflicts. (There is no WiFi).
  3. Flash an M.2 SSD with Home Assistant 10.3
  4. Install the newly flashed M.2 into NUC2.
  5. Boot NUC2.
  6. I get the welcome to Home Assistant and set up an account name, password, location, etc.
  7. I log onto Home Assistant at 192.168.1.54:8123 on NUC2.
  8. I set up the external Storage on my NAS. Same as NUC1.
  9. I go to System/Backups and find my most recent backup from NUC1.
  10. Click on the file and select “Restore”.
  11. Restore completes (I think).
    But, I cannot connect to the front end of Home Assistant on NUC2.
    I tried www://homeassistant.local:8193, www://192.168.1.54:8193, even through DuckDNS. All say “Unable to connect”.

Here’s where it gets strange:

Observer says everything is OK.

The HomeAssistant CLI on the monitor connected to NUC2 looks normal. The splash screen reports IPV4 as 192.168.1.54/24. “Network info” shows the same IPV4 address. “Hardware info”, well it scrolls offscreen too fast to read anything and I can’t pipe to more ( | more). A network IP scan shows the correct IP, hostname and MAC address for NUC2.

Even Automations and Node-RED flows are running on NUC2.

I just can’t connect to NUC2 Home Assistant front-end.

Any tips would be appreciated.

Did I put this in the wrong section (Installation)?

You did not put it in a category at all. You tagged it "installation’.

Moved and merged.

I have the same setup.

My media is not removable so I do the USB option.

I had this issue before, can’t remember what was the cause, but I remember that I hooked my NUC via HDMI to a TV so I could see the boot sequence which helped me solve it.

I assume you did all the BIOS changes already.

The two NUCs are identical. As I said, I flashed HAOS to the second M.2 SSD, booted it and got the expected setup windows. Everything worked fine until I did a system restore from the first NUC. After that I could not connect with the UI at 8123. The observer at 4357 looked normal and I could tell that automations and Node Red flows were working. Home Assistant was running but I could not connect to the UI. I have done a dozen or more system restores over the years and they have all been like clockwork until now. I am open to suggestions.

Check your router IP table and go direct to XX.XX.XX.XX:8123 instead of the .local address?

Your DNS table might be a little messed up right now.

1 Like

I tried
www://homeassistant.local:8193
www://192.168.1.54:8193
even through DuckDNS.
All say “Unable to connect”.

Have you tried the “idiotic” things, that sometimes helped even back in the 90s:

  • clear the brwoser cache or use a private tab?
  • restart HA one or two times?

Can you hook up a monitor to the HDMI port and watch it boot? See if it is getting caught up on something.

Do you have a static IP? Or is that what your router assigned? The .54 is where you found it, BUT did your backup have a static IP set?

If your IP is dynamic then I am curious how your DuckDNS hairpin is setup on your router? Is it pointing to a specific IP? Is it pointing to homeassistant.local?

It is either a network issue OR it is not fully starting.

1 Like

More times than I can count.

Did you try that or http://(insert other stuff here)

www:// is not a protocol prefix

It boots normally into the CLI.

Both are DHCP with the router set to permanent lease (static).

The what? (Hairpin)? I installed the DuckDNS Add-on and in the router set up forwarding for 443 and 8123. But, you may be on to something. Looking at the Port Forwarding table in the router, I had forgotten that the forwarding was IP specific:

Port Forwarding

This might explain why nothing I do from the network was going to get me to 192.168.1.54 because of the DuckDns add-on. It would also explain why Home Assistant automations are running.

If this theory is correct, I have a couple of ideas. (Your input would be appreciated).

Option1:

  1. On NUC1: Make a backup as is with DuckDNS installed.
  2. Remove NUC1 from the network.
  3. On NUC2: Install Home Assistant as before then
  4. Set a fixed IP on NUC2 (Settings → System → Network) to NUC1’s old IP address (192.168.1.57).
  5. Perform a restore from the NUC1 backup.
  6. Reboot.

Since NUC2 will now have the IP address of NUC1, everything should work as before.

Option2:
Change the port forwarding table in the router from 192.168.1.57 to 192.168.1.54.

I am inclined to go with Option 2. Your thoughts?

Option 1 if it’s a permanent replacement

That would be true. It also occurred to me that many of my Node Red flows are hard coded with the 192.168.1.57 address.

It was originally going to be a temporary replacement while I analyze why NUC1 was crashing every day or so. But since the NUCs are identical otherwise it makes sense to make it a permanent replacement.

Does my analysis make sense with the symptoms presented?

Edit- It just occurred to me that I should set the static IP in NUC1 to 192.168.1.57 before making the backup. This way the configuration files will be pointing to the right IP before and after.

You might try a simple ping: ‘ping 192.168.1.54’ and if that works you can ping the port: ‘telnet 192.168.1.54 8193’. if telnet connects, it will return some escape characters because it it expecting to connect to a telnet server.

Your reasoning is correct. Although I wouldn’t make any changes.

Primary use of backup will be to restore from failure and I that case you want to change as LITTLE AS POSSIBLE.

Go back to your original backup and restore it again. Using new revised plan.

Take old off network pull new on network and use whatever IP tricks you used (i use a reservation myself) to give new box old ip address. See if everything comes up ok. If not figure out why. Repeat until good.

Welcome to your first Disaster Recovery (Dr) exercise. Get good at it and then you can upgrade your HA install with impunity knowing you always have a way out.

Ping to 192.168.1.54 works, telnet not so:

steve@Gallifrey:~$ telnet 192.168.1.54 8193
Trying 192.168.1.54...
telnet: Unable to connect to remote host: Connection refused

You mean like making NUC1 a static IP before backing up? I don’t see a problem there because when restoring the backup on NUC2, it will inherit the IP of NUC1.

I’ve used backup/restore dozens of times always to save my bacon from messed up experiments. But it was always to the same host. This is the first time I tried going to a new host.

1 Like

You can if you want. My point is don’t change your behavior for this instance.

The ONLY item you missed in your original process was to not change over the IP address.

If you go static that’s fine too but it brings it’s own problems to the table (like if you accidentally forget to pull off the old box. Colissions. I like the reservation change because depending on how you’re managing IPs it becomes self correcting.)

So just add the 'I have to make sure the IP reservation is still valid) step in your restore process and repeat. Done. No changes to behavior therefore fewer accidents…)

I do prefer IP reservations myself. I can easily change the reservation for NUC2 in the router after removing NUC1- in that case it should work after that minor change.

1 Like