0

I have a basic setup of Magento & Open search.

I have been following the guide here https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/overview.html?lang=en

In the guide it is recommended to install open search so I did so following this guide: https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/

Under the quick installation section titled "Install the application" in the magento guide, there is an example command:

bin/magento setup:install \
--base-url=http://localhost/magento2ee \
--db-host=localhost \
--db-name=magento \
--db-user=magento \
--db-password=magento \
--admin-firstname=admin \
--admin-lastname=admin \
[email protected] \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=America/Chicago \
--use-rewrites=1 \
--search-engine=opensearch \
--opensearch-host=os-host.example.com \
--opensearch-port=9200 \
--opensearch-index-prefix=magento2 \
--opensearch-timeout=15

Unfortunately this doesn't work, I get the error:

Could not validate connection to OpenSearch. No alive nodes found in your cluster.

This is strange because when using docker ps I can see three nodes, one for the dashboard and two for search.

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4aaed976caf1 opensearchproject/opensearch:latest "./opensearch-docker..." 3 hours ago Up 3 hours 9200/tcp, 9300/tcp, 9600/tcp, 9650/tcp opensearch-node2
8a6e26709a6b opensearchproject/opensearch-dashboards:latest "./opensearch-dashbo..." 3 hours ago Up 3 hours 0.0.0.0:5601->5601/tcp, :::5601->5601/tcp opensearch-dashboards
31e3e15d8ae0 opensearchproject/opensearch:latest "./opensearch-docker..." 3 hours ago Up 3 hours 0.0.0.0:9200->9200/tcp, :::9200->9200/tcp, 9300/tcp, 0.0.0.0:9600->9600/tcp, :::9600->9600/tcp, 9650/tcp opensearch-node1

I tried changing the host name to localhost, 127.0.0.1, 0.0.0.0, opensearch, opensearch-node1, opensearch-node2, opensearch-cluster and some others but none of them work.

Any ideas on how to point magento to the docker cluster?

asked Jun 9, 2023 at 2:08
2
  • Where did your magento running? on docker or host computer? Commented Jun 9, 2023 at 3:01
  • magento is on host machine and open search is on docker Commented Jun 9, 2023 at 3:15

1 Answer 1

0

Please run the below command to run the opensearch

sudo systemctl enable opensearch

sudo systemctl start opensearch

Check opensearch port.

curl -X GET https://localhost:9200 -u 'admin:admin' --insecure

curl -X GET https://localhost:9200/_cat/plugins?v -u 'admin:admin' --insecure

answered Jun 9, 2023 at 8:41
1
  • This is not correct as you will see I am using a docker container. opensearch is already running and curl is successful. The question is not about how to start open search but where to point my magento instance to look for the docker container. Commented Jun 19, 2023 at 18:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.