opensearch-project / OpenSearch

🔎 Open source distributed and RESTful search engine.
https://opensearch.org/docs/latest/opensearch/index/
Apache License 2.0
9.84k stars 1.83k forks source link

[BUG] java.lang.ClassNotFoundException: io.netty.internal.tcnative.SSLContext #16609

Closed miladhub closed 1 week ago

miladhub commented 1 week ago

Describe the bug

I have started OpenSearch via Docker Compose and it fails with this error:

opensearch-node1       | [2024-11-11T11:43:04,610][INFO ][o.a.l.i.v.PanamaVectorizationProvider] [opensearch-node1] Java vector incubator API enabled; uses preferredBitSize=128; FMA enabled
opensearch-node1       | [2024-11-11T11:43:05,365][INFO ][o.o.s.s.t.SSLConfig      ] [opensearch-node1] SSL dual mode is disabled
opensearch-node1       | [2024-11-11T11:43:05,365][INFO ][o.o.s.OpenSearchSecurityPlugin] [opensearch-node1] OpenSearch Config path is /usr/share/opensearch/config
opensearch-node1       | [2024-11-11T11:43:05,461][WARN ][o.o.s.s.SslSettingsManager] [opensearch-node1] OpenSSL not available (this is not an error, we simply fallback to built-in JDK SSL) because of {}
opensearch-node1       | java.lang.ClassNotFoundException: io.netty.internal.tcnative.SSLContext
opensearch-node1       |    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
opensearch-node1       |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593) ~[?:?]
opensearch-node1       |    at java.base/java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:872) ~[?:?]
opensearch-node1       |    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
opensearch-node1       |    at java.base/java.lang.Class.forName0(Native Method) ~[?:?]
opensearch-node1       |    at java.base/java.lang.Class.forName(Class.java:534) ~[?:?]
opensearch-node1       |    at java.base/java.lang.Class.forName(Class.java:513) ~[?:?]
opensearch-node1       |    at io.netty.handler.ssl.OpenSsl.<clinit>(OpenSsl.java:95) ~[netty-handler-4.1.114.Final.jar:4.1.114.Final]
opensearch-node1       |    at org.opensearch.security.ssl.OpenSearchSecuritySSLPlugin$4.run(OpenSearchSecuritySSLPlugin.java:218) ~[opensearch-security-2.18.0.0.jar:2.18.0.0]
opensearch-node1       |    at java.base/java.security.AccessController.doPrivileged(AccessController.java:319) ~[?:?]
opensearch-node1       |    at org.opensearch.security.ssl.OpenSearchSecuritySSLPlugin.<init>(OpenSearchSecuritySSLPlugin.java:213) [opensearch-security-2.18.0.0.jar:2.18.0.0]
opensearch-node1       |    at org.opensearch.security.OpenSearchSecurityPlugin.<init>(OpenSearchSecurityPlugin.java:318) [opensearch-security-2.18.0.0.jar:2.18.0.0]
opensearch-node1       |    at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
opensearch-node1       |    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
opensearch-node1       |    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
opensearch-node1       |    at org.opensearch.plugins.PluginsService.loadPlugin(PluginsService.java:796) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:744) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:545) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.plugins.PluginsService.<init>(PluginsService.java:197) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.node.Node.<init>(Node.java:523) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.node.Node.<init>(Node.java:450) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:242) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:181) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:172) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) [opensearch-cli-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.cli.Command.main(Command.java:101) [opensearch-cli-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:138) [opensearch-2.18.0.jar:2.18.0]
opensearch-node1       |    at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:104) [opensearch-2.18.0.jar:2.18.0]

Related component

Other

To Reproduce

  1. Install following https://opensearch.org/docs/latest/getting-started/quickstart/ following Docker Compose instructions
  2. Run docker-compose up -d

Expected behavior

Should bring up the database.

Additional Details

Plugins It's a fresh install, I haven't added new plugins.

Host/Environment (please complete the following information):

Additional context Using a MacBookPro M1.

reta commented 1 week ago

This is a duplicate of https://github.com/opensearch-project/security/issues/4881