Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Additional clientlib JARs can conflict with required dependencies #1510

Open
andrewazores opened this issue Jun 1, 2023 · 0 comments
Labels
bug Something isn't working question Further information is requested

Comments

@andrewazores
Copy link
Member

After loading a WildFly jboss-client.jar into clientlib in order to enable remote+http JMX connections, my Cryostat instance became unable to query the Podman API:

May 31, 2023 2:38:55 PM io.cryostat.core.log.Logger error
SEVERE: Podman API request failed
java.lang.IllegalArgumentException: The Vertx instance must be created with the preferNativeTransport option set to true to create domain sockets
	at io.vertx.core.net.impl.transport.Transport.channelFactory(Transport.java:183)
	at io.vertx.core.net.impl.ChannelProvider.connect(ChannelProvider.java:98)
	at io.vertx.core.net.impl.ChannelProvider.connect(ChannelProvider.java:92)
	at io.vertx.core.net.impl.NetClientImpl.connectInternal2(NetClientImpl.java:273)
	at io.vertx.core.net.impl.NetClientImpl.lambda$connectInternal$1(NetClientImpl.java:240)
	at io.vertx.core.impl.future.FutureImpl$3.onSuccess(FutureImpl.java:141)
	at io.vertx.core.impl.future.FutureBase.lambda$emitSuccess$0(FutureBase.java:54)
	at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:569)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)

With a bit of additional digging and logging added, I came to this:

INFO: isNativeTransportEnabled? false
Jun 01, 2023 2:36:16 PM io.cryostat.core.log.Logger info
INFO: Epoll.isAvailable? false
java.lang.ExceptionInInitializerError
        at io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:40)
        at io.vertx.core.net.impl.transport.EpollTransport.isAvailable(EpollTransport.java:86)
        at io.vertx.core.net.impl.transport.Transport.nativeTransport(Transport.java:59)
        at io.vertx.core.net.impl.transport.Transport.transport(Transport.java:82)
        at io.vertx.core.impl.VertxBuilder.initTransport(VertxBuilder.java:327)
        at io.vertx.core.impl.VertxBuilder.init(VertxBuilder.java:265)
        at io.vertx.core.Vertx.vertx(Vertx.java:87)
        at io.cryostat.net.NetworkModule.provideVertx(NetworkModule.java:169)
        at io.cryostat.net.NetworkModule_ProvideVertxFactory.provideVertx(NetworkModule_ProvideVertxFactory.java:35)
        at io.cryostat.net.NetworkModule_ProvideVertxFactory.get(NetworkModule_ProvideVertxFactory.java:27)
        at io.cryostat.net.NetworkModule_ProvideVertxFactory.get(NetworkModule_ProvideVertxFactory.java:1)
        at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
        at io.cryostat.DaggerCryostat_Client$ClientImpl.vertx(DaggerCryostat_Client.java:1712)
        at io.cryostat.Cryostat.main(Cryostat.java:154)
Caused by: java.lang.IllegalStateException: Multiple resources found for 'META-INF/native/libnetty_transport_native_epoll_x86_64.so' with different content: [jar:file:/app/libs/netty-transport-native-epoll-4.1.86.Final-linux-x86_64.jar!/M
ETA-INF/native/libnetty_transport_native_epoll_x86_64.so, jar:file:/clientlib/jboss-client.jar!/META-INF/native/libnetty_transport_native_epoll_x86_64.so]
        at io.netty.util.internal.NativeLibraryLoader.getResource(NativeLibraryLoader.java:301)
        at io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:173)
        at io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:323)
        at io.netty.channel.epoll.Native.<clinit>(Native.java:85)
        ... 14 more

In the case that additional JARs added to the clientlib conflict with Cryostat's own required dependencies, strange behaviours may result.

@andrewazores andrewazores added bug Something isn't working question Further information is requested labels Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant