Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemctl restart spawns multiple daemons #1285

Closed
mwpastore opened this issue May 26, 2016 · 1 comment
Closed

systemctl restart spawns multiple daemons #1285

mwpastore opened this issue May 26, 2016 · 1 comment

Comments

@mwpastore
Copy link

mwpastore commented May 26, 2016

Bug report

Something wonky is going on with the telegraf package for Xenial. Restarting the daemon spawns extra processes instead of just restarting the original process.

System info:

$ telegraf --version
Telegraf - version 0.13.1
$ uname -srv
Linux 4.5.3-x86_64-linode67 #3 SMP Tue May 10 10:22:44 EDT 2016
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04 LTS"

Steps to reproduce:

  1. Install telegraf
  2. Start telegraf (if it doesn't start automatically)
  3. Restart telegraf

Expected behavior:

telegraf is restarted

Actual behavior:

telegraf is restarted, but additional telegraf processes are spawned

Additional info:

$ sudo systemctl stop telegraf
$ ps axfww | grep telegra[f]
$ sudo systemctl start telegraf
$ ps axfww | grep telegra[f]
30446 ?        Ss     0:00 /bin/sh -c /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegra.d  >>/var/log/telegraf/telegraf.log 2>>/var/log/telegraf/telegraf.log
30449 ?        Sl     0:00  \_ /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
$ sudo systemctl restart telegraf
$ ps axfww | grep telegra[f]
30449 ?        Sl     0:00 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
30492 ?        Ss     0:00 /bin/sh -c /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegra.d  >>/var/log/telegraf/telegraf.log 2>>/var/log/telegraf/telegraf.log
30493 ?        Sl     0:00  \_ /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
$ sudo systemctl restart telegraf
$ ps axfww | grep telegra[f]
30449 ?        Sl     0:00 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
30493 ?        Sl     0:00 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
30629 ?        Ss     0:00 /bin/sh -c /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegra.d  >>/var/log/telegraf/telegraf.log 2>>/var/log/telegraf/telegraf.log
30630 ?        Sl     0:00  \_ /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
$ sudo systemctl restart telegraf
$ ps axfww | grep telegra[f]
30449 ?        Sl     0:00 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
30493 ?        Sl     0:00 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
30630 ?        Sl     0:00 /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
30663 ?        Ss     0:00 /bin/sh -c /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegra.d  >>/var/log/telegraf/telegraf.log 2>>/var/log/telegraf/telegraf.log
30664 ?        Sl     0:00  \_ /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

It's affecting multiple Xenial systems. I've tried removing (and purging) the telegraf package and reinstalling with no change in behavior. Stopping telegraf kills the "primary" daemon (e.g. pids 30663 and 30664 in the last example above) but not the "secondary" daemons (e.g. pids 30449, 30493, and 30630 in the same example).

Thanks in advance.

@mwpastore
Copy link
Author

Looks like this was already addressed in #1252 and #1279. Not sure how I missed them in my searches. Sorry for the noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant