Hello All,
Wondering if you could assist with an RPM-based installation that is failing to start after the basic install recommendations and TLS configuration. Relevant logs and configuration included below, any assistance is much appreciated,
Thanks in advance,
David
Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Rocky Linux release 9.1 (Blue Onyx)
opensearch-2.5.0-1.x86_64
/usr/share/opensearch/jdk/bin/java
openjdk version “17.0.5” 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)
Describe the issue:
When trying to start opensearch.service via systemctl, it fails with
[2023-02-07T17:05:08,743][WARN ][o.o.d.SeedHostsResolver ] [dm-in-odfe-01] failed to resolve host [dm-ineos-odfe-02]
java.net.UnknownHostException: dm-ineos-odfe-02
at java.net.InetAddress$CachedAddresses.get(InetAddress.java:801) ~[?:?]
at java.net.InetAddress.getAllByName0(InetAddress.java:1519) ~[?:?]
at java.net.InetAddress.getAllByName(InetAddress.java:1377) ~[?:?]
at java.net.InetAddress.getAllByName(InetAddress.java:1305) ~[?:?]
…
- Using RPM based installation as per request (customer doesn’t want docker and offline environment)
- SELinux disabled
- Firewalld disabled for testing
- Name resolution successful between hosts
dm-in-odfe-01 opensearch]$ ping dm-in-odfe-02 -c4
PING dm-ineos-odfe-02 (10.30.0.21) 56(84) bytes of data.
64 bytes from dm-in-odfe-02 (10.30.0.21): icmp_seq=1 ttl=64 time=0.207 ms
64 bytes from dm-in-odfe-02 (10.30.0.21): icmp_seq=2 ttl=64 time=0.201 ms
64 bytes from dm-in-odfe-02 (10.30.0.21): icmp_seq=3 ttl=64 time=0.201 ms
64 bytes from dm-in-odfe-02 (10.30.0.21): icmp_seq=4 ttl=64 time=0.201 ms
Configuration:
cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.30.0.20 dm-in-odfe-01
10.30.0.21 dm-in-odfe-02
ip addr | grep inet
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
inet 10.30.0.20/28 brd 10.30.0.31 scope global noprefixroute ens192
inet6 fe80::250:56ff:fea3:e8ce/64 scope link noprefixroute
/etc/opensearch/opensearch.yml
BASE
path.data: /opensearch-data
path.logs: /var/log/opensearch
cluster.name: FPS-DMZ-ELK
node.roles: [ cluster_manager ]
node.name: dm-in-odfe-01
network.host: 10.30.0.20
discovery.seed_hosts: [“dm-in-odfe-01”, “dm-in-odfe-02”]
SECURITY
plugins.security.ssl.transport.pemcert_filepath: /etc/opensearch/certs/odfe-01.pem
plugins.security.ssl.transport.pemkey_filepath: /etc/opensearch/certs/in-odfe-01.key
plugins.security.ssl.transport.pemtrustedcas_filepath: /etc/opensearch/certs/root-ca.pem
plugins.security.ssl.http.enabled: true
plugins.security.ssl.http.pemcert_filepath: /etc/opensearch/certs/in-odfe-01.pem
plugins.security.ssl.http.pemkey_filepath: /etc/opensearch/certs/in-odfe-01.key
plugins.security.ssl.http.pemtrustedcas_filepath: /etc/opensearch/certs/root-ca.pem
plugins.security.allow_default_init_securityindex: true
plugins.security.authcz.admin_dn: “- ‘CN=GB,OU=IT,O=IN,L=,ST=FA,C=GB’”
plugins.security.nodes_dn: “- ‘CN=in-odfe-01.in.com,OU=OT,O=IN,L=GR,ST=FA,C=GB’”
plugins.security.audit.type: internal_opensearch
plugins.security.enable_snapshot_restore_privilege: true
plugins.security.restapi.roles_enabled: ["all_access", "security_rest_api_access"]
Relevant Logs or Screenshots:
/var/log/opensearch/opensearch.log
[2023-02-07T17:05:07,743][WARN ][o.o.d.SeedHostsResolver ] [dm-in-odfe-01] failed to resolve host [dm-in-odfe-02] java.net.UnknownHostException: dm-in-odfe-02
/var/log/opensearch/FPS-DMZ-ELK.log
Caused by: org.opensearch.OpenSearchSecurityException: Error while initializing http SSL layer from PEM: java.security.cert.CertificateParsingException: signed fields invalid
at org.opensearch.security.ssl.DefaultSecurityKeyStore.initHttpSSLConfig(DefaultSecurityKeyStore.java:535) ~[?:?]
at org.opensearch.security.ssl.DefaultSecurityKeyStore.initSSLConfig(DefaultSecurityKeyStore.java:262) ~[?:?]
at org.opensearch.security.ssl.DefaultSecurityKeyStore.(DefaultSecurityKeyStore.java:177) ~[?:?]
at org.opensearch.security.ssl.OpenSearchSecuritySSLPlugin.(OpenSearchSecuritySSLPlugin.java:218) ~[?:?]
at org.opensearch.security.OpenSearchSecurityPlugin.(OpenSearchSecurityPlugin.java:263) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
at org.opensearch.plugins.PluginsService.loadPlugin(PluginsService.java:782) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:731) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:533) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.plugins.PluginsService.(PluginsService.java:195) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.node.Node.(Node.java:429) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.node.Node.(Node.java:356) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.Bootstrap$5.(Bootstrap.java:242) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180) ~[opensearch-2.5.0.jar:2.5.0]
… 6 more
Caused by: java.security.cert.CertificateParsingException: signed fields invalid
at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1772) ~[?:?]
at sun.security.x509.X509CertImpl.(X509CertImpl.java:183) ~[?:?]
at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:105) ~[?:?]
at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:355) ~[?:?]
at org.opensearch.security.support.PemKeyReader.loadCertificateFromFile(PemKeyReader.java:212) ~[?:?]
at org.opensearch.security.ssl.util.CertFromFile.(CertFromFile.java:59) ~[?:?]
at org.opensearch.security.ssl.DefaultSecurityKeyStore.initHttpSSLConfig(DefaultSecurityKeyStore.java:522) ~[?:?]
at org.opensearch.security.ssl.DefaultSecurityKeyStore.initSSLConfig(DefaultSecurityKeyStore.java:262) ~[?:?]
at org.opensearch.security.ssl.DefaultSecurityKeyStore.(DefaultSecurityKeyStore.java:177) ~[?:?]
at org.opensearch.security.ssl.OpenSearchSecuritySSLPlugin.(OpenSearchSecuritySSLPlugin.java:218) ~[?:?]
at org.opensearch.security.OpenSearchSecurityPlugin.(OpenSearchSecurityPlugin.java:263) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
at org.opensearch.plugins.PluginsService.loadPlugin(PluginsService.java:782) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.plugins.PluginsService.loadBundle(PluginsService.java:731) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.plugins.PluginsService.loadBundles(PluginsService.java:533) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.plugins.PluginsService.(PluginsService.java:195) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.node.Node.(Node.java:429) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.node.Node.(Node.java:356) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.Bootstrap$5.(Bootstrap.java:242) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404) ~[opensearch-2.5.0.jar:2.5.0]
at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180) ~[opensearch-2.5.0.jar:2.5.0]
… 6 more