Ok, so from your logs i can say following things:
after restart your Moonraker is staring fine - no issues there
Klipper is also working properly and moonraker can see it
but i can see that your system did change it’s IP Address
for example if you search “Detected Local IP
” in your moonraker.log file - you will see that in beginning it did have following address: 192.168.1.251 and eventually your Mainsail did connect to Moonraker from 192.168.1.4 address
but after reboot system did receive another address: 192.168.1.254
and no mainsail connections after that
So my conclusion is following: your system is changing IP address on reboot or power failure and Mainsail can no longer connect to it because it’s trying to use old IP Address
Why it’s happening and how to fix it:
When you configure your OS usually it should ask you what kind of network settings you prefer to use Static
(Manually enter them) or Dynamic
(DHCP- Automatic) network settings, if it’s not asking this, then by default it would chose to use Dynamic
(DHCP) configuration because it will automatically give your system all require setting for accessing internet thru your router.
More about DHCP you can read here
When you do initial setup at some point your system will activate network and request network settings from DHCP and it will give those (including IP address) to your device and you are using then to setup Mainsail, but when your system is rebooting after power failure or commanded reboot - your moonraker system (with klipper) would again ask DHCP for network settings, but this time DHCP will give your system other IP address because of some internals reasons.
To fix this behavior it’s possible to re-configure your DHCP system to bind some specific IP address to exact device - this way DHCP will always give out same setting to specific device. For device it would look the same way - it did ask for setting and DHCP will give them, but they will always be the same. You can do that if you have admin access to your router, just read it’s manual and search there instruction how to bind IP address to MAC address in DHCP (MAC - is unique identifier of a network device). Usually it’s not hard, just few clicks.
If you don’t have access to your router then you can chose to use other approach - use Static network settings - for this you would need to define all required network settings in your moonraker instances manually, this way they will not ask DHCP for settings at all, because they already know them.
P.S. You always can switch already installed system to use Static or DHCP settings, you don’t need to re-install.