0

I have a docker with these env

docker ps
CONTAINER ID        IMAGE                  COMMAND                  CREATED             STATUS              PORTS                                            NAMES
9c46a3807d4f        dc_php-apache          "docker-php-entrypoi…"   21 hours ago        Up 21 hours         0.0.0.0:8050->80/tcp, 0.0.0.0:9050->443/tcp      dc_php-apache_1
2f3e7a799029        mariadb:10.3           "docker-entrypoint.s…"   21 hours ago        Up 21 hours         3306/tcp                                         dc_mariadb_1
6a40a702e37b        elasticsearch:7.8.1    "/tini -- /usr/local…"   21 hours ago        Up 21 hours         0.0.0.0:9200->9200/tcp, 0.0.0.0:9300->9300/tcp   dc_elasticsearch_1

Now when I run bin/magento setup:upgrade

I'm getting Could not validate a connection to Elasticsearch. No alive nodes found in your cluster I'm probably just missing a config somewhere but I want find where, activating or not the module Magento_InventoryElasticsearch doesn't seem to have any effect.

Thanks for your assistance !

2
  • your elastic search container and php-apache container need to be on the same docker network. Check whether you can ping dc_elasticsearch_1 from dc_php-apache_1. You should specify dc_elasticsearch_1 as the elasticsearch host in your config.
    – paj
    Commented Jul 6, 2021 at 15:43
  • Actually i was just on the wrong database using a magento 2.4 docker when my database was configured for 2.3.
    – Claims
    Commented Jul 8, 2021 at 20:27

1 Answer 1

0

Please check if you have --search-engine=elasticsearch7 in your install command. Also, check what happens if you enter the URL in the browser.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.