在Jaeger中看不到微服务跟踪

时间:2019-12-03 17:28:21

标签: elasticsearch microservices jaeger distributed-tracing

我正在使用Jaeger进行微服务跟踪,而elasticsearch是Jaeger客户端的存储后端。我已经检查了Kibana中的索引和数据,并且能够看到所有数据。重新启动Jaeger和ES无法使其正常工作。 ES和Jaeger的安装是全新的,ES数据来自备份。 我正在使用以下docker-compose文件设置服务:

version: "3.7"

services:


  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.3.1
    command:
    - sh
    - -c
    - "/usr/local/bin/docker-entrypoint.sh elasticsearch"
    networks:
      - elastic-jaeger
    ports:
      - "127.0.0.1:9200:9200"
      - "127.0.0.1:9300:9300"
    env_file:
      - .env
    restart: on-failure
    environment:
      - cluster.name=jaeger-cluster
      - discovery.type=single-node
      - http.host=0.0.0.0
      - transport.host=127.0.0.1
      - ES_JAVA_OPTS=-Xms512m -Xmx512m
      - xpack.security.enabled=false
    volumes:
      - esdata:/usr/share/elasticsearch/data
      - auth_dir:/home/auth_dir


  kibana:
       image: docker.elastic.co/kibana/kibana:6.3.1
       ports:
        - "5601:5601"
       container_name: kibana
       environment:
          - "ELASTICSEARCH_URL=http://elasticsearch:9200"
       networks:
          - elastic-jaeger
       depends_on:
          - elasticsearch


  jaeger-collector:
    image: jaegertracing/jaeger-collector
    ports:
      - "14269:14269"
      - "14268:14268"
      - "14267:14267"
      - "9411:9411"
    networks:
      - elastic-jaeger
    restart: on-failure
    environment:
      - SPAN_STORAGE_TYPE=elasticsearch
    command: [
      "--es.server-urls=http://elasticsearch:9200",
      "--es.num-shards=1",
      "--es.num-replicas=0",
      "--log-level=error"
    ]
    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
    restart: on-failure
    environment:
      - SPAN_STORAGE_TYPE=elasticsearch
    depends_on:
      - jaeger-collector

  jaeger-query:
    image: jaegertracing/jaeger-query
    environment:
      - SPAN_STORAGE_TYPE=elasticsearch
      - no_proxy=localhost
    ports:
      - "16686:16686"
      - "16687:16687"
    networks:
      - elastic-jaeger
    restart: on-failure
    command: [
      "--es.server-urls=http://elasticsearch:9200",
      "--span-storage.type=elasticsearch",
      "--log-level=debug"
    ]
    depends_on:
      - jaeger-agent
volumes:
  esdata:
    driver: local
  auth_dir:
    driver: local

networks:
  elastic-jaeger:
    driver: bridge

0 个答案:

没有答案