Skip to content
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

Failed to resolve "Connection refused" Issue #2

Open
Harshitha1698 opened this issue Feb 14, 2024 · 6 comments
Open

Failed to resolve "Connection refused" Issue #2

Harshitha1698 opened this issue Feb 14, 2024 · 6 comments

Comments

@Harshitha1698
Copy link

Encountering issues when running the Python script. Despite modifying bootstrap server names based on previously resolved issues, the problem persists.

2024-02-14 09:56:30 %3|1707900990.177|FAIL|rdkafka#producer-1| [thrd:hiwi-test-kafka-1:29092/bootstrap]: hiwi-test-kafka-1:29092/bootstrap: Connect to ipv4#172.18.0.2:29092 failed: Connection refused (after 5ms in state CONNECT)
2024-02-14 09:56:31 %3|1707900991.172|FAIL|rdkafka#producer-1| [thrd:hiwi-test-kafka-1:29092/bootstrap]: hiwi-test-kafka-1:29092/bootstrap: Connect to ipv4#172.18.0.2:29092 failed: Connection refused (after 0ms in state CONNECT, 1 identical error(s) suppressed)

Further assistance would be beneficial if I'm overlooking any crucial details or if there are specific aspects of the issue that require attention.

@densalzmann
Copy link
Owner

densalzmann commented Feb 14, 2024

Which python script do you mean? Have you run the python script in a container? It looks like your script can not connect to your broker because its not in the same network. Maybe it would help to use the external port, which kafka is exposing :9092.

@Harshitha1698
Copy link
Author

I have created Python script, utilising Confluent Kafka to consume location messages from the 'location_topic'. Let me try using external port.

@densalzmann
Copy link
Owner

The best way would be if you integrate the script into an additional container and put this container into the same docker network (defined inside the docker-compose.yml file).

Please feel free to give feedback, if it worked out, and close the issue.

@Harshitha1698
Copy link
Author

I have created separate docker file for Consumer and defined it in docker-compose.yml already.

@densalzmann
Copy link
Owner

Ok. Does it work out? Or you are getting the same issue? Then I would need more data, so I can help: your docker-compose file, bootstrap server definition in your script.

@Harshitha1698
Copy link
Author

My initial implementaion was having seperate docker file for consumer yet was facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants