OpenSearch RHEL9 Installation challenges

Been running Elasticsearch for a while but decided to try OpenSearch 2.6 on a RHEL9 VM.
Ran into a couple of observations and an issue with JNA.

OBSERVATION: The GPG signature OpenSearch Uses is signed with SHA1 and Redhat doesnt like that.

root@test ~]# sudo rpm --import
warning: Signature not supported. Hash algorithm SHA1 not available.
error: key 1 import failed.

Ignoring GPG using SHA1 for now (just a test server), I skipped the verification and forced the installation. Run into some issues:

My /usr/share/opensearch/config/opensearch.yml config: "test.local" /var/lib/opensearch
        path.logs: /var/log/opensearch
        action.auto_create_index: false true
        http.port: 9200
        discovery.type: single-node
        bootstrap.memory_lock: true

opensearch LOG:

root@test ~]# cat /var/log/opensearch/opensearch.log

[2023-04-28T11:50:02,506][WARN ][o.o.b.Natives            ] [test.local] unable to load JNA native support library, native methods will be disabled.
java.lang.UnsatisfiedLinkError: /tmp/opensearch-11425941651389470086/jna17202178635701513230.tmp: /tmp/opensearch-11425941651389470086/jna17202178635701513230.tmp: failed to map segment from shared object
	at jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?]
	at jdk.internal.loader.NativeLibraries$ ~[?:?]
	at jdk.internal.loader.NativeLibraries.loadLibrary( ~[?:?]
	at jdk.internal.loader.NativeLibraries.loadLibrary( ~[?:?]
	at java.lang.ClassLoader.loadLibrary( ~[?:?]
	at java.lang.Runtime.load0( ~[?:?]
	at java.lang.System.load( ~[?:?]
	at com.sun.jna.Native.loadNativeDispatchLibraryFromClasspath( ~[jna-5.5.0.jar:5.5.0 (b0)]
	at com.sun.jna.Native.loadNativeDispatchLibrary( ~[jna-5.5.0.jar:5.5.0 (b0)]
	at com.sun.jna.Native.<clinit>( ~[jna-5.5.0.jar:5.5.0 (b0)]
	at java.lang.Class.forName0(Native Method) ~[?:?]
	at java.lang.Class.forName( ~[?:?]
	at org.opensearch.bootstrap.Natives.<clinit>( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.bootstrap.Bootstrap.initializeNatives( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.bootstrap.Bootstrap.setup( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.bootstrap.Bootstrap.init( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.bootstrap.OpenSearch.init( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.bootstrap.OpenSearch.execute( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.cli.EnvironmentAwareCommand.execute( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.cli.Command.mainWithoutErrorHandling( [opensearch-cli-2.6.0.jar:2.6.0]
	at org.opensearch.cli.Command.main( [opensearch-cli-2.6.0.jar:2.6.0]
	at org.opensearch.bootstrap.OpenSearch.main( [opensearch-2.6.0.jar:2.6.0]
	at org.opensearch.bootstrap.OpenSearch.main( [opensearch-2.6.0.jar:2.6.0]
[2023-04-28T11:50:02,512][WARN ][o.o.b.Natives            ] [test.local] cannot check if running as root because JNA is not available

I thought maybe running a yum install jna would get me past those JNA errors but alas it did not. Should I just give up on trying to get this to run with RHEL9 or am I missing something stupid here?

Yep, my mistake! RHEL9’s fapolicyd doesn’t allow /tmp exec. Since OpenSearch requires this by default during initial setup, I needed to stop fapolicy, start/stop opensearch, and then start fapolicy and opensearch…

1 Like