-1

SpringCloud version:Dalston.SR1, rabbitMQ version:3.6.10,ElasticSearch version:6.2.4

There was nothing unusual when I use MySQL as a storage.
Now I use ElasticSearch.I can't find any services.
I lost something?

here is the picture: here is the picture

application.properties

server.port=11008
spring.application.name=microservice-zipkin-stream-server-es

spring.sleuth.enabled=false
spring.sleuth.sampler.percentage=1.0


zipkin.storage.StorageComponent = elasticsearch
zipkin.storage.type=elasticsearch


zipkin.storage.elasticsearch.cluster=elasticsearch-zipkin-cluster
zipkin.storage.elasticsearch.hosts=127.0.0.1:9300

zipkin.storage.elasticsearch.max-requests=64
zipkin.storage.elasticsearch.index=zipkin
zipkin.storage.elasticsearch.index-shards=5
zipkin.storage.elasticsearch.index-replicas=1

spring.rabbitmq.host=192.168.0.162
spring.rabbitmq.port=5672
spring.rabbitmq.username=basefrm
spring.rabbitmq.password=basefrm

eureka.instance.hostname=192.168.0.162
eureka.client.serviceUrl.defaultZone=http://192.168.0.162:8761/eureka/

management.security.enabled=false

pom.xml

        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-sleuth-zipkin-stream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
        </dependency>
        <dependency>
            <groupId>io.zipkin.java</groupId>
            <artifactId>zipkin-autoconfigure-ui</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-eureka</artifactId>
        </dependency>

        <dependency>
            <groupId>io.zipkin.java</groupId>
            <artifactId>zipkin</artifactId>
            <version>2.4.1</version>
        </dependency>

        <dependency>
            <groupId>io.zipkin.java</groupId>
            <artifactId>zipkin-autoconfigure-storage-elasticsearch-http</artifactId>
            <version>2.4.1</version>
            <optional>true</optional>
        </dependency>
Community
  • 1
  • 1

1 Answers1

1

You're using an ancient version of Sleuth, can you please upgrade? Why do you provide Zipkin's version manually? Also as far as I see you're using the Sleuth's Zipkin server (that is deprecated in Edgware and removed in Finchley). My suggestion is that you stop using the Sleuth's Stream server (you can read more about this here https://cloud.spring.io/spring-cloud-static/Edgware.SR3/single/spring-cloud.html#_sleuth_with_zipkin_via_rabbitmq_or_kafka).

<dependencyManagement> (1)
         <dependencies>
             <dependency>
                 <groupId>org.springframework.cloud</groupId>
                 <artifactId>spring-cloud-dependencies</artifactId>
                 <version>${release.train.version}</version>
                 <type>pom</type>
                 <scope>import</scope>
             </dependency>
         </dependencies>
   </dependencyManagement>

   <dependency> (2)
       <groupId>org.springframework.cloud</groupId>
       <artifactId>spring-cloud-starter-zipkin</artifactId>
   </dependency>
   <dependency> (3)
       <groupId>org.springframework.amqp</groupId>
       <artifactId>spring-rabbit</artifactId>
   </dependency>

1) In order not to pick versions by yourself it’s much better if you add the dependency management via the Spring BOM

2) Add the dependency to spring-cloud-starter-zipkin - that way all dependent dependencies will be downloaded

3) To automatically configure rabbit, simply add the spring-rabbit dependency

Marcin Grzejszczak
  • 10,624
  • 1
  • 16
  • 32