You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pankajkoti (via GitHub)" <gi...@apache.org> on 2023/05/17 10:43:32 UTC
[GitHub] [airflow] pankajkoti commented on issue #31330: Connection problem with apache-airflow-providers-apache-kafka
pankajkoti commented on issue #31330:
URL: https://github.com/apache/airflow/issues/31330#issuecomment-1551161144
I was able to check this a bit and I believe the below is the cause:
The test_connection endpoints calls [test_connection](https://github.com/apache/airflow/blob/7ebda3898db2eee72d043a9565a674dea72cd8fa/airflow/models/connection.py#L386) which tries to get that hook, In get_hook, the `hook_class` is returned as `airflow.providers.apache.kafka.hooks.base.KafkaBaseHook`, and on [line](https://github.com/apache/airflow/blob/7ebda3898db2eee72d043a9565a674dea72cd8fa/airflow/models/connection.py#L343) when we try to instantiate the hook, it fails on [line](https://github.com/apache/airflow/blob/7ebda3898db2eee72d043a9565a674dea72cd8fa/airflow/providers/apache/kafka/hooks/base.py#L43) as if we check the definition for the property [line](https://github.com/apache/airflow/blob/7ebda3898db2eee72d043a9565a674dea72cd8fa/airflow/providers/apache/kafka/hooks/base.py#L57) raises an Exception.
When I commented out [line](https://github.com/apache/airflow/blob/7ebda3898db2eee72d043a9565a674dea72cd8fa/airflow/providers/apache/kafka/hooks/base.py#L43) and additionally removed the `timeout` parameter from [here](https://github.com/apache/airflow/blob/7ebda3898db2eee72d043a9565a674dea72cd8fa/airflow/providers/apache/kafka/hooks/base.py#L73) as AdminClient does not seem to have that argument, the test connection worked.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org