Flip
(Flip)
October 23, 2020, 7:34pm
39
Well… I can only guess that you installed openhabian some time ago… I rebuild my test-env weekly and the default-path of the latest openhabian for FireMotD seems to be /usr/local/bin/FireMotD. Instead your .bash_profile pointed to /opt/FireMotD/FireMotD. If you run:
/opt/FireMotD/FireMotD -V
I would expect that you still get the old version reported right?
Correct. When I run the /opt instance I get the old version.
[22:32:54] root@openHABianPi:~# /opt/FireMotD/FireMotD -V
FireMotD v7.05.170509
[22:33:26] root@openHABianPi:~# /usr/local/bin/FireMotD -V
FireMotD v12.05.191019
Flip
(Flip)
October 23, 2020, 7:37pm
41
So I would recommend to delete the old installation. As FireMotD doesn’t come via apt, you can simply do:
sudo rm -rf /opt/FireMotD
Afterwards you can try to run:
sudo openhabian-config
again and see if the error of updating FireMotD still comes up…
Flip:
sudo openhabian-config
You are correct.
Now it passed with no errors.
Thank you very much.
I appreciate your prompt and professional responses.
[22:37:45] root@openHABianPi:~# sudo openhabian-config
2020-10-23_22:37:53_IDT [openHABian] Checking for root privileges... OK
2020-10-23_22:37:53_IDT [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2020-10-23_22:37:53_IDT [openHABian] openHABian configuration tool version: [stable]v1.6-880(769ea17)
2020-10-23_22:37:54_IDT [openHABian] Checking for changes in origin branch HEAD... OK
2020-10-23_22:37:57_IDT [openHABian] Switching to branch stable... OK
2020-10-23_22:38:02_IDT [openHABian] Updating Linux package information... OK
2020-10-23_22:38:06_IDT [openHABian] Downloading FireMotD...
Fresh Installation...
$ git clone https://github.com/OutsideIT/FireMotD.git /opt/FireMotD
Cloning into '/opt/FireMotD'...
remote: Enumerating objects: 142, done.
remote: Counting objects: 100% (142/142), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 1336 (delta 108), reused 104 (delta 72), pack-reused 1194
Receiving objects: 100% (1336/1336), 15.52 MiB | 7.81 MiB/s, done.
Resolving deltas: 100% (820/820), done.
OK
2020-10-23_22:38:10_IDT [openHABian] Installing FireMotD...
$ make --always-make --directory=/opt/FireMotD install
make: Entering directory '/opt/FireMotD'
cp FireMotD /usr/local/bin/FireMotD
chmod 755 /usr/local/bin/FireMotD
mkdir -p /usr/share/firemotd/data
mkdir -p /usr/share/firemotd/templates
mkdir -p /usr/share/firemotd/themes
mkdir -p /usr/share/firemotd/cache
cp templates/* /usr/share/firemotd/templates
cp themes/* /usr/share/firemotd/themes
make: Leaving directory '/opt/FireMotD'
$ make --always-make --directory=/opt/FireMotD bash_completion
make: Entering directory '/opt/FireMotD'
cp bash_completion.d/FireMotD /etc/bash_completion.d/FireMotD
make: Leaving directory '/opt/FireMotD'
OK
2020-10-23_22:38:10_IDT [openHABian] Generating FireMotD theme...
$ FireMotD -S -D all
$ FireMotD -G Gray
OK
2020-10-23_22:38:28_IDT [openHABian] Setting up FireMotD apt updates count service...
Make FireMotD check for new updates every night...
$ cp /opt/openhabian/includes/firemotd.service /opt/openhabian/includes/firemotd.timer /etc/systemd/system/
Make FireMotD check for new updates after using apt...
$ install -m 644 /opt/openhabian/includes/15firemotd /etc/apt/apt.conf.d/
Initial FireMotD updates check
$ FireMotD -S
OK
1 Like
Flip
(Flip)
October 23, 2020, 7:41pm
43
Glad it worked! If you are happy with the result, please mark the the topic as solved
1 Like
mstormi
(Markus Storm)
October 30, 2020, 11:39am
44
The real issue with this isn’t the FireMotD version but the point in time when the hw information cache file gets generated on boot, the network isn’t up yet.
Just fixed that in openHABian. Add
After=network.target network-online.target
to the [Unit]
section of /etc/systemd/system/firemotd.service
and do systemctl daemon-reload; systemctl enable --now firemotd.timer
.
cc @ckw ,@rlkoshak
3 Likes
Flip
(Flip)
October 30, 2020, 12:02pm
45
Gargam3L0 had version FireMotD v7.05.170509 and for some reason the update within openhabian-config didn’t work. This old version didn’t show the IP even with a manual FireMotD -S. So I guess it’s a mixture of both - old version and network not up during boot.
PS: @mstormi please correct me but afaik older openhabian installations don‘t have FireMotD running as a service?
mstormi
(Markus Storm)
October 30, 2020, 1:40pm
46
Right, this was changed some time ago. IIRC it was triggered from cron before. You can remove or keep the cronjob if you still have it.
1 Like
Flip
(Flip)
October 30, 2020, 2:16pm
47
Right, /etc/cron.d/firemotd:
# FireMotD system updates check (randomly execute between 0:00:00 and 5:59:59)
0 0 * * * root perl -e 'sleep int(rand(21600))' && /bin/bash /usr/local/bin/FireMotD -S -D all &> /dev/null
Doesn’t seem to work for me. After reboot there’s still the “unable to parse ip” message.
Flip
(Flip)
October 30, 2020, 3:45pm
49
Can you please run the following command and post the output?
sudo systemctl status firemotd.service
Also please post the content of file:
/etc/systemd/system/firemotd.service
**output of **
sudo systemctl status firemotd.service
firemotd.service - Periodic FireMotD stats regeneration
Loaded: loaded (/etc/systemd/system/firemotd.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2020-10-30 16:09:45 CET; 38min ago
Main PID: 536 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/firemotd.service
Oct 30 16:09:39 openHABianDevice FireMotD[536]: W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease Temporary failure resolvi
Oct 30 16:09:39 openHABianDevice FireMotD[536]: W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease Temporary failure resolving ’
Oct 30 16:09:39 openHABianDevice FireMotD[536]: W: Failed to fetch https://repos.influxdata.com/debian/dists/buster/InRelease Temporary failure resolving 'r
Oct 30 16:09:39 openHABianDevice FireMotD[536]: W: Failed to fetch https://deb.nodesource.com/node_10.x/dists/buster/InRelease Temporary failure resolving ’
Oct 30 16:09:39 openHABianDevice FireMotD[536]: W: Failed to fetch https://dl.bintray.com/openhab/apt-repo2/dists/stable/InRelease Temporary failure resolvi
Oct 30 16:09:39 openHABianDevice FireMotD[536]: W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease Temporary failure resolving
Oct 30 16:09:39 openHABianDevice FireMotD[536]: W: Some index files failed to download. They have been ignored, or old ones used instead.
Oct 30 16:09:45 openHABianDevice systemd[1]: Started Periodic FireMotD stats regeneration.
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
Content of file:
/etc/systemd/system/firemotd.service
[Unit]
Description=Periodic FireMotD stats regeneration
After=network.target network-online.target
[Service]
Type=oneshot
User=root
Group=root
RemainAfterExit=yes
ExecStart=/usr/local/bin/FireMotD -S -D all &> /dev/null
[Install]
WantedBy=multi-user.target
Flip
(Flip)
October 30, 2020, 3:53pm
51
Please try:
sudo systemctl restart firemotd.service
and then check again with:
sudo systemctl status firemotd.service
If the error still occurs, please also post the output of:
sudo systemctl status firemotd.timer
Flip
(Flip)
October 30, 2020, 3:58pm
52
Oh, and did you run the 2 commands @mstormi mentioned (after editing the firemotd.service-file)?
sudo systemctl daemon-reload
sudo systemctl enable --now firemotd.timer
Yes, i did run
sudo systemctl daemon-reload
sudo systemctl enable --now firemotd.timer
sudo systemctl restart firemotd.service
resolves the problem, but after a reboot there’s the same errors again.
Output of “sudo systemctl status firemotd.timer” :
firemotd.timer - Daily generation of FireMotD stats
Loaded: loaded (/etc/systemd/system/firemotd.timer; enabled; vendor preset: enabled)
Active: active (waiting) since Fri 2020-10-30 16:58:57 CET; 5min ago
Trigger: Sat 2020-10-31 02:32:30 CET; 9h left
Oct 30 16:58:57 openHABianDevice systemd[1]: Started Daily generation of FireMotD stats.
Flip
(Flip)
October 30, 2020, 4:10pm
54
And after a reboot, what is the output of:
sudo systemctl status firemotd.service
firemotd.service - Periodic FireMotD stats regeneration
Loaded: loaded (/etc/systemd/system/firemotd.service; enabled; vendor preset: enabled)
Active: active (exited) since Fri 2020-10-30 17:05:56 CET; 9min ago
Process: 497 ExecStart=/usr/local/bin/FireMotD -S -D all &> /dev/null (code=exited, status=0/SUCCESS)
Main PID: 497 (code=exited, status=0/SUCCESS)
Oct 30 17:05:34 openHABianDevice systemd[1]: Starting Periodic FireMotD stats regeneration…
Oct 30 17:05:36 openHABianDevice FireMotD[497]: RTNETLINK answers: Network is unreachable
Oct 30 17:05:50 openHABianDevice FireMotD[497]: W: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/buster/InRelease Temporary failure resolvi
Oct 30 17:05:50 openHABianDevice FireMotD[497]: W: Failed to fetch https://packages.grafana.com/oss/deb/dists/stable/InRelease Temporary failure resolving ’
Oct 30 17:05:50 openHABianDevice FireMotD[497]: W: Failed to fetch https://repos.influxdata.com/debian/dists/buster/InRelease Temporary failure resolving 'r
Oct 30 17:05:50 openHABianDevice FireMotD[497]: W: Failed to fetch https://deb.nodesource.com/node_10.x/dists/buster/InRelease Temporary failure resolving ’
Oct 30 17:05:50 openHABianDevice FireMotD[497]: W: Failed to fetch https://dl.bintray.com/openhab/apt-repo2/dists/stable/InRelease Temporary failure resolvi
Oct 30 17:05:50 openHABianDevice FireMotD[497]: W: Failed to fetch http://archive.raspberrypi.org/debian/dists/buster/InRelease Temporary failure resolving
Oct 30 17:05:50 openHABianDevice FireMotD[497]: W: Some index files failed to download. They have been ignored, or old ones used instead.
Oct 30 17:05:56 openHABianDevice systemd[1]: Started Periodic FireMotD stats regeneration.
Flip
(Flip)
October 30, 2020, 4:30pm
57
That’s strange! So during reboot it seems that the network connection can not be established even if you have added:
After=network.target network-online.target
exactly. Content of firemotd.service:
[Unit]
Description=Periodic FireMotD stats regeneration
After=network.target network-online.target
[Service]
Type=oneshot
User=root
Group=root
RemainAfterExit=yes
ExecStart=/usr/local/bin/FireMotD -S -D all &> /dev/null
[Install]
WantedBy=multi-user.target