-
Notifications
You must be signed in to change notification settings - Fork 48
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
Broker is unavailable under devcontainer #267
Comments
Hi 👋 Perhaps, you need to use get_host instead of hardcoded localhost. Which is appropriate when container isn't running locally, but remote Could you try? And if it doesn't help, could you enrich the context with your setup, please |
Hi @DDtKey Yes, I was trying to do it as well, but it doesn't work for me. Here is what I am trying to do:
This is the error that I am getting:
and this is what I can see from the logs:
|
Did you customize Also you always can use |
I am using |
It basically means only one thing - Here is the fail happen on connection step. So it's most likely related to proper connection url (IP) 🤔 |
Interesting thing that if I do command in container directly by using
it works just fine. |
@DDtKey you said that |
I meant that it's unclear which container runtime is used, how it's configured and if devcontainer has any customization over docker socker/host. |
In
I think the problem is definitely with network settings. Just need to figure out how to solve it... |
Generally, I guess the issue is that container is available on your host machine. Did you try to use |
Do you mean in env variables? or you mean you it as host for When I am using
I also tried different cases with |
Just as an option, you can try to specify some bridge network for your devcontainer and then pass the same network to testcontainer. After which you can use get_bridge_ip_address 🤔 |
Describe the bug
Hello, I am trying to have a test with Apache Kafka under devcontainers.
I am using
use testcontainers_modules::kafka::apache::Kafka;
I am running the same test provided here, but for some reason I get following error:
called
Result::unwrap()
on anErr
value: (KafkaError (Message production error: MessageTimeOut (Local: Message timed out)), OwnedMessage { payload: Some([77, 101, 115, ...]), key: Some([75, 101, 121, 32, 48]), topic: "test-topic", timestamp: NotAvailable, partition: -1, offset: -1001, headers: None })I wonder if it is related to devcontainer and instead of
127.0.0.1
I have to use another ip address?To Reproduce
No response
Expected behavior
No response
The text was updated successfully, but these errors were encountered: