You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a Java8 application that runs in an Ubuntu-based Docker container. It works fine but I am trying to shrink it down a bit by using an Alpine Linux-based Docker container.
From what I can gather, it seems like the standard libsigar in the JAR file isn't compatible with Alpine Linux (something about glibc vs. musl libc?) In any case, there a Sigar package that provides me with a working libsigar via the OS's package manager.
How can I tell sigar-loader or Kamon to just use the OS's version of the library rather than the JAR?
The error when I try to run my application in Alpine Linux is:
Oops, cannot start the server.
com.google.inject.CreationException: Unable to create injector, see the following errors:
1) Error injecting method, java.lang.UnsatisfiedLinkError: /opt/play/native/libsigar-amd64-linux.so: Error relocating /opt/play/native/libsigar-amd64-linux.so: clnttcp_create: symbol not found
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at play.libs.akka.AkkaGuiceSupport.bindActor(AkkaGuiceSupport.java:55) (via modules: com.google.inject.util.Modules$OverrideModule -> config.GuiceModule)
1 error
at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:176)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:73)
at com.google.inject.Guice.createInjector(Guice.java:62)
at play.api.inject.guice.GuiceBuilder.injector(GuiceInjectorBuilder.scala:126)
at play.api.inject.guice.GuiceApplicationBuilder.build(GuiceApplicationBuilder.scala:93)
at play.api.inject.guice.GuiceApplicationLoader.load(GuiceApplicationLoader.scala:21)
at play.core.server.ProdServerStart$.start(ProdServerStart.scala:52)
at play.core.server.ProdServerStart$.main(ProdServerStart.scala:27)
at play.core.server.ProdServerStart.main(ProdServerStart.scala)
Caused by: java.lang.UnsatisfiedLinkError: /opt/play/native/libsigar-amd64-linux.so: Error relocating /opt/play/native/libsigar-amd64-linux.so: clnttcp_create: symbol not found
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1821)
at java.lang.Runtime.load0(Runtime.java:809)
at java.lang.System.load(System.java:1086)
at kamon.sigar.SigarProvisioner.provision(SigarProvisioner.java:179)
at kamon.system.SystemMetricsExtension.<init>(SystemMetricsExtension.scala:52)
at kamon.system.SystemMetrics$.createExtension(SystemMetricsExtension.scala:34)
at kamon.system.SystemMetrics$.createExtension(SystemMetricsExtension.scala:32)
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:713)
at akka.actor.ExtensionId$class.apply(Extension.scala:79)
at kamon.system.SystemMetrics$.apply(SystemMetricsExtension.scala:32)
at akka.actor.ExtensionId$class.get(Extension.scala:91)
at kamon.system.SystemMetrics$.get(SystemMetricsExtension.scala:32)
at kamon.ModuleLoaderExtension$$anonfun$2$$anonfun$apply$2.apply(ModuleLoader.scala:44)
at kamon.ModuleLoaderExtension$$anonfun$2$$anonfun$apply$2.apply(ModuleLoader.scala:42)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:237)
at scala.util.Try$.apply(Try.scala:192)
at scala.util.Success.map(Try.scala:237)
at kamon.ModuleLoaderExtension.<init>(ModuleLoader.scala:38)
at kamon.ModuleLoader$.createExtension(ModuleLoader.scala:27)
at kamon.ModuleLoader$.createExtension(ModuleLoader.scala:25)
at akka.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:713)
at kamon.Kamon$.start(Kamon.scala:55)
at kamon.Kamon$.ifStarted(Kamon.scala:95)
at kamon.Kamon$.metrics(Kamon.scala:78)
at akka.kamon.instrumentation.LookupDataAware$LookupData$.apply$default$3(DispatcherInstrumentation.scala:184)
at akka.kamon.instrumentation.DispatcherInstrumentation.aroundDispatchersLookup(DispatcherInstrumentation.scala:83)
at akka.dispatch.Dispatchers.lookup(Dispatchers.scala:81)
at akka.dispatch.Dispatchers.defaultGlobalDispatcher(Dispatchers.scala:71)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:599)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:126)
at play.api.libs.concurrent.ActorSystemProvider$.start(Akka.scala:291)
at play.api.libs.concurrent.ActorSystemProvider.get$lzycompute(Akka.scala:256)
at play.api.libs.concurrent.ActorSystemProvider.get(Akka.scala:255)
at play.api.libs.concurrent.ActorSystemProvider.get(Akka.scala:251)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.BoundProviderFactory.provision(BoundProviderFactory.java:72)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:61)
at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:62)
at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:54)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:62)
at com.google.inject.internal.InjectorImpl.injectMembers(InjectorImpl.java:984)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies.initialize(Providers.java:149)
at com.google.inject.util.Providers$GuicifiedProviderWithDependencies$$FastClassByGuice$$2a7177aa.invoke(<generated>)
at com.google.inject.internal.cglib.reflect.$FastMethod.invoke(FastMethod.java:53)
at com.google.inject.internal.SingleMethodInjector$1.invoke(SingleMethodInjector.java:57)
at com.google.inject.internal.SingleMethodInjector.inject(SingleMethodInjector.java:91)
at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:132)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:93)
at com.google.inject.internal.MembersInjectorImpl$1.call(MembersInjectorImpl.java:80)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.MembersInjectorImpl.injectAndNotify(MembersInjectorImpl.java:80)
at com.google.inject.internal.Initializer$InjectableReference.get(Initializer.java:174)
at com.google.inject.internal.Initializer.injectAll(Initializer.java:108)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:174)
... 10 more
The text was updated successfully, but these errors were encountered:
would it be possible to alter the loader so that it will NOT extract if the extract folder location is already present? this would allow for overrides if it is required.
I have a Java8 application that runs in an Ubuntu-based Docker container. It works fine but I am trying to shrink it down a bit by using an Alpine Linux-based Docker container.
From what I can gather, it seems like the standard libsigar in the JAR file isn't compatible with Alpine Linux (something about glibc vs. musl libc?) In any case, there a Sigar package that provides me with a working libsigar via the OS's package manager.
How can I tell sigar-loader or Kamon to just use the OS's version of the library rather than the JAR?
The error when I try to run my application in Alpine Linux is:
The text was updated successfully, but these errors were encountered: