Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
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?
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/*
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
Many thanks again for your time and support
I’m not sure where did you get this link but correct one is https://artifacts.opensearch.org/releases/bundle/opensearch/2.5.0/opensearch-2.5.0-linux-x64.tar.gz 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.
I give you a feedback shortly.
Many thanks again