Stuck on first start

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
CentOS 7.9
OpenSearch 2.5.

Describe the issue:
I am trying to install OpenSearch to use it as a search engine on Magento.
I attempted to follow the installation guide.
I installed Java JDK 1.8.
I created an OpenSearch user.
I created directories /var/log and /var/lib for the files and gave full access to these directories.

When I launch the application with the command
sudo -u opensearch /usr/share/opensearch/bin/opensearch

I get a lot of errors like:
org.opensearch.bootstrap.StartupException: java.lang.IllegalStateException: Unable to access ‘path.logs’ (/var/log/opensearch)

Caused by: java.nio.file.AccessDeniedException: /var/log/opensearch
java.lang.IllegalStateException: Unable to access ‘path.logs’ (/var/log/opensearch)

I also get the error:
[2024-01-19T13:46:27,021][ERROR][o.o.s.c.ConfigurationLoaderSecurity7] [node-1] Exception while retrieving configuration for [INTERNALUSERS, ACTIONGROUPS, CONFIG, ROLES, ROLESMAPPING, TENANTS, NODESDN, WHITELIST, ALLOWLIST, AUDIT] (index=.opendistro_security)
org.opensearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];

I have been on this for 2 days and I don’t know what to look at.
Could someone please give me a hint?

Many thanks in advance for your help and support.



Relevant Logs or Screenshots:

@turboclick Could you share a link to the documentation that you’ve followed?

1 Like

It’s probably a shame to me but i followed chatgpt instructions

I asked to chatgpt to create a list of all command that i typed and that’s

tar -xzvf opensearch-2.5.0-linux-x64.tar.gz
sudo mv opensearch-2.5.0 /usr/share/opensearch
sudo adduser opensearch --system --no-create-home
sudo chown -R opensearch:opensearch /usr/share/opensearch
sudo chmod -R 755 /usr/share/opensearch
sudo mkdir -p /var/log/opensearch
sudo chown -R opensearch:opensearch /var/log/opensearch
sudo mkdir -p /var/lib/opensearch
sudo chown -R opensearch:opensearch /var/lib/opensearch
sudo nano /etc/systemd/system/opensearch.service
sudo systemctl daemon-reload
sudo systemctl start opensearch
sudo systemctl enable opensearch
sudo systemctl status opensearch

#for certificate creation

sudo mkdir -p /etc/opensearch/certs
sudo cp /etc/letsencrypt/live/votre_domaine/fullchain.pem /etc/opensearch/certs/
sudo cp /etc/letsencrypt/live/votre_domaine/privkey.pem /etc/opensearch/certs/

sudo chown -R opensearch:opensearch /etc/opensearch/certs
sudo chmod 700 /etc/opensearch/certs
sudo chmod 600 /etc/opensearch/certs/*

#for opensearch.yml /etc/opensearch/certs/fullchain.pem /etc/opensearch/certs/privkey.pem /etc/opensearch/certs/fullchain.pem true /etc/opensearch/certs/fullchain.pem /etc/opensearch/certs/privkey.pem /etc/opensearch/certs/fullchain.pem

that’s it i think.
if you think i need to restart installation from scratch and if you have a better solution, i can do it :slight_smile:

Many thanks again for your time and support

I’m not sure where did you get this link but correct one is as per OS documentation.

Please use official OpenSearch documentation to install OpenSearch.
Also, version 2.5 is quite old. Please consider using the latest version 2.11.1.

Many thanks to you.
I will try probably today or tomorrow and i will give you a feedback.
You’re right Opensearch 2.5 is a little bit old but it’s the release recommended by Magento so i don’t know if i can use a newer version.

Magento Prerequesites

I give you a feedback shortly.

Many thanks again :slight_smile: