Moin!
Ich versuche mich gerade auf meiner Testing-Umgebung an Elasticsearch. Dieses ist nach Doku eingerichtet und ich habe (zum Testen) einen Node laufen, was der folgende Befehl mir bestätigt:
root@SERVER.TLD:/# curl -ku elastic:$ELASTIC_PASSWORD https://localhost:9200/_cat/nodes
172.19.0.2 26 90 7 0.30 0.39 0.50 cdfhilmrstw * 73eea3ec62ef
Also habe ich die .env nach Anleitung angepasst, aber ich bekomme keine Verbindung:
root@SERVER.TLD:/# bin/console es:index
0 [>---------------------------] < 1 sec 48.5 MiB
In StaticNoPingConnectionPool.php line 64:
[Elasticsearch\Common\Exceptions\NoNodesAvailableException]
No alive nodes found in your cluster
Exception trace:
at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/ConnectionPool/StaticNoPingConnectionPool.php:64
Elasticsearch\ConnectionPool\StaticNoPingConnectionPool->nextConnection() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php:82
Elasticsearch\Transport->getConnection() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php:99
Elasticsearch\Transport->performRequest() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:297
Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/react/promise/src/FulfilledPromise.php:28
React\Promise\FulfilledPromise->then() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/ezimuel/ringphp/src/Future/CompletedFutureValue.php:65
GuzzleHttp\Ring\Future\CompletedFutureValue->then() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/ezimuel/ringphp/src/Core.php:341
GuzzleHttp\Ring\Core::proxy() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:345
Elasticsearch\Connections\Connection->Elasticsearch\Connections\{closure}() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:241
Elasticsearch\Connections\Connection->performRequest() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Transport.php:110
Elasticsearch\Transport->performRequest() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Namespaces/BooleanRequestWrapper.php:43
Elasticsearch\Namespaces\BooleanRequestWrapper::performRequest() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Client.php:1109
Elasticsearch\Client->ping() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/shopware/elasticsearch/Framework/ElasticsearchHelper.php:108
Shopware\Elasticsearch\Framework\ElasticsearchHelper->allowIndexing() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/shopware/elasticsearch/Framework/Indexing/ElasticsearchIndexer.php:98
Shopware\Elasticsearch\Framework\Indexing\ElasticsearchIndexer->iterate() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/shopware/elasticsearch/Framework/Command/ElasticsearchIndexingCommand.php:58
Shopware\Elasticsearch\Framework\Command\ElasticsearchIndexingCommand->execute() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/symfony/console/Application.php:1058
Symfony\Component\Console\Application->doRunCommand() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/symfony/framework-bundle/Console/Application.php:96
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/symfony/framework-bundle/Console/Application.php:82
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/SERVER.TLD/testing.SERVER.TLD/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at /var/www/SERVER.TLD/testing.SERVER.TLD/bin/console:77
es:index [--no-queue]
Ein Verbindungsproblem also. Meine .env sieht so aus:
SHOPWARE_ES_HOSTS="https://USER:PASSWORD@localhost:9200"
SHOPWARE_ES_ENABLED="0"
SHOPWARE_ES_INDEXING_ENABLED="1"
SHOPWARE_ES_INDEX_PREFIX="sw6"
SHOPWARE_ES_THROW_EXCEPTION=1
Nutzername und Passwort sind validiert. Nun ist guter Rat teuer - hat jemand eine Idee?
Gruß
Pascal