Magento 2.4.4 / MACOS 10.13 High Sierra / MAMP - Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

w9apscun  于 2022-10-22  发布在  Mac
关注(0)|答案(1)|浏览(190)

now when I fixed the MySQL problem with Magento 2 and MAMP I got a new problem trying to install Magento 2 via the command line
The command I run for installation

php -d memory_limit=-1 bin/magento setup:install \
--base-url=http://localhost/magento2_learning_codilar \
--db-host=localhost \
--db-name=magento2_learning_codilar \
--db-user=root \
--db-password=root \
--admin-firstname=Stefan \
--admin-lastname=Momcilovic \
--admin-email=office@stefan-momcilovic.com \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=Europe/Belgrade \
--use-rewrites=1 \
--elasticsearch-host=elasticsearch

And I get this

But I have got elastic search installed I checked with the command

curl -X GET 'http://127.0.0.1:9200'

And I get a response

{
  "name" : "Stefans-MacBook-Pro.local",
  "cluster_name" : "elasticsearch_stefanmomcilovic",
  "cluster_uuid" : "I06MWrU8TnSIacw9SGw3-A",
  "version" : {
    "number" : "7.17.4",
    "build_flavor" : "default",
    "build_type" : "tar",
    "build_hash" : "79878662c54c886ae89206c685d9f1051a9d6411",
    "build_date" : "2022-05-18T18:04:20.964345128Z",
    "build_snapshot" : false,
    "lucene_version" : "8.11.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

So now can someone explain to me what is the problem I also tried to run this command to disable elastic search and try installation again

php bin/magento module:disable {Magento_Elasticsearch,Magento_InventoryElasticsearch,Magento_Elasticsearch6,Magento_Elasticsearch7}

But I also got an error that the elastic search module isn't enabled and installation cannot proceed further.

So now can anyone help me fix this, what is the problem I don't understand?

nx7onnlm

nx7onnlm1#

I just tried to install it all over again Magento from composer delete this old one and now it works it installed successfully I don't know what is happening but ok now it works

相关问题