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

MQTT Consumer fails with invalid connection_timeout value #3284

Closed
tstaals opened this issue Sep 29, 2017 · 4 comments · Fixed by #3286
Closed

MQTT Consumer fails with invalid connection_timeout value #3284

tstaals opened this issue Sep 29, 2017 · 4 comments · Fixed by #3286
Labels
bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Milestone

Comments

@tstaals
Copy link

tstaals commented Sep 29, 2017

telegraf stops working after the last update, in the log files i receive the follow message.

2017-09-29T21:17:00Z E! Service for input inputs.mqtt_consumer failed to start, exiting
MQTT Consumer, invalid connection_timeout value: {0}
2017-09-29T21:19:32Z E! Service for input inputs.mqtt_consumer failed to start, exiting
MQTT Consumer, invalid connection_timeout value: {30000000000}
2017-09-29T21:24:05Z E! Service for input inputs.mqtt_consumer failed to start, exiting
MQTT Consumer, invalid connection_timeout value: {30000000000}

The first time I did not configured the connection timeout the second time I did but I guess its not parsed right

my config is
[[inputs.mqtt_consumer]]
servers = ["localhost:1883"]
# ## MQTT QoS, must be 0, 1, or 2
qos = 0
connection_timeout = 30

@tstaals
Copy link
Author

tstaals commented Sep 29, 2017

When I change the connection_timeout = 30 to connection_timeout =1 telefgraf will start up

@danielnelson
Copy link
Contributor

I think this should actually be a string duration, can you test with connection_timeout = "30s"?

@danielnelson danielnelson added regression something that used to work, but is now broken bug unexpected problem or unintended behavior labels Sep 29, 2017
@danielnelson danielnelson added this to the 1.4.2 milestone Sep 29, 2017
@tstaals
Copy link
Author

tstaals commented Sep 29, 2017

tested it with 30s and that does seam to do the trick, so only the documentation at https://github.com/influxdata/telegraf/blob/master/plugins/inputs/mqtt_consumer/README.md should be updated to reflect that

@danielnelson
Copy link
Contributor

I will correct the documentation and also set a default timeout if it is not specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior regression something that used to work, but is now broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants