Opensearch Dashboard is not connecting with Opensearch node

Hi All,

I am facing an issue while deploying Opensearch with helm charts in AWS EKS.

The dashboard is unable to connect with opensearch node and the opensearch node shows permission issue.

Here is the error

Dashboard pod:


{"type":"log","@timestamp":"2024-07-25T04:28:28Z","tags":["error","opensearch","data"],"pid":1,"message":"[ConnectionError]: connect ECONNREFUSED 10.0.49.84:9200"}

{"type":"log","@timestamp":"2024-07-25T04:28:31Z","tags":["error","opensearch","data"],"pid":1,"message":"[ConnectionError]: connect ECONNREFUSED 10.0.49.84:9200"}

{"type":"log","@timestamp":"2024-07-25T04:28:33Z","tags":["error","opensearch","data"],"pid":1,"message":"[ConnectionError]: connect ECONNREFUSED 10.0.49.84:9200"}

Opensearch node:


[2024-07-25T04:55:12,915][INFO ][o.o.p.PluginsService     ] [opensearch-node1] loaded plugin [opensearch-sql]
[2024-07-25T04:55:12,998][INFO ][o.o.s.OpenSearchSecurityPlugin] [opensearch-node1] Disabled https compression by default to mitigate BREACH attacks. You can enable it by setting 'http.compression: true' in opensearch.yml
[2024-07-25T04:55:13,005][INFO ][o.o.e.ExtensionsManager  ] [opensearch-node1] ExtensionsManager initialized
[2024-07-25T04:55:13,027][DEPRECATION][o.o.d.c.s.Settings       ] [opensearch-node1] [node.max_local_storage_nodes] setting was deprecated in OpenSearch and will be removed in a future release! See the breaking changes documentation for the next major version.
[2024-07-25T04:55:13,173][ERROR][o.o.b.OpenSearchUncaughtExceptionHandler] [opensearch-node1] uncaught exception in thread [main]
org.opensearch.bootstrap.StartupException: OpenSearchException[failed to bind service]; nested: AccessDeniedException[/usr/share/opensearch/data/nodes];
	at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:184) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.bootstrap.OpenSearch.execute(OpenSearch.java:171) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:104) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:138) ~[opensearch-cli-2.8.0.jar:2.8.0]
	at org.opensearch.cli.Command.main(Command.java:101) ~[opensearch-cli-2.8.0.jar:2.8.0]
	at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:137) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.bootstrap.OpenSearch.main(OpenSearch.java:103) ~[opensearch-2.8.0.jar:2.8.0]
Caused by: org.opensearch.OpenSearchException: failed to bind service
	at org.opensearch.node.Node.<init>(Node.java:1154) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.node.Node.<init>(Node.java:381) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.bootstrap.Bootstrap$5.<init>(Bootstrap.java:242) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.bootstrap.Bootstrap.setup(Bootstrap.java:242) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.bootstrap.Bootstrap.init(Bootstrap.java:404) ~[opensearch-2.8.0.jar:2.8.0]
	at org.opensearch.bootstrap.OpenSearch.init(OpenSearch.java:180) ~[opensearch-2.8.0.jar:2.8.0]
	... 6 more

Kindly help me to find the root cause of the issue. Thanks in advance

seems the OpenSearch process cannot access the directory /usr/share/opensearch/data/nodes, you can check the access permissions of that directory.

@ctgopinaath Did you use the official OpenSearch helm chart or a custom one?