You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get telegraf into working state, exercise init.d scripts
root@testhost ~]# service telegraf restart
telegraf process was stopped [ OK ]
Starting the process telegraf [ OK ]
telegraf process was started [ OK ]
[root@testhost ~]# service telegraf start
telegraf process is running [ FAILED ]
[root@testhost ~]# ps -ef | grep teleg
telegraf 7765 1 0 10:42 ? 00:00:00 /usr/bin/telegraf -pidfile /var/run/telegraf/telegraf.pid -config /etc/telegraf
root 7821 29851 0 10:42 pts/1 00:00:00 grep teleg
Alter the pidfile to put it in a bad state (actual observed scenario was likely due to /var mount running out of space, getting the pid file unwritable, but in any case, the pidfile was out of sync)
[root@testhost ~]# vi /var/run/telegraf/telegraf.pid
Restart - note that the original process never got stopped, but a new process is started
[root@testhost ~]# service telegraf restart
Starting the process telegraf [ OK ]
telegraf process was started [ OK ]
System info:
rhel6.10
init.d
telegraf-1.8.1-1.x86_64
Steps to reproduce:
Get telegraf into working state, exercise init.d scripts
Alter the pidfile to put it in a bad state (actual observed scenario was likely due to /var mount running out of space, getting the pid file unwritable, but in any case, the pidfile was out of sync)
Restart - note that the original process never got stopped, but a new process is started
At this time two pids are alive
Note that 'start' actions are properly guarded
Expected behavior:
restart should guard against creating a new duplicate process OR kill the existing process
Actual behavior:
two identical processes are started, metrics begin to be duplicated, and/or as these processes pile up resources begin to become unavailable
Additional info:
This happened mostly because another agent was restarting telegraf a lot, and this issue was teased out downstream from it
The text was updated successfully, but these errors were encountered: