caarlos0 / speedtest-exporter

Exports speedtest-cli metrics in the prometheus format
Apache License 2.0
51 stars 7 forks source link

Does not run from systemd unit file #17

Closed ottobaer closed 8 months ago

ottobaer commented 8 months ago

The exporter works when started directly from the console but when I put it into a unit file to start it from systemd it throws an error.


Nov 14 15:17:42 jukumari.lan.local.home speedtest-exporter[107626]: 3:17PM INF starting speedtest-exporter master
Nov 14 15:17:42 jukumari.lan.local.home speedtest-exporter[107626]: 3:17PM INF listening on :9876
Nov 14 15:17:49 jukumari.lan.local.home speedtest-exporter[107637]: terminate called after throwing an instance of 'std::logic_error'
Nov 14 15:17:49 jukumari.lan.local.home speedtest-exporter[107637]:   what():  basic_string::_M_construct null not valid
Nov 14 15:17:49 jukumari.lan.local.home speedtest-exporter[107626]: 3:17PM ERR failed to collect error="speedtest failed: signal: aborted"

Here is the unit file I use

[Unit]
Description=Speedtest Prometheus Exporter
After=network.target
Wants=network-online.target

[Service]
Restart=no
Type=simple
ExecStart=/usr/local/bin/speedtest-exporter --refresh.interval=30m

[Install]
WantedBy=multi-user.target
ottobaer commented 8 months ago

I'm closing this here, seems like it's a bug in systemd.