Dear all,
I installed a three-node Opensearch cluster and Opensearch Dashboards with tar. Since there is no service file like in a Debian package or RPM I have to start it with …/bin/opensearch. I would like to create a service file manually because I don’t want Opensearch to stop every time I log out of the VMs.
For this I use this documentation:
After some modification of the paths and of permissions and also creating the file systemd-entrypoint I managed to start Opensearch on every node with
systemctl start opensearch.service
with my created service file. The problem is that the user and group “opensearch” as in the documentation do not exist. (I am instead using the build-in-user “admin” for example to log into Opensearch Dashboards). In each service file I had to write my hostname as user, otherwise it does not start. But with my hostname as user the nodes cannot see each other and the cluster formation fails.
My question would be: How can I build an Opensearch user for the cluster that is recognised by the service file?
The logs say e.g.
systemd-entrypoint[5020]: [2022-07-29T13:58:43,114][WARN ][o.o.c.c.ClusterFormationFailureHelper] [node1] cluster-manager
on node 1 and
… systemd-entrypoint[11754]: [2022-07-29T13:17:34,552][INFO ][o.o.s.c.ConfigurationRepository] [node2] Node ‘node2’ initialized
… systemd[1]: opensearch.service: Start operation timed out. Terminating.
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,573][INFO ][o.o.s.a.r.AuditMessageRouter] [node2] Closing AuditMessageRouter
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,574][INFO ][o.o.n.Node ] [node2] stopping …
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,575][INFO ][o.o.s.a.s.SinkProvider ] [node2] Closing DebugSink
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,585][INFO ][o.o.c.c.FollowersChecker ] [node2] FollowerChecker{discoveryNode={node1}…
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,586][INFO ][o.o.c.c.FollowersChecker ] [node2] FollowerChecker{discoveryNode={node1}…
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,614][INFO ][o.o.n.Node ] [node2] stopped
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,615][INFO ][o.o.n.Node ] [node2] closing …
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,620][INFO ][o.o.s.a.i.AuditLogImpl ] [node2] Closing AuditLogImpl
… systemd-entrypoint[11754]: [2022-07-29T13:18:09,626][INFO ][o.o.n.Node ] [node2] closed
… systemd[1]: opensearch.service: Failed with result ‘timeout’.
on node 2.
Maybe it is not a user problem but something else.
I would be very thankful for a respond.