Actions
Bug #16225
openTelegraf service does not restart after change of settings
Start date:
Due date:
% Done:
100%
Estimated time:
Plus Target Version:
25.11
Affected Version:
Affected Plus Version:
25.07
Affected Architecture:
All
Description
Documented here: https://forum.netgate.com/topic/197682/telegraf-service-not-starting-after-change-of-setting
The Telegraf service does not restart when applying new settings. The root cause seems to be related to the use of the daemon and no wait between rc_stop and and rc_start in rc_restart. Solved by inserting a pwait after the kill:
--- /usr/local/pkg/telegraf.inc 2025-05-15 17:55:23.000000000 +0200
+++ /usr/local/pkg/telegraf.inc.new 2025-06-03 16:28:00.675486000 +0200
@@ -200,7 +200,7 @@
write_rcfile(array(
"file" => "telegraf.sh",
"start" => "/usr/sbin/daemon -crP {$pidfile} /usr/local/bin/telegraf -config={$conffile} 2> {$logfile}",
- "stop" => "/bin/kill `/bin/cat {$pidfile}`"
+ "stop" => "pid=`/bin/cat {$pidfile}`; /bin/kill \$pid; pwait \$pid"
)
);
Updated by Bryan Allen 4 months ago
Verified this is happening on 25.07-DEVELOPMENT (amd64)
built on Fri Jun 6 1:00:00 CDT 2025
FreeBSD 15.0-CURRENT
changing features on Telegraf service takes the service down but does not re enable it.
Updated by Jim Pingle 3 months ago
- Affected Plus Version changed from 25.03 to 25.07
Updated by Marcos M about 2 months ago
- Status changed from Confirmed to Feedback
- Assignee set to Marcos M
- Target version set to 2.9.0
- % Done changed from 0 to 100
- Plus Target Version set to 25.11
- Affected Architecture All added
- Affected Architecture deleted (
SG-2100)
Should be fixed with 448f354244343c1ebe15a10e14da85772f38dd26.
Actions