Open djalal opened 3 years ago
Hello,
Thanks for opening an issue. Can you tell us which exact version you are using ?
on master, I tried to reproduce your issue, without success.
With APP_INDEX_HOSTS=elasticsearch:9200
in my .env
file:
$ APP_ENV=dev run php bin/console pim:installer:db --catalog src/Akeneo/Platform/Bundle/InstallerBundle/Resources/fixtures/minimal
array(3) {
["scheme"]=>
string(4) "http"
["host"]=>
string(13) "elasticsearch"
["port"]=>
int(9200)
}
Prepare database schema
Dropped database `akeneo_pim` for connection named default
Created database `akeneo_pim` for connection named default
// ...
:heavy_check_mark:
With APP_INDEX_HOSTS=foo:9200
in my .env
file:
$ APP_ENV=dev run php bin/console pim:installer:db --catalog src/Akeneo/Platform/Bundle/InstallerBundle/Resources/fixtures/minimal
array(3) {
["scheme"]=>
string(4) "http"
["host"]=>
string(3) "foo"
["port"]=>
int(9200)
}
// ...
Reset elasticsearch indexes
In StaticNoPingConnectionPool.php line 64:
No alive nodes found in your cluster
:heavy_check_mark:
:bug: I'm reporting a Bug :bug:
APP_INDEX_HOSTS setting is ignored during "pim:installer:db" command.
Use case
We try to run the installer command like this:
Encountered behavior
The command ends with a fatal error " No alive nodes found in your cluster", like below:
Troubleshooting
with a simple var_dump() inside "__construct()" method in ./vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php, we can see the APP_INDEX_HOSTS is ignored:
Same env. var with another command is working well (the double displayed var is not a typo, its from the software):