continuing the docker/zipkin/eureka saga I switched to the other Dockerfile strategy:
# We copy files from the context into a scratch container first to avoid a problem where docker and # docker-compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. # COPY --from= works around the issue. FROM scratch as scratch COPY . /code/ FROM openzipkin/zipkin-builder as built COPY --from=scratch /code /code WORKDIR /code RUN mvn -B --no-transfer-progress package -DskipTests=true WORKDIR /zipkin-eureka RUN cp /code/target/eureka-zipkin-client-*-module.jar eureka-zipkin-client-module.jar && \ (mkdir eureka-zipkin-client-module && cd eureka-zipkin-client-module && jar -xf ../eureka-zipkin-client-module.jar) && \ rm eureka-zipkin-client-module.jar RUN cp /code/eureka-client.properties eureka-client.properties FROM openzipkin/zipkin:master MAINTAINER Zipkin "https://zipkin.io/" COPY --from=built /zipkin-eureka/ /zipkin/ ENV MODULE_OPTS="-Dloader.path=eureka-zipkin-client-module -Dlogging.level.*=DEBUG -Dlogging.level.org=DEBUG -Dlogging.level.com=DEBUG -Dlogging.level.io=DEBUG -Dspring.application.name=zipkin"
As was suggested by @adriancole further up in the channel (Thank you!) and with that I upped the logger to DEBUG. That gave this helpful info on what spring was loading:
============================ CONDITIONS EVALUATION REPORT ============================ Positive matches: ----------------- .... Negative matches: ----------------- ... EurekaDiscoveryClientConfigServiceBootstrapConfiguration: Did not match: - @ConditionalOnClass did not find required class 'org.springframework.cloud.config.client.ConfigServicePropertySourceLocator' (OnClassCondition) ...
I tried also adding spring-cloud-starter-config-client, but that gave issues with missing dependencies. Unfortunately I'm new to spring boot (just started playing with all this yesterday) so I'm not sure where to go from here.
Currently I have eureka setup for service discover in spring boot mostly because that was the first tutorial I was looking at... would Consul be easier to setup with the zipkin docker image? Up until this Eureka has been easy to setup for the other services I was working with, but I haven't tried consul.
I am using
zipkin-autoconfigure-storage-elasticsearch-http 2.8.4 with
zipkin-server 2.10.0 I can not connect to remote elasticsearch server.
System.setProperty("ES_HOSTS", "http://IP:9200"); in my spring boot app.
The exception is :
Failed to connect to localhost/0:0:0:0:0:0:0:1:9200 at zipkin2.internal.Platform$Jre8.uncheckedIOException(Platform.java:71) ~[zipkin-2.11.7.jar:na] at zipkin2.elasticsearch.ElasticsearchStorage.ensureIndexTemplates(ElasticsearchStorage.java:306)
in ElasticsearchStorage.java Line 67 : host is hardcoded like this
how can I change that ?