Home > database >  Magento 2.4.4 / MACOS 10.13 High Sierra / MAMP - Could not validate a connection to Elasticsearch. N
Magento 2.4.4 / MACOS 10.13 High Sierra / MAMP - Could not validate a connection to Elasticsearch. N

Time:10-28

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 \
[email protected] \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=USD \
--timezone=Europe/Belgrade \
--use-rewrites=1 \
--elasticsearch-host=elasticsearch

And I get this

Image of the error

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"
}

elasticsearch installation

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.

Error

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

CodePudding user response:

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

  • Related