-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Outputs.influxdb authorization failed messages after upgrade to v1.27 #13455
Comments
by any chance your password contains |
Yes, our password does include the |
Unfortunately there was an oversight in a recent change. You need to escape |
Closing as a dup of #13432 |
I've confirmed this is indeed our issue. Escaping |
@billglick thank you! would you be willing to try out the artifacts in #13451 also resolves the issue without the need to change your password? |
@powersj I'm not sure if I'm testing this correctly, but it continues to be broken with a single |
@billglick - Are you certain you are seeing the right version in the log output? I started up influxdb 1.8, because this is on the shell I did escape the docker run --tty --interactive --rm \
--net host \
--env INFLUXDB_HTTP_AUTH_ENABLED="true" \
--env INFLUXDB_HTTP_FLUX_ENABLED="true" \
--env INFLUXDB_DB="testing" \
--env INFLUXDB_ADMIN_USER="admin" \
--env INFLUXDB_ADMIN_PASSWORD="1.8my\$3cret" \
--name influxdb-1.8 \
influxdb:1.8 With the following config: [[inputs.exec]]
commands = [
"echo metric,tag=host,location=0000 value=42 1686178228619000000",
]
data_format = "influx_upstream"
[[outputs.influxdb]]
database = "my-database"
username = "admin"
password = "1.8my$s3cret"
urls = ["http://localhost:8086"] ❯ ./telegraf --config config.toml --once
2023-06-15T19:29:27Z I! Loading config: config.toml
2023-06-15T19:29:27Z I! Starting Telegraf 1.28.0-276472e8
2023-06-15T19:29:27Z I! Available plugins: 237 inputs, 9 aggregators, 28 processors, 23 parsers, 59 outputs, 4 secret-stores
2023-06-15T19:29:27Z I! Loaded inputs: exec
2023-06-15T19:29:27Z I! Loaded aggregators:
2023-06-15T19:29:27Z I! Loaded processors:
2023-06-15T19:29:27Z I! Loaded secretstores:
2023-06-15T19:29:27Z I! Loaded outputs: influxdb
2023-06-15T19:29:27Z I! Tags enabled: host=ryzen
2023-06-15T19:29:27Z D! [agent] Initializing plugins
2023-06-15T19:29:27Z D! [agent] Connecting outputs
2023-06-15T19:29:27Z D! [agent] Attempting connection to [outputs.influxdb]
2023-06-15T19:29:27Z D! [agent] Successfully connected to outputs.influxdb
2023-06-15T19:29:27Z D! [agent] Starting service inputs
2023-06-15T19:29:27Z D! [agent] Stopping service inputs
2023-06-15T19:29:27Z D! [agent] Input channel closed
2023-06-15T19:29:27Z I! [agent] Hang on, flushing any cached metrics before shutdown
2023-06-15T19:29:27Z D! [outputs.influxdb] Wrote batch of 2 metrics in 5.369543ms
2023-06-15T19:29:27Z D! [outputs.influxdb] Buffer fullness: 0 / 10000 metrics
2023-06-15T19:29:27Z I! [agent] Stopping running outputs
2023-06-15T19:29:27Z D! [agent] Stopped Successfully |
Yes, I am sure I'm looking at the correct log output. I just tested this again...
|
Did you remove the double |
Yes. It is now using the original single |
Can you adapt the above example I provided to help me reproduce this? Is it something with the password escaping still? if so can you give a fake example that reproduces it using the steps above? Thanks |
I can not quickly/easily adapt @powersj's example above. But I can confirm that not escaping the
Escaping the
|
I am ready to release v1.27.1, but I also want to ensure we did not miss a scenario given your auth failures. However, to do so we are going to need a way to reproduce your issue or understand how your config is different given the example above worked as expected. |
@powersj There are 3 other thing that seems significantly different than your telegraf conf example, but I have no idea if any of them are related:
|
@powersj I tried your example in the newer build, but I am also getting auth failed error. |
Please try escaping the |
@srebhan - Here are my results with escaping the
Line 4 is the
|
@billglick |
@billglick thank you for testing! This is really appreciated to prevent further inconvenience... :-( |
Relevant telegraf.conf
Logs from Telegraf
System info
Telegraf v1.27.0 on RHEL 8.6 EUS
Docker
No response
Steps to reproduce
Expected behavior
Upgrading to Telegraf v1.27.0 won't break the ability to ship metrics to InfluxDB
Actual behavior
When performing the above steps we get 401: Authorization Failed messages and metrics are not sent to the database. Reverting back to v1.26.3 allows things to work again.
Additional info
No response
The text was updated successfully, but these errors were encountered: