I have been playing with openHAB for a few months now.
openHABian is installed on a RPi 3, connected via WiFi.
So far, everything seemed stable, I added all my personal belongings (Tradfri bulbs, shutters, Logitech Harmony, prescence detection etc …) and created many rules.
This morning, nothing lights up as usual, so,
- I try to connect to my open-habian server using putty I have this message “connection trimed out”, and nothing … no access,
- I check the prescence of my raspberry on the network, I see it, the IP is good,
- I connect on myopenhab.org I see my server (same in android phone)
-I try to unplug the power and do a “hard reboot”, still no access after several attempts.
-I do not have access to the different logs either.
-i try to connect it to ethernet and still no access
What do you think the problem is, can we solve it, can we make a backup before possibly reinstalling everything?
Thanks for your help.
I had the save behavior month ago. My SD card crashed. Did you moved the write excessive part to an USB stick?
Try to connect a monitor to the pi and see what the error message is.
Hi, thanks for your help
all configurations files are on USB stick
i plugged the raspberry on my monitor as you adviced and i saw one error
FAILED TO START DHCPCD ON ALL INTERFACES
i’m looking for answers in the forum
Everything I found with a little search refers to /etc/network/interfaces. Did you configured/changed anything before the crash?
PS That error is not openHAB specific but raspberry pi specific. Maybe you can search there for a solution too.
hey same conclusion for me…pi problem,
to answer you i changed nothing before the crash
i’ll try this method :
sudo systemctl disable dhcpcd.service
sudo systemctl reboot
from this forum:
Hmm. The cause sounds legit. But why did your DHCP server start up suddenly?
so, i tried the method describe below, i’v no more error on reboot, but still no access via putty
Not enabled, actually running? Enabled just means that it is supposed to start when the system starts. Running means it’s actually actively running. The fact that your ssh attempts are timing out implies that the daemon is not running.
sudo systemctl status sshd
should return something like this
● ssh.service - OpenBSD Secure Shell server
Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-02-08 10:38:23 MST; 2 weeks 6 days ago
Main PID: 15420 (sshd)
Tasks: 1 (limit: 4915)
└─15420 /usr/sbin/sshd -D
Mar 01 08:54:34 argus sshd: Disconnected from invalid user zhua 220.127.116.11 port 39357 [preauth]
Mar 01 08:54:51 argus sshd: Invalid user danny from 18.104.22.168 port 37316
Mar 01 08:54:51 argus sshd: Received disconnect from 22.214.171.124 port 37316:11: Bye Bye [preauth]
Mar 01 08:54:51 argus sshd: Disconnected from invalid user danny 126.96.36.199 port 37316 [preauth]
Mar 01 08:54:58 argus sshd: Invalid user yp from 188.8.131.52 port 46650
Mar 01 08:54:58 argus sshd: Received disconnect from 184.108.40.206 port 46650:11: Bye Bye [preauth]
Mar 01 08:54:58 argus sshd: Disconnected from invalid user yp 220.127.116.11 port 46650 [preauth]
Mar 01 08:55:12 argus sshd: Invalid user tr from 18.104.22.168 port 50754
Mar 01 08:55:12 argus sshd: Received disconnect from 22.214.171.124 port 50754:11: Bye Bye [preauth]
Mar 01 08:55:12 argus sshd: Disconnected from invalid user tr 126.96.36.199 port 50754 [preauth]
Notice where it says
Active: (running). If it says anything else sshd is not running.
This is my ssh that is port forwarded so you can see how anything that is exposed to the Internet is under constant attack with the log statements below the header info. I need to re-enable fail2ban on this machine.
sudo systemctl status sshd
Unit sshd.service could not be found
i try ton enable it via
sudo systemctl enable sshd.service
Failed to execute operation: No such file or directory
It definitely looks like your sshd is either gone or pretty broken. You can reinstall it but one has to ask why/how it became in this state. One thing to note is pulling the power on a machine that happens to be writing to any sort of flash memory can cause widespread corruption of files, including files that are not actively being written. That could be the case here, but I doubt it. This looks like sshd was uninstalled.
systemctl enable ssh.service
it seems to work, then i checked the status of sshd service as you said and now is ACTIVE
problem to copy logs ( my raspberry is in the living rooom and i got one keyboard for both computer and raspberry…you see what i meen)
But still no putty access
See if you can ssh on the openHABian machine itself to itself.
i’m not sure to understand what you mean
From your openHABianPi machine.
Were you using DHCP to get an IP address? If so, you need dhcpcd.
If you’ve disabled dhcpcd you won’t get an IP address and won’t be able to connect.
Check to see what your IP address is. Run “ip address” and look for the wlan block, and find the inet address. If it starts with 169.254 then you don’t have a valid IP, and the dhcpcd needs to work.
dhcpd is the DHCP server that hands out IP addresses to other hosts. You likely don’t need it.
dhcpcd is the DHCP Client Daemon which gets you an IP address from your DHCP server. You probably need it.
Try systemctl start dhcpcd and then journalctl -u dhcpcd.service to see what errors are happening. Once you get that sorted you should have a workable IP address again.
If you’ve assigned a fixed IP address on the host, all this isn’t helping, and I don’t know why you can’t ssh to your host.
Having the exact same issue. Came out of nowhere
Tried to start dhcpcd service but get the following