jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.52k stars 2.44k forks source link

jaeger agent can't connect to collector #521

Closed jackychee closed 7 years ago

jackychee commented 7 years ago

jaeger-agent deployment command: docker run -d --name agent --rm -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778/tcp jaegertracing/jaeger-agent /go/bin/agent-linux --collector.host-port=localhost:14267

jaeger-collector deployment command: docker run -d --rm -p16686:16686/tcp jaegertracing/jaeger-query /go/bin/query-linux --es.server-urls=http://es-server:9200 --span-storage.type=elasticsearch --query.static-files=/go/jaeger-ui/

logs of jaeger-agent container ako p xs lc 1t_u 2 q0

The firewalld is inactive and SELINUX is disabled.

black-adder commented 7 years ago

What was the issue? I'd like to get this documented for future users who run into this.

jackychee commented 7 years ago

@black-adder OK, i run jaeger-agent and jaeger-collector in the same machine, and tell jaeger-agent the host and port of jaeger-collector is localhost:14267. Because jaeger-agent run in docker container, there no process listen on 14267 in the same container, so jaeger-agent cant' connect to jaeger-collector. It works when i tell jaeger-agent the machine host (not the localhost). It's my fault :(

roopagowda commented 6 years ago

Hi, I need to run jaeger-agent, jaeger-collector and jaeger-ui in individual machines. I tried to do this using the following commands, which is not success. Please let me know where I am doing wrong and how to achieve this. So, that I should send logs to collector in another machine and those should be read by jaeger-query in different machine.

Below are the commands

Jaeger Query / ui (UI Machine) sudo docker run --rm -p16686:16686/tcp jaegertracing/jaeger-query /go/bin/query-linux --es.server-urls=http://IP-of-collector:9200 --span-storage.type=elasticsearch --query.static-files=/go/jaeger-ui/

Jeager Collector (Collector Machine) sudo docker run --rm jaegertracing/jaeger-collector /go/bin/collector-linux --es.server-urls=http://IP-of-collector:9200 --span-storage.type=elasticsearch --log-level=error

Jaeger Agent (Agent Machine) sudo docker run --name agent --rm -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778/tcp jaegertracing/jaeger-agent /go/bin/agent-linux --collector.host-port=IP-of- collector:14267

Please let me know where I am wrong and how to fix this.

jpkrohling commented 6 years ago

sudo docker run --rm jaegertracing/jaeger-collector /go/bin/collector-linux --es.server-urls=http://IP-of-collector:9200 --span-storage.type=elasticsearch --log-level=error

Your collector is not exposing any ports. You'll need -p14267:14267 -p14268:14268 -p9411:9411 as well.

roopagowda commented 6 years ago

@jpkrohling thanks for the reply

I tried exposing the ports in the host. I got the below output

From Collector docker run --rm --env SPAN_STORAGE_TYPE=elasticsearch -p14267:14267/tcp -p14268:14268 -p9411:9411 jaegertracing/jaeger-collector /go/bin/collector-linux --es.server-urls=http://es-ip:9200 --log-level=debug

{"level":"info","ts":1529300740.434398,"caller":"healthcheck/handler.go:99","msg":"Health Check server started","http-port":14269,"status":"unavailable"} {"level":"info","ts":1529300740.6546476,"caller":"static/strategy_store.go:77","msg":"No sampling strategies provided, using defaults"} {"level":"info","ts":1529300740.6550906,"caller":"collector/main.go:141","msg":"Registering metrics handler with HTTP server","route":"/metrics"} {"level":"info","ts":1529300740.655314,"caller":"collector/main.go:149","msg":"Starting Jaeger Collector HTTP server","http-port":14268} {"level":"info","ts":1529300740.6554735,"caller":"healthcheck/handler.go:133","msg":"Health Check state change","status":"ready"}

Form Agent {"level":"info","ts":1529300741.6044064,"caller":"peerlistmgr/peer_list_mgr.go:166","msg":"Trying to connect to peer","host:port":"54.174.65.124:14267"} {"level":"info","ts":1529300741.6142902,"caller":"peerlistmgr/peer_list_mgr.go:176","msg":"Connected to peer","host:port":"[::]:14267"}

It is showing that both Collector and Agent are connected to each other.

But once i run run the application, I can't see any logs in Jaeger UI , It is not creating the service also. How to fix this?

How to find collector are collecting the logs.

jpkrohling commented 6 years ago

The first step is to make sure your instrumented application is reporting logs. Depending on which client you are using and how you are instantiating it, it could be a matter of just setting the env var JAEGER_REPORTER_LOG_SPANS to true:

https://github.com/jaegertracing/jaeger-client-java/tree/master/jaeger-core#configuration-via-environment

https://github.com/jaegertracing/jaeger-client-go#environment-variables

Once that is set, you should see log entries like this:

15:12:02,058 INFO  [io.jaegertracing.reporters.LoggingReporter] (default task-1) Span reported: 32fe0f229781cb06:1597b01b0bb2ea0a:b5db3e82b498a397:1 - myBusinessSpan

If you don't see such logs, make sure you are sampling every request (sampler-type=const, sampler-param=1)

roopagowda commented 6 years ago

Hi @jpkrohling ,

My application was reporting spans correctly when I was running all-in-one Jaeger machine. I was possible to see all the traces in Jaeger UI

But, When I am trying to Run all jaeger components individually I am facing this problem.

Logs from Application

on Jun 18 10:20:37 UTC 2018 [io.vertx.core.http.impl.HttpServerImpl:FINEST] Server received request: / Mon Jun 18 10:20:37 UTC 2018 [io.vertx.ext.web.impl.RouterImpl:FINEST] Router: 1917513682 accepting request GET http://IP-addr:8080/ Mon Jun 18 10:20:37 UTC 2018 [io.vertx.ext.web.impl.RoutingContextImplBase:FINEST] Route matches: Route[ path:null pattern:null handlers:[io.vertx.rxjava.ext.web.Route$1@ab468c9] failureHandlers:[io.vertx.rxjava.ext.web.Route$4@6632a9dd] order:-1 methods:[]]@1996313606 Mon Jun 18 10:20:37 UTC 2018 [io.vertx.ext.web.impl.RoutingContextImplBase:FINEST] Calling the handler Mon Jun 18 10:20:37 UTC 2018 [io.vertx.ext.web.impl.RoutingContextImplBase:FINEST] Route matches: Route[ path:null pattern:null handlers:[io.vertx.rxjava.ext.web.Route$1@8c3ee33] failureHandlers:[] order:0 methods:[]]@225691647 Mon Jun 18 10:20:37 UTC 2018 [io.vertx.ext.web.impl.RoutingContextImplBase:FINEST] Calling the handler Mon Jun 18 10:20:37 UTC 2018 [io.vertx.ext.web.impl.RoutingContextImplBase:FINEST] Route matches: Route[ path:null pattern:null handlers:[io.vertx.rxjava.ext.web.Route$1@7cf65093] failureHandlers:[] order:5 methods:[]]@144464991 Mon Jun 18 10:20:37 UTC 2018 [io.vertx.ext.web.impl.RoutingContextImplBase:FINEST] Calling the handler Mon Jun 18 10:20:37 UTC 2018 [com.pq.verticles.BookingVerticle:INFO] Started API : GET / Mon Jun 18 10:20:46 UTC 2018 [sun.net.www.protocol.http.HttpURLConnection:FINEST] ProxySelector Request for http://localhost:5778/?service=PQ-Booking Mon Jun 18 10:21:46 UTC 2018 [sun.net.www.protocol.http.HttpURLConnection:FINEST] ProxySelector Request for http://localhost:5778/?service=PQ-Booking Mon Jun 18 10:22:46 UTC 2018 [sun.net.www.protocol.http.HttpURLConnection:FINEST] ProxySelector Request for http://localhost:5778/?service=PQ-Booking

I can see traces with all-in-one jaeger

jpkrohling commented 6 years ago

There's nothing about Jaeger/OpenTracing on the logs you've posted. It's hard to tell what's going on without seeing Jaeger's logs and not knowing your code...

pacman123 commented 6 years ago

Hi,

I am facing similiar issues while running components in same machine. sudo docker run -it --rm --env SPAN_STORAGE_TYPE=memory -p14267:14267/tcp -p14268:14268/tcp -p9411:9411/tcp jaegertracing/jaeger-collector /go/bin/collector-linux --log-level debug

{"level":"info","ts":1529393916.8745806,"caller":"collector/main.go:149","msg":"Starting Jaeger Collector HTTP server","http-port":14268} {"level":"info","ts":1529393916.8746583,"caller":"healthcheck/handler.go:133","msg":"Health Check state change","status":"ready"}

sudo docker run --rm -p5775:5775/udp -p6831:6831/udp -p6832:6832/udp -p5778:5778/tcp jaegertracing/jaeger-agent /go/bin/agent-linux --collector.host-port=127.0.0.1:14267

{"level":"error","ts":1529394232.9935606,"caller":"peerlistmgr/peer_list_mgr.go:171","msg":"Unable to connect","host:port":"127.0.0.1:14267","connCheckTimeout":0.25,"error":"dial tcp 127.0.0.1:14267: connect: connection refused","stacktrace":"github.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr.(PeerListManager).ensureConnections\n\t/home/travis/gopath/src/github.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr/peer_list_mgr.go:171\ngithub.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr.(PeerListManager).maintainConnections\n\t/home/travis/gopath/src/github.com/jaegertracing/jaeger/pkg/discovery/peerlistmgr/peer_list_mgr.go:101"}

ubuntu@ip-10-0-2-230:~$ netstat -an | grep 14267 tcp6 0 0 :::14267 :::* LISTEN

Could this be issue with tcp and tcp6?

jpkrohling commented 6 years ago

--collector.host-port=127.0.0.1:14267

On Docker, 127.0.0.1 is the container itself, not the host where it's running. Please, refer to Docker documentation about networking and/or linking containers.

https://docs.docker.com/network/ https://docs.docker.com/network/links/

pacman123 commented 6 years ago

aah. I missed this...thanks

roopagowda commented 6 years ago

@jpkrohling,

Thanks for your support and time. Since our Sampling count was 0.001 for one 1000 hit we were getting one trace in Jaeger UI Initially we have failed to recognize that.

Apart from that everything is working good and application is sending traces.

Thanks :-)

lxkaka commented 6 years ago

@roopagowda I have the same problem. I can see all trace in local Jaeger UI, but when I put them into different instance, I cant get any trace and my sampler type isconst sampler param is1. Do you have any idea about this problem?

jpkrohling commented 6 years ago

@lxkaka we need more information about your environment. Are you running the all-in-one, or each component on its own host? Are you running on bare metal, or Docker? Where's the agent, in relation to the traced application and in relation to the collector?

lxkaka commented 6 years ago

@jpkrohling This the thing. The jager agent has own machine, collector and ui in the another machine. First I try to connect to es backend , but I cant catch any trace. So I try to use collector with memory backend. In the same situation I cant catch any trace. Here is my docker compose file:

version: "3"

services:
  jaeger-collector:
    image: jaegertracing/jaeger-collector
    ports:
      - "14269:14269"
      - "14268:14268"
      - "14267:14267"
      - "9411:9411"
    networks:
      - default
    restart: on-failure
    environment:
      - SPAN_STORAGE_TYPE=memory
    command: [
      #"--es.server-urls=http://172.31.60.138:9200",
      "--memory.max-traces=1000",
      "--log-level=debug"
    ]
    #depends_on:
    #  - elasticsearch

  #jaeger-agent:
  #  image: jaegertracing/jaeger-agent
  #  hostname: jaeger-agent
  #  command: ["--collector.host-port=jaeger-collector:14267"]
  #  ports:
  #    - "5775:5775/udp"
  #    - "6831:6831/udp"
  #    - "6832:6832/udp"
  #    - "5778:5778"
  #  networks:
  #    - elastic-jaeger
  #  networks:
  #    - elastic-jaeger
  #  restart: on-failure
  #  environment:
  #    - SPAN_STORAGE_TYPE=elasticsearch
  #  depends_on:
  #    - jaeger-collector

  jaeger-query:
    image: jaegertracing/jaeger-query
    environment:
      - SPAN_STORAGE_TYPE=memory
      - no_proxy=localhost
    ports:
      - "16686:16686"
      - "16687:16687"
    networks:
      - default
    restart: on-failure
    command: [
      #"--es.server-urls=http://172.31.60.138:9200",
      #"--span-storage.type=elasticsearch",
      "--memory.max-traces=1000",
      "--log-level=debug"
      #"--query.static-files=/go/jaeger-ui/"
    ]
    depends_on:
      - jaeger-collector

log show:

jaeger-collector_1  | 2018-08-09T08:52:31.737071735Z {"level":"info","ts":1533804751.736927,"caller":"healthcheck/handler.go:99","msg":"Health Check server started","http-port":14269,"status":"unavailable"}
jaeger-collector_1  | 2018-08-09T08:52:31.737223952Z {"level":"info","ts":1533804751.7371488,"caller":"memory/factory.go:55","msg":"Memory storage configuration","configuration":{"MaxTraces":1000}}
jaeger-collector_1  | 2018-08-09T08:52:31.737855280Z {"level":"info","ts":1533804751.737793,"caller":"static/strategy_store.go:77","msg":"No sampling strategies provided, using defaults"}
jaeger-collector_1  | 2018-08-09T08:52:31.737918697Z {"level":"info","ts":1533804751.7378654,"caller":"collector/main.go:141","msg":"Registering metrics handler with HTTP server","route":"/metrics"}
jaeger-collector_1  | 2018-08-09T08:52:31.737952308Z {"level":"info","ts":1533804751.7379005,"caller":"collector/main.go:149","msg":"Starting Jaeger Collector HTTP server","http-port":14268}
jaeger-collector_1  | 2018-08-09T08:52:31.737958490Z {"level":"info","ts":1533804751.737913,"caller":"healthcheck/handler.go:133","msg":"Health Check state change","status":"ready"}
jaeger-query_1      | 2018-08-09T08:52:32.321901870Z {"level":"info","ts":1533804752.321113,"caller":"healthcheck/handler.go:99","msg":"Health Check server started","http-port":16687,"status":"unavailable"}
jaeger-query_1      | 2018-08-09T08:52:32.323285311Z {"level":"info","ts":1533804752.3231862,"caller":"memory/factory.go:55","msg":"Memory storage configuration","configuration":{"MaxTraces":1000}}
jaeger-query_1      | 2018-08-09T08:52:32.323299988Z {"level":"info","ts":1533804752.3232355,"caller":"query/main.go:180","msg":"Archive storage not created","reason":"Archive storage not supported"}
jaeger-query_1      | 2018-08-09T08:52:32.551971761Z {"level":"info","ts":1533804752.5518212,"caller":"query/main.go:125","msg":"Registering metrics handler with HTTP server","route":"/metrics"}
jaeger-query_1      | 2018-08-09T08:52:32.552059577Z {"level":"info","ts":1533804752.5519016,"caller":"healthcheck/handler.go:133","msg":"Health Check state change","status":"ready"}
jaeger-query_1      | 2018-08-09T08:52:32.552112344Z {"level":"info","ts":1533804752.5520308,"caller":"query/main.go:134","msg":"Starting jaeger-query HTTP server","port":16686}

The agent log show:

jaeger-agent_1  | 2018-08-09T09:16:57.134805643Z {"level":"info","ts":1533806217.134292,"caller":"tchannel/builder.go:94","msg":"Enabling service discovery","service":"jaeger-collector"}
jaeger-agent_1  | 2018-08-09T09:16:57.134845921Z {"level":"info","ts":1533806217.1343672,"caller":"peerlistmgr/peer_list_mgr.go:111","msg":"Registering active peer","peer":"172.31.43.67:14267"}
jaeger-agent_1  | 2018-08-09T09:16:57.135284852Z {"level":"info","ts":1533806217.1351295,"caller":"agent/main.go:62","msg":"Starting agent"}
jaeger-agent_1  | 2018-08-09T09:16:58.135179196Z {"level":"info","ts":1533806218.1348429,"caller":"peerlistmgr/peer_list_mgr.go:157","msg":"Not enough connected peers","connected":0,"required":1}
jaeger-agent_1  | 2018-08-09T09:16:58.135204972Z {"level":"info","ts":1533806218.1349018,"caller":"peerlistmgr/peer_list_mgr.go:166","msg":"Trying to connect to peer","host:port":"172.31.43.67:14267"}
jaeger-agent_1  | 2018-08-09T09:16:58.139015123Z {"level":"info","ts":1533806218.138778,"caller":"peerlistmgr/peer_list_mgr.go:176","msg":"Connected to peer","host:port":"[::]:14267"}

thanks in advance !

lxkaka commented 6 years ago

@jpkrohling I found the problem. Since uWSGI prefork mode, the subprocesses share the same fd, when new event trigger epoll wait , all supprocesses will handle the same event and make a dead loop. The option solution is uWSGI work with lazy-apps option.

adamfadhil commented 6 years ago

Hi

I think I am having the same issue, i could see that my instrumented applications is reporting the span like these: 2018/08/18 02:50:48 Reporting span 45fddd66abb80684:45fddd66abb80684:0:1, though I could not see the traces on the jaeger ui.

Here is my current setting of the jeager config: SamplerConfig{Type: "const", Param: 1}, ReporterConfig{LogSpans: true}

Here is how I run my application: docker run --net="mynet" --env-file=./.env --name myapp -p 0.0.0.0:3009:3009 || docker start -i myapp. Then i would start my app's go binary inside the docker interactive shell. After it runs it logs this 2018/08/18 02:50:33 Initializing logging reporter

Here is how I run the jaeger all in one: docker run --name jaeger --net="mynet" -d -p6831:6831/udp -p16686:16686 -p14268:14268 -p14267:14627 jaegertracing/all-in-one:latest

Here is the logs from jaeger all in one:

{"level":"info","ts":1534559978.5076506,"caller":"healthcheck/handler.go:99","msg":"Health Check server started","http-port":14269,"status":"unavailable"} {"level":"info","ts":1534559978.508828,"caller":"memory/factory.go:55","msg":"Memory storage configuration","configuration":{"MaxTraces":0}} {"level":"info","ts":1534559978.518636,"caller":"tchannel/builder.go:94","msg":"Enabling service discovery","service":"jaeger-collector"} {"level":"info","ts":1534559978.5191987,"caller":"peerlistmgr/peer_list_mgr.go:111","msg":"Registering active peer","peer":"127.0.0.1:14267"} {"level":"info","ts":1534559978.5268018,"caller":"standalone/main.go:187","msg":"Starting agent"} {"level":"info","ts":1534559978.5324962,"caller":"standalone/main.go:227","msg":"Starting jaeger-collector TChannel server","port":14267} {"level":"info","ts":1534559978.5353398,"caller":"standalone/main.go:237","msg":"Starting jaeger-collector HTTP server","http-port":14268} {"level":"info","ts":1534559979.5207489,"caller":"peerlistmgr/peer_list_mgr.go:157","msg":"Not enough connected peers","connected":0,"required":1} {"level":"info","ts":1534559979.5392709,"caller":"peerlistmgr/peer_list_mgr.go:166","msg":"Trying to connect to peer","host:port":"127.0.0.1:14267"} {"level":"info","ts":1534559979.5800037,"caller":"peerlistmgr/peer_list_mgr.go:176","msg":"Connected to peer","host:port":"[::]:14267"} {"level":"info","ts":1534559979.9633992,"caller":"standalone/main.go:298","msg":"Registering metrics handler with jaeger-query HTTP server","route":"/metrics"} {"level":"info","ts":1534559979.976776,"caller":"standalone/main.go:304","msg":"Starting jaeger-query HTTP server","port":16686} {"level":"info","ts":1534559979.9794478,"caller":"healthcheck/handler.go:133","msg":"Health Check state change","status":"ready"}

I cannot seem to understand which one is failing though, can some one give me some pointers? Thank you!

yurishkuro commented 6 years ago

@adamfadhil have you tried without --net="mynet"? Another option you can try is configure Jaeger client to use HTTP sender instead of UDP, since HTTP sender will be able to log transmission errors.

adamfadhil commented 6 years ago

Hey thanks for the help @yurishkuro . So i've tried it with the LocalAgentHostPort with the previous setting.

Current config: SamplerConfig{Type: "const", Param: 1}, ReporterConfig{LogSpans: true, LocalAgentHostPort: "jaeger:14268"}

Running all in one with docker run -d --name jaeger \ -e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \ -p 5775:5775/udp \ -p 6831:6831/udp \ -p 6832:6832/udp \ -p 5778:5778 \ -p 16686:16686 \ -p 14268:14268 \ -p 9411:9411 \ jaegertracing/all-in-one:latest

I know it worked because if I try to use foobar:14268 on LocalAgentHostPort it would say error no such host. UPDATE: If I used a different port (i.e 14263 which is not used by the collector) it still does not show error.

The log from myapp said that it is still reporting spans, and the logs from jaeger's all in one is still the same from before and no errors. I just want to know where it fails, or where to debug. Also, I don't understand how I would run jaeger all in one without the --net="mynet" though, becausemyapp` is running on it's own docker network.

yurishkuro commented 6 years ago

you don't need the --net setting, but you do need to pass --link jaeger to the application so that jaeger:<port> can be resolved.

https://github.com/jaegertracing/jaeger/tree/master/examples/hotrod

adamfdl commented 6 years ago

Thanks again for the answer @yurishkuro .

This is how I run myapp currently: docker run --link jaeger --env-file=./.env --name myapp -p 0.0.0.0:3009:3009 || docker start -i myapp. How i ran the jaeger all in one is still the same.

The jaeger UI still does not yet list my service on the dropdown list, though the instrumented app is running as expected like before (reporting spans).

I have not updated my config, so it's the same as before. What I do not understand is that it would still not produce error when I use a different port like before. I'll just put how I initialize my Jaeger below:

func initJaeger(service string) (opentracing.Tracer, io.Closer) {
    cfg := &jaegerconfig.Configuration{
        Disabled: false,
        Sampler: &jaegerconfig.SamplerConfig{
            Type:  "const",
            Param: 1,
        },
        Reporter: &jaegerconfig.ReporterConfig{
            LogSpans:           true,
            LocalAgentHostPort: "jaeger:14268",
        },
    }

    tracer, closer, err := cfg.New(service, jaegerconfig.Logger(jaeger.StdLogger))
    if err != nil {
        panic(fmt.Sprintf("ERROR: cannot init Jaeger: %v\n", err))
    }
    return tracer, closer
}
yurishkuro commented 6 years ago

LocalAgentHostPort: "jaeger:14268",

the default configuration (yours is pretty close) uses UDP sender, which does not go to this port. That is why I was recommending to try HTTP sender, it will log a clear error if it cannot submit the batches.

adamfdl commented 6 years ago

@yurishkuro Thank you for the answer, I have solved it now. I will just put up my configs if anyone faces the same problem.

How I initiate my jaeger jaeger function:

func initJaeger(service string) (opentracing.Tracer, io.Closer) {
    cfg := &jaegerconfig.Configuration{
        Disabled: false,
        Sampler: &jaegerconfig.SamplerConfig{
            Type:  "const",
            Param: 1,
        },
        Reporter: &jaegerconfig.ReporterConfig{
            LogSpans: true,
        },
    }

    var sender jaeger.Transport
    sender = jaegertransport.NewHTTPTransport(
        "http://jaeger:14268/api/traces",
        jaegertransport.HTTPBatchSize(1),
    )

    tracer, closer, err := cfg.New(
        service,
        jaegerconfig.Reporter(
            jaeger.NewRemoteReporter(
                sender,
                jaeger.ReporterOptions.BufferFlushInterval(1*time.Second),
                jaeger.ReporterOptions.Logger(jaeger.StdLogger),
            ),
        ),
        jaegerconfig.Logger(jaeger.StdLogger),
    )
    if err != nil {
        panic(fmt.Sprintf("ERROR: cannot init Jaeger: %v\n", err))
    }
    return tracer, closer
}

How I run myapp: docker run --link jaeger --env-file=./.env --name myapp -p 0.0.0.0:3009:3009 || docker start -i myapp

How I run jaeger all in one: just follow here

aditya-wework commented 3 years ago

"level":"info","ts":1613572937.3705058,"caller":"peerlistmgr/peer_list_mgr.go:176","msg":"Connected to peer","host:port":"[::]:14267"} ... getting this error on running ./scripts/jaeger-all-in-one.sh command.

MargaritaForex commented 2 years ago

I have a similar error

I have three files yml with compose and the reference to docker images are the next:

elasticsearch-docker-compose.yml

version: '3.6'
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
    ports:
      - '9200:9200'
      - '9300:9300'
    environment:
      - discovery.type=single-node
    networks:
      - metrics-network
networks:
  metrics-network: null

jaegerquery.yaml

version: "3.6"

services:

  tracing-query:
    image: jaegertracing/jaeger-query:1.24
    ports:
      - "16686:16686"
    environment:
      - "TZ=America/Bogota"
      - "SPAN_STORAGE_TYPE=elasticsearch"
      - "ES_SERVER_URLS=http://elasticsearch:9200"
    networks:
    - metrics-network
    logging:
      driver: "json-file"
      options:
        max-size: "50m"

networks:
  metrics-network:

opentelemetry-collector.yml

version: '3.6'
services:
  otel-agent:
    image: 'otel/opentelemetry-collector:0.47.0'
    command:
      - '--config=/etc/otel-agent-config.yaml'
      - '$${OTELCOL_ARGS}'
    volumes:
      - './otel-agent-config.yml:/etc/otel-agent-config.yaml'
    ports:
      - '8887:8888'
      - '14250:14250'
      - '14268'
      - '55678'
      - '4317:4317'
      - '9411'
      - '1777:1777'
      - '55679:55679'
      - '13133'
    networks:
      - metrics-network
networks:
  metrics-network: null

otel-agent-config.yml

receivers:
    otlp:
        protocols:
            grpc:
    opencensus:
    jaeger:
        protocols:
            grpc:
            thrift_http:

exporters:
    jaeger:
        endpoint: tracing-collector:14250
        tls:
            insecure: true
    logging:
        loglevel: debug

processors:
    batch:

extensions:
    pprof:
        endpoint: :1777
    zpages:
        endpoint: :55679
    health_check:

service:
    extensions: [health_check, pprof, zpages]
    pipelines:
        traces:
            receivers: [otlp, opencensus, jaeger]
            processors: [batch]
            exporters: [jaeger, logging]
        metrics:
            receivers: [otlp, opencensus]
            processors: [batch]
            exporters: [logging]

All the docker images are compatibles with ARM64

but when run the collector with the agent, is generate the next log error:

2022-08-10T02:04:41.735Z        info    service/collector.go:141        Everything is ready. Begin running and processing data.
2022-08-10T02:04:41.942Z        warn    zapgrpc/zapgrpc.go:191  [core] grpc: addrConn.createTransport failed to connect to {tracing-collector:14250 tracing-collector:14250 <nil> <nil> 0 <nil>}. Err: connection error: desc = "transport: Error while dialing dial tcp: lookup tracing-collector on 127.0.0.11:53: no such host" {"grpc_log": true}

And I don't what can be.