Does OH3 regularly reboot?

Hi all, I just sshed into my OH3 and was surprised to see the Message Of The Day listing a 169.254 IP. Got curious and looked into syslog, found close to where the IP was set some entries which suggest to me that OH3 reboots on a schedule.

Apr  4 06:44:14 openHABianDevice rngd[334]: entropy feed to the kernel ready
Apr  4 06:44:14 openHABianDevice kernel: [    0.000000] Booting Linux on physical CPU 0x0
Apr  4 06:44:14 openHABianDevice kernel: [    0.000000] Linux version 5.4.83-v7l+ (dom@buildbot) (gcc version 8.4.0 (Ubuntu/Linaro 8.4.0-3ubuntu1)) #1379 SMP Mon Dec 14 13:11:54 GMT 2020
Apr  4 06:44:14 openHABianDevice kernel: [    0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d

Does that happen, is OpenHabian programmed/scheduled to reboot every day at some time of the day?

Also, is there anyway that I can force the IP in the config files? I use a 192.168 range and have an IP reserved for my Pi, so that would come in handy, although the 169.254 IP the Pi believes it has doesn’t seem to have created any issues.

No.

No. Map your MAC to the IP you want on your DHCP server.
IIRC if it doesn’t get it via DHCP it’s using that 169 address.

Humm… that’s what I’ve been doing. It is mapped/reserved at my dhcp server (MAC to IP). I can reach it from the 192.168. number both in ssh as http but OH3 somehow thinks it is at 169.254.

That type of IP assignment generally means there is no network connectivity - i.e. if DHCP does not get an IP from the DHCP Server at the time, it will assign an ‘Automatic Private IP Address’ in that ‘169.254.xxx.xxx’ IP range. I’d suggest investigating other device or related local area network problems.

Is it possible you had a power outage that would have caused your Router and openHAB server to restart at the same time?

1 Like

Hi Mike, I don’t believe so because they’re both on UPS and the OH server is connected via cable to the router. When I logged in today (no reboot in between that I’m aware of) OH3 has my 192.168 address at the Message of the Day.

Maybe the DHCP from my router sometimes takes too long to reply back and then OH3 assumes no DHCP and takes a private IP in 169.254.?

@flpaoli - Gotcha; understood that they are both backed by a UPS.

From your original post - you mentioned you SSH’d into your OH Server, even though the ‘Message of the Day’ showed the private IP address… SSH’ing shouldn’t be possible if you didn’t have any network connectivity! Maybe you have multiple Network Interfaces, such as WIFI and Ethernet. I would check that with the following (if Ethernet only, it should only show eth0/lo interfaces):

sudo ifconfig

Then comb your system logs for networking related problems, with something like these commands:

grep -i 'network' /var/log/syslog
dmesg | grep -i 'eth'

Hope that helps!
.

Caught my system rebooting by itself again.

I logged in today via ssh 192.168.x.x and noticed IP was in the 169 range, with short uptime, which was impossible because it had been on for at least 3 weeks:

##############################################################################
###############  openHABianDevice  ############################################
###############################################################################
##        Ip = 169.254.89.60
##   Release = Raspbian GNU/Linux 10 (buster)
##    Kernel = Linux 5.10.17-v7l+
##  Platform = Raspberry Pi 4 Model B Rev 1.4
##    Uptime = 1 day(s). 4:14:34
## CPU Usage = 0.25% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
##  CPU Load = 1m: 0.34, 5m: 0.30, 15m: 0.22
##    Memory = Free: 0.49GB (26%), Used: 1.38GB (74%), Total: 1.87GB
##      Swap = Free: 1.99GB (100%), Used: 0.00GB (0%), Total: 1.99GB
##      Root = Free: 201.15GB (96%), Used: 6.70GB (4%), Total: 219.06GB
##   Updates = 10 apt updates available.
##  Sessions = 1 session(s)
## Processes = 125 running processes of 32768 maximum processes
###############################################################################

Looking at openhab.log I find this anomaly and evidence of openhab restart:

2021-06-09 19:05:24.194 [INFO ] [org.openhab.rule.992eab9926-fan     ] - Fan1 Dimmer = 0 / Temp = 23.2 °C
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\002021-06-09 19:08:54.902 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'America/New_York'.
2021-06-09 19:08:54.964 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to 'nnnnnnn,nnnnnnnnn'. [obfuscated by me]
2021-06-09 19:08:54.969 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'en_US'.
2021-06-09 19:08:54.973 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Measurement system set to 'SI'.

Then, looking into the syslog there it was:

Jun  9 19:04:50 openHABianDevice systemd[1]: Started Network Time Synchronization.
Jun  9 19:04:50 openHABianDevice systemd-timesyncd[13781]: Synchronized to time server for the first time 159.203.82.102:123 (0.debian.pool.ntp.org).
Jun  9 19:05:01 openHABianDevice CRON[13786]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
Jun  9 19:08:03 openHABianDevice kernel: [    0.000000] Booting Linux on physical CPU 0x0
Jun  9 19:08:03 openHABianDevice kernel: [    0.000000] Linux version 5.10.17-v7l+ (dom@buildbot) (arm-linux-gnueabihf-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1414 SMP Fri Apr 30 13:20:47 BST 2021
Jun  9 19:08:03 openHABianDevice kernel: [    0.000000] CPU: ARMv7 Processor [410fd083] revision 3 (ARMv7), cr=30c5383d

I don’t have any reasonable explanation for why this is happening. Does anyone experience similar unprompted reboots?