Kokki
Kokki

Reputation: 83

Opentelemetry with Zipkin exporter is not working as expected. Throws StatusRuntimeException: UNAVAILABLE: io exception

I am very new to using OpenTelemetry and have just tried configuring it to send traces to my Zipkin server. Unfortunately , after configuring the agent by specifying zipkin exporter details , I could see an exception in the console. I used Petclic as sample spring boot and have followed the documentation here https://github.com/open-telemetry/opentelemetry-java-instrumentation

Here is the command that I used to start spring-boot app(I have my zipkin server running at localhost:9411):

java -javaagent:opentelemetry-javaagent-all.jar -Dotel.exporter=zipkin -Dotel.exporter.zipkin.endpoint=localhost:9411 -jar spring-petclinic-2.4.2.jar

Exception in the console (It is trying to connect to gRpc exporter instead of Zipkins):

[opentelemetry.auto.trace 2021-03-07 20:24:15:582 +0530] [IntervalMetricReader-1] WARN io.opentelemetry.expor**ter.otlp.metrics.OtlpGrpcMetricExporter - Failed to export metrics
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception**
        at io.grpc.Status.asRuntimeException(Status.java:534)
        at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:533)
        at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:617)
        at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:70)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:803)
        at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:782)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: **localhost/0:0:0:0:0:0:0:1:4317**
Caused by: java.net.ConnectException: Connection refused: no further information

Please can you let me know what is wrong with this.

EDIT : I already tried passing -Dotel.traces.exporter=zipkin instead of -Dotel.exporter=zipkin but was not successful. I am just trying to start my spring boot app through eclipse by passing these params as jvm arguments. Every tutorial on OpenTelemetery seems to be using Docker setup. Please could someone help

Upvotes: 2

Views: 4116

Answers (3)

Vortex
Vortex

Reputation: 789

I think conceptual understanding helps too

Set up the server, using either binary or compile it. Launch it. https://zipkin.io/pages/quickstart.html

Set up Java client, add VM parameters as per Marco post above. I added -Dotel.javaagent.debug=true to help troubleshoot

After that, your client app will send traces (in zipkin mode) to the server. then bring up a browser on http://localhost:9411

Upvotes: 0

marco
marco

Reputation: 46

i had the same issue, but i solved with this jvm arguments:

-Dotel.traces.exporter=zipkin -Dotel.metrics.exporter=none -Dotel.exporter.zipkin.endpoint=http://localhost:9411/api/v2/spans Maybe the error is on zipkin.endpoint, try to write the entire url.

Regards, Marco

Upvotes: 3

Sundhar Sundhar
Sundhar Sundhar

Reputation: 11

In your command please try the following -Dotel.traces.exporter=zipkin instead of -Dotel.exporter=zipkin

Upvotes: 0

Related Questions