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

"Pokeshop - Import" makes error when running on Linux #3393

Closed
mrasu opened this issue Nov 23, 2023 · 4 comments
Closed

"Pokeshop - Import" makes error when running on Linux #3393

mrasu opened this issue Nov 23, 2023 · 4 comments
Labels
bug Something isn't working user-request

Comments

@mrasu
Copy link

mrasu commented Nov 23, 2023

Describe the bug
When following the getting-started at https://docs.tracetest.io/getting-started/open, I encountered an error failing to connect to host.docker.internal
I'm using Ubuntu 22.04 but this may happen in all Linux distributions.

To Reproduce

  1. Run docker-compose at tracetest/examples/tracetest-agent/pokeshop.
  2. Create a new test from "Pokeshop - Import" in app.tracetest.io
  3. "Run Test"
  4. The test won't finish and docker compose outputs following error
pokeshop-otel-collector-1  | 2023-11-23T08:47:09.312Z	warn	zapgrpc/zapgrpc.go:191	[core] [Channel #1 SubChannel #2] grpc: addrConn.createTransport failed to connect to {
pokeshop-otel-collector-1  |   "Addr": "host.docker.internal:4317",
pokeshop-otel-collector-1  |   "ServerName": "host.docker.internal:4317",
pokeshop-otel-collector-1  |   "Attributes": null,
pokeshop-otel-collector-1  |   "BalancerAttributes": null,
pokeshop-otel-collector-1  |   "Type": 0,
pokeshop-otel-collector-1  |   "Metadata": null
pokeshop-otel-collector-1  | }. Err: connection error: desc = "transport: Error while dialing dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host"	{"grpc_log": true}
pokeshop-otel-collector-1  | 2023-11-23T08:47:09.312Z	info	exporterhelper/queued_retry.go:215	Exporting failed. Will retry the request after interval.	{"kind": "exporter", "data_type": "traces", "name": "otlp/tracetestagent", "error": "rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp: lookup host.docker.internal on 127.0.0.11:53: no such host\"", "interval": "5.52330144s"}

Expected behavior
Finish running test

Additional context
After adding extra_hosts in all services in docker-compose.yaml, the test finished

    extra_hosts:
      - "host.docker.internal:host-gateway"
@mrasu mrasu added bug Something isn't working triage requires triage labels Nov 23, 2023
@danielbdias
Copy link
Contributor

@mrasu, thanks for your report! We will take a look at this issue!

@mathnogueira mathnogueira removed the triage requires triage label Nov 23, 2023
mathnogueira added a commit that referenced this issue Nov 23, 2023
Docker on Linux doesn't understand `host.docker.internal` automatically.
We need to add it as an extra host using `extra_hosts`. This was caught
by @mrasu in his issue #3393.
@mathnogueira
Copy link
Contributor

Great catch @mrasu! I tested it on Linux and I was able to reproduce the issue. Thanks for opening the issue and providing a solution!

mathnogueira added a commit that referenced this issue Nov 23, 2023
Docker on Linux doesn't understand `host.docker.internal` automatically.
We need to add it as an extra host using `extra_hosts`. This was caught
by @mrasu in his issue #3393.
@mathnogueira
Copy link
Contributor

The fix is now merged! I'll create a new card to review all examples with the agent as well. I'm closing this for now, but feel free to open new issues if you find anything.

Thanks again @mrasu!

@mrasu
Copy link
Author

mrasu commented Nov 23, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working user-request
Projects
None yet
Development

No branches or pull requests

3 participants