-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Mosquitto 2.0.12 - Keep alive 0 results in 'identifier rejected #9763
Comments
Hi all, I face the same issue, and here is the related information https://community.influxdata.com/t/get-identifier-rejected-error-while-using-outputs-mqtt-mosquitto-version-is-2-0-12/21702/7. Thanks |
Hi all, |
This is a bug in Mosquitto (see eclipse/mosquitto#2117 ), but although keepalive=0 is entirely valid, I'd really suggest against using it unless you're very sure it's what you want. Having it as a default is probably not the right choice. |
My intention is to open a PR adding keep_alive as a config option in the plugin so people can set it to a sensible default. Previously the plugin had keep_alive set to 0 so to keep behavior consistent for users I would probably leave 0 as the default which they can then change as needed. However this is causing errors if they are using mosquitto v2.0.12, @ralight is this something that will be fixed in the next eclipse/mosquitto release? |
@helenosheaa Yes of course - it's already fixed in the repo and will be part of the next release, which should be by the end of the month. |
@ralight great thanks! |
@helenosheaa @ralight and everybody else here working for us "users" |
No problem! I'll ping you when it's released. If you change your mind you'll just download the relevant build artifact from the list here. Then run that downloaded telegraf with your config. Within your config set (or your desired keep_alive). Should work for any mosquitto version.
|
@helenosheaa is this fixed in telegraf 1.20.3 / mosquitto 2.0.13? I'm just using default values for EDIT: I see now that this relates to publishing to mosquitto, which telegraf can be configured to do. In my case, I'm not publishing to mosquitto from telegraf, but I am publishing via a third-party C++ client, so it's perhaps a similar issue? |
You'll need to set keep_alive to something other than 0 which is the default as that was previous working behavior e.g. IIRR switching keep_alive off was an issue with mosquitto 2.0.12 it may still be an issue in mosquitto 2.0.13. Let me know if that works. |
@helenosheaa thanks for your response and sorry for the noise - my issue wasn't directly a telegraf issue, but it's very related to this one I think. I set the client keep_alive to non-zero in my client (mqtt_cpp) and this did in fact resolve the issue. I can confirm that it is still an issue for mosquitto 2.0.13. I'm not sure how "switching keep_alive off" relates to setting it to non-zero - do you mean switching it off in mosquitto broker, as opposed to setting it non-zero in the client? These are two different things, is that right? |
@DavidAntliff since it was introduced the If you want your client to use |
@ralight thank you - I did get there eventually, it wasn't until I saw the updated comment in the 2.0.13 default mosquitto.conf that I figured out what you've just said. So, yes, I can confirm that 2.0.13 is now working for me, either with non-zero keepalive for clients, or by setting |
System info:
Telegraf V1.19
Mosquitto V2.0.12
Steps to reproduce:
config:
# Configuration for MQTT server to send metrics to
[[outputs.mqtt]]
servers = ["127.0.0.1:1883"] # required.
client_id = "db-meter"
batch = true
topic_prefix = "Main_DB"
qos = 2
data_format = "influx"
Expected behavior:
Connect without error
Actual behavior:
Error connecting to output "output.mqtt": identifier rejected"
Additional info:
eclipse/mosquitto#2309
The text was updated successfully, but these errors were encountered: