micrometer-metrics / prometheus-rsocket-proxy

An RSocket proxy to pull metrics from applications that can only open egress
Apache License 2.0
72 stars 27 forks source link

Prometheus-rsocket-client seems to have issues with JDK17 #53

Open nightswimmings opened 2 years ago

nightswimmings commented 2 years ago

Looks like executing the prometheus-rsocket-client on Java 17 fails because of some runtime errors of snappy-java library

"Custom destroy method 'pushAndClose' on bean with name 'prometheusRSocketClient' threw an exception: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.pure.UnsafeUtil"

https://github.com/xerial/snappy-java/issues/305

This is the evidence I collected, but I see no mention here so in case I am missing something I'll stand corrected

I tried with both 1.3.0 and 1.4.0, as soon as I use eclipse-temurin:17-jdk-alpine as my base image, some metrics (I guess those collected during runtime, and relying on pushAndClose) don't get into the proxy and I get this error in logs

shakuzen commented 2 years ago

Does what's suggested in this comment fix it? I suspect it's an issue of alpine not having a required dependency.

nightswimmings commented 1 year ago

I never answered this! My apologies. But yes, the gcompat thing fixed it. is it still necessary in 2023?