[KAFKA-371] MongoDB Kafka Connect Connectors - config values provided by ConfigProvider does not replace placeholders in configuration Created: 15/May/23 Updated: 16/Nov/23 Resolved: 27/Jul/23 |
|
| Status: | Closed |
| Project: | Kafka Connector |
| Component/s: | Configuration, Sink, Source |
| Affects Version/s: | 1.10.0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | Lincoln D'Mello | Assignee: | Ross Lawley |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | Configuration | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Environment: Kafka Connect cluster v7.30 running on AWS EKS with configured IRSA service account for the EKS nodes with the correct IAM permissions to retrieve secrets from AWS Secrets Manager ConfigProvider being used: SecretsManagerConfigProvider - https://github.com/jcustenborder/kafka-config-provider-aws Mongo Source Connector being used: https://www.confluent.io/hub/mongodb/kafka-connect-mongodb Problem: However, this time around when I validate the connector configuration with Kafka Connect via the REST validation endpoint, I can see that, in the JSON validation error that is returned from Kakfa Connect, for the 'connection.uri' config property, the 'value.value' JSON property has the correct uri value that the config provider has retrieved from AWS but somehow the retrieved value has still not replaced the placeholder
in the actual configuration that Kafka Connect is trying to use to configure the connector instance. |
| Comments |
| Comment by Ed Berezitsky [ 16/Nov/23 ] | ||||||||||||||
|
if you define config provider in the env vars, why would you redefine it again in a connector config? Can you keep env vars (as mentioned in the last comment), but remove it from connector config? Fixed sample:
| ||||||||||||||
| Comment by Danuta Stawiarz [ 08/Nov/23 ] | ||||||||||||||
|
Hi bdesert@gmail.com , thanks a lot for answering. Sorry for not being precise in my previous description! Our kafka connect is hosted on ECS instance and we pass there environmental variables:
we didn't find worker.properties file to add what you mentioned.
| ||||||||||||||
| Comment by Ed Berezitsky [ 08/Nov/23 ] | ||||||||||||||
|
hi danuta.stawiarz@gmail.com , To solve this issue, you need to define a config providers in the worker properties, not in connector. Move the following lines into the worker.properties file:
| ||||||||||||||
| Comment by Danuta Stawiarz [ 08/Nov/23 ] | ||||||||||||||
|
Hello, We are experiencing similar problem. We use similar stack provided by the ticket author: As suggested, worker has been updated with the config:
The problem appears to exist only in connection.uri field. When assigning secret value to any other field, like collection, secret values are properly retrieved. In case of connection.uri everything is treated as String. We have tried with the following variants:
In logs and errors we could see that connection.uri value is never resolved and always treated as string. Example connector config:
All the best, Danuta | ||||||||||||||
| Comment by PM Bot [ 27/Jul/23 ] | ||||||||||||||
|
There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to reopen this ticket if you're still experiencing the issue, and add a comment if you're able to provide more information. | ||||||||||||||
| Comment by Bryan Kolterman [ 18/Jul/23 ] | ||||||||||||||
|
Hi ross@mongodb.com, -Bryan | ||||||||||||||
| Comment by PM Bot [ 10/Jul/23 ] | ||||||||||||||
|
There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to reopen this ticket if you're still experiencing the issue, and add a comment if you're able to provide more information. | ||||||||||||||
| Comment by Ross Lawley [ 26/Jun/23 ] | ||||||||||||||
|
Thanks for the update - just wanted to double check if you have logged this issue on our MongoDB support portal, located at support.mongodb.com?
To determine the cause of the error on Kafka connect could you provide more detail on the bug? Either a full stacktrace or a test case to reproduce the error. Ideally, a minimal reproducible example would help as I could replicate the bug and use it as a test case for the fix. All the best, Ross Lawley | ||||||||||||||
| Comment by Lincoln D'Mello [ 24/Jun/23 ] | ||||||||||||||
|
bryan.kolterman@mongodb.com, bdesert@gmail.com, ross@mongodb.com I have re-tested the connector with the config provider above along with the suggested changes to place the config provider configuration in the worker's properties file. Now, with those changes in place, the connector's configuration passes validation with no reported errors. | ||||||||||||||
| Comment by PM Bot [ 21/Jun/23 ] | ||||||||||||||
|
There hasn't been any recent activity on this ticket, so we're resolving it. Thanks for reaching out! Please feel free to reopen this ticket if you're still experiencing the issue, and add a comment if you're able to provide more information. | ||||||||||||||
| Comment by Ed Berezitsky [ 14/Jun/23 ] | ||||||||||||||
|
bryan.kolterman@mongodb.com sent you an email, taking offline until we get get clear picture of the root cause. | ||||||||||||||
| Comment by PM Bot [ 13/Jun/23 ] | ||||||||||||||
|
Hi lincoln42@hotmail.com! If this is still an issue for you, please open Jira to review the latest status and provide your feedback. Thanks! | ||||||||||||||
| Comment by Ross Lawley [ 06/Jun/23 ] | ||||||||||||||
|
I'll leave this ticket open until you can confirm I've identified the issue or not. Please let me know how you get on. All the best, Ross | ||||||||||||||
| Comment by Ross Lawley [ 06/Jun/23 ] | ||||||||||||||
|
Please ensure that the Kafka workers are configured correctly to use a ConfigProvider as its the worker configuration and not the connector configuration that has to declare the provider: See: kafka-config-provider-aws documentation
Hope that helps, Ross | ||||||||||||||
| Comment by Bryan Kolterman [ 02/Jun/23 ] | ||||||||||||||
|
Hi bdesert@gmail.com, I believe it's best to set up a zoom call. Are you available this afternoon to continue the conversation on zoom? Hello Bryan, We are running Confluent Platform’s Kafka Connect cluster on AWS EKS. | ||||||||||||||
| Comment by Ed Berezitsky [ 01/Jun/23 ] | ||||||||||||||
|
lincoln42@hotmail.com , can you please provide the following details:
| ||||||||||||||
| Comment by PM Bot [ 15/May/23 ] | ||||||||||||||
|
Hi lincoln42@hotmail.com, thank you for reporting this issue! The team will look into it and get back to you soon. |