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

telegraf fails to start if its wavefront output fails to connect #3545

Closed
dimas opened this issue Dec 6, 2017 · 1 comment · Fixed by #3549
Closed

telegraf fails to start if its wavefront output fails to connect #3545

dimas opened this issue Dec 6, 2017 · 1 comment · Fixed by #3549
Milestone

Comments

@dimas
Copy link

dimas commented Dec 6, 2017

Bug report

Relevant telegraf.conf:

[[outputs.wavefront]]
  host = "localhost"
  port = 2003
  prefix = "test."

System info:

$ uname -a
Linux ip-10-0-154-148 3.13.0-132-generic #181-Ubuntu SMP Wed Sep 13 13:25:03 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

$ telegraf --version
Telegraf v1.5.0~rc1 (git: release-1.5 ca8911fe)

Steps to reproduce:

  1. Just start telegraf with nothing listening on port 2003

Expected behavior:

telegraf should be retrying connecting to 2003 till the end. (Because what if it is not the localhost? what if it is some other server and it is an unfortunate moment when server process is down / being restarted)

Actual behavior:

telegraf logs

2017-12-06T01:14:40Z E! Failed to connect to output wavefront, retrying in 15s, error was 'Wavefront: TCP connect fail dial tcp 127.0.0.1:2003: getsockopt: connection refused' 
2017-12-06T01:14:55Z E! Wavefront: TCP connect fail dial tcp 127.0.0.1:2003: getsockopt: connection refused

and the service process exits.

@puckpuck
Copy link
Contributor

puckpuck commented Dec 6, 2017

I will alter Wavefront output to log error and return nil in case of error in connect function. I don't see this hurting anything, as it does reconnect on each write.

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

Successfully merging a pull request may close this issue.

3 participants