Prometheus Node Exporter /lib/init/init-d-script: /usr/bin/daemon: not found

After Ubuntu upgrade 18.04 -> 18.10, Prometheus Node Exporter started to complain:

root@grafana:~# /etc/init.d/prometheus-node-exporter 
startStarting Prometheus exporter for machine metrics prometheus-node-exporter                                                         
/etc/init.d/prometheus-node-exporter: 45: /lib/init/init-d-script: /usr/bin/daemon: not found

Fix for this is quite easy – just install missing dependency:

root@grafana:~# apt install daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  daemon
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 99.5 kB of archives.
After this operation, 288 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu cosmic/universe amd64 daemon amd64 0.6.4-1build1 [99.5 kB]
Fetched 99.5 kB in 0s (287 kB/s)
Selecting previously unselected package daemon.
(Reading database ... 22628 files and directories currently installed.)
Preparing to unpack .../daemon_0.6.4-1build1_amd64.deb ...
Unpacking daemon (0.6.4-1build1) ...
Processing triggers for man-db (2.8.4-2) ...
Setting up daemon (0.6.4-1build1) ...
root@grafana:~# /etc/init.d/prometheus-node-exporter stop
 * Stopping Prometheus exporter for machine metrics prometheus-node-exporter                                                  [ OK ]
root@grafana:~# /etc/init.d/prometheus-node-exporter start
 * Starting Prometheus exporter for machine metrics prometheus-node-exporter                                                  [ OK ]
root@grafana:~#

After that daemon can be started:

root@grafana:~# /etc/init.d/prometheus-node-exporter start
Starting Prometheus exporter for machine metrics prometheus-node-exporter                                                  [ OK ]
root@grafana:~#
Prometheus Node Exporter /lib/init/init-d-script: /usr/bin/daemon: not found
Tagged on:

Leave a Reply

Your email address will not be published. Required fields are marked *