"No Route to Host" / Can't get network connection

Hello everyone.

Unfortunately, I am experiencing some very strange behavior of my Raspberry Pi 4 with DietPi;
For some reason, it does not seem to be accessible via SSH anymore, every time I try to connect to my raspberry pi, I get the error “No route to host”. When taking a look into the devices connected to my router, the DietPi shows up, however. Trying to ping it results in the same routing error.

I have not changed anything or installed anything prior to this issue, I noticed because my OwnCloud suddenly lost connection on every one of my devices.
After tinkering around with hard-restarting my raspi, I suddenly was able to connect to my raspi again (via ssh and owncloud) but shortly after it lost connection again after me trying to edit cronjobs via vim.

Since then nothing has changed. Do you guys have an idea how I should proceed debugging this?

EDIT: When disconnecting my Raspberry from power it for some reason stays in the list of connected devices of my router…

Hi,

easiest would be if you would connect a screen and keyboard to check status on your device as soon as it is not reachable. Do you connect via eth0 or wlan0? As well you could switch to FULL log mode to be able check what happen before you reboot your system.

Well, then I have to buy a micro-hdmi adapter…

as said, you could switch to FULL log mode and try checking logs once rebooted, if they contain information about the hanging situation.

Where do I need to set the appropiate parameter? I can for sure pop out the micro-SD and have a look at log files.

Most likely it is the dhcp lease, which won’t detect a sudden disconnection of the device due to freeze or power cut.
Only if there is a graceful dhcp release it will vanish from the list.

dietpi-software > Log System > Full

are you using WLAN or Ethernet?

Wifi only

so… It will disapper after a while?

Wifi only

probably your device is loosing WiFI connection. You could try setting auto reconnect feature

dietpi-config > 7 : Network Options: Adapters > WiFi > Auto Reconnect : [On]

Thank you. I already ordered a micro-hdmi to hdmi cable and will get into it when it arrives. Until then :slight_smile:

A restart of my router made my DietPi accessible again, and now everything is working fine so far. I activated full logging and wifi-reconnect. Thank you!

Yes, after the lease time is expired.