Describe the issue: Unable to create a Client connection. I’ve tried RestClient, RestHighLevelClient and the Http 5 client. I get the same error with all types. I can connect and retrieve information using postman and HttpClient in java code for both https and http
Configuration: Use Docker compose to install and run the server. I have toggled between https and http with no luck. OpenSearch seems to be working correctly. Not getting any messages in the log in the docker container
Relevant Logs or Screenshots: I get the following stack trace
Exception in thread “httpclient-dispatch-1” java.lang.NoSuchMethodError: ‘void org.apache.hc.core5.http2.impl.nio.ClientH2UpgradeHandler.(org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexerFactory)’
at org.apache.hc.client5.http.impl.async.HttpAsyncClientProtocolNegotiationStarter.createHandler(HttpAsyncClientProtocolNegotiationStarter.java:260)
at org.apache.hc.core5.reactor.InternalConnectChannel.onIOEvent(InternalConnectChannel.java:77)
at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:176)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:125)
at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:92)
at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
at java.base/java.lang.Thread.run(Thread.java:1583)
It looks like you have dependencies conflict / misalignment, the opensearch-java client depends on Apache HttpClient 5.5 / Apache HttpCore 5.3.4. Could you please share the dependency tree or project configuration?