Description
This article provides basic recommendations and actions to take on how to resolve "Connector startup failed due to invalid Kafka API Key. Please validate that your API key is valid and has the necessary permissions" error when deploying Fully Managed Connectors in Confluent Cloud.
Applies To
Fully Managed Connectors in Confluent Cloud
Cause
The startup or provisioning of the connectors can fail when the above error is encountered if the Kafka API Key used is invalid/wrong/unrecognisable, or it is missing required permissions and ACLs.
Note: API keys are automatically deleted when the associated user or service account is deleted therefore, it becomes fairly important to validate the Service Account with the related Kafka keys, as it can possibly become a potential cause of the issue.
Resolution
Validate and verify the Kafka keys and ensure that the API key being used is valid and has not expired:
- Please refer the document for more detailed understandings and to view the list of all api keys.
- Also, you can get a list of all API keys for an associated service account and can also view the details of an API key using the commands mentioned in the above document.
Ensure that the API key has the necessary permissions to access the Kafka cluster:
- Verify the details of the API keys listed to ensure they have the required permissions for the Sink Connector
- Verify the details of the API keys listed to ensure they have the required permissions for the Source Connector
Validate and verify the Service Accounts and their details as well:
- To get all the service account IDs, run the confluent iam service-account list command.
- Refer to this documentation for the commands and related examples.