Hi @jeje1 .
Danke für dein Feedback und frohes neues Jahr! Ja die elasticsearch.yaml ist vorhanden. Ebenso die .env.local.php.
'OPENSEARCH_URL' => 'http://localhost:9500',
'ES_MULTILINGUAL_INDEX' => '0',
'SHOPWARE_ES_HOSTS' => 'http://localhost:9500',
'SHOPWARE_ES_ENABLED' => '1',
'SHOPWARE_ES_INDEXING_ENABLED' => '1',
'SHOPWARE_ES_INDEX_PREFIX' => 'sw',
'SHOPWARE_ES_THROW_EXCEPTION' => '1',
php bin/console es:status gibt mir folgendes zurück:
08:50:37 DEBUG [elasticsearch] Request Body
[
null
]
08:50:37 INFO [elasticsearch] Request Success:
[
"method" => "HEAD",
"uri" => "http://localhost/",
"port" => 9500,
"headers" => [
"Host" => [
"localhost"
],
"Content-Type" => [
"application/json"
],
"Accept" => [
"application/json"
],
"User-Agent" => [
"opensearch-php/2.3.1 (Linux 5.15.0-94-generic; PHP 8.2.26)"
]
],
"HTTP code" => 200,
"duration" => 0.000949
]
08:50:37 DEBUG [elasticsearch] Response
[
[]
]
08:50:37 INFO [elasticsearch] curl -XHEAD 'http://localhost/?pretty=true'
08:50:37 DEBUG [elasticsearch] Response:
[
"response" => [],
"method" => "HEAD",
"uri" => "http://localhost/",
"port" => 9500,
"HTTP code" => 200,
"duration" => 0.000949
]
08:50:37 DEBUG [elasticsearch] Request Body
[
null
]
08:50:37 INFO [elasticsearch] Request Success:
[
"method" => "GET",
"uri" => "http://localhost:9500/_cluster/health",
"port" => 9500,
"headers" => [
"Host" => [
"localhost"
],
"Content-Type" => [
"application/json"
],
"Accept" => [
"application/json"
],
"User-Agent" => [
"opensearch-php/2.3.1 (Linux 5.15.0-94-generic; PHP 8.2.26)"
]
],
"HTTP code" => 200,
"duration" => 0.000701
]
08:50:37 DEBUG [elasticsearch] Response
[
[
"cluster_name" => "opensearch_9500",
"status" => "yellow",
"timed_out" => false,
"number_of_nodes" => 1,
"number_of_data_nodes" => 1,
"discovered_master" => true,
"discovered_cluster_manager" => true,
"active_primary_shards" => 48,
"active_shards" => 48,
"relocating_shards" => 0,
"initializing_shards" => 0,
"unassigned_shards" => 135,
"delayed_unassigned_shards" => 0,
"number_of_pending_tasks" => 0,
"number_of_in_flight_fetch" => 0,
"task_max_waiting_in_queue_millis" => 0,
"active_shards_percent_as_number" => 26.229508196721
]
]
08:50:37 INFO [elasticsearch] curl -XGET 'http://localhost:9500/_cluster/health?pretty=true'
08:50:37 DEBUG [elasticsearch] Response:
[
"response" => [
"cluster_name" => "opensearch_9500",
"status" => "yellow",
"timed_out" => false,
"number_of_nodes" => 1,
"number_of_data_nodes" => 1,
"discovered_master" => true,
"discovered_cluster_manager" => true,
"active_primary_shards" => 48,
"active_shards" => 48,
"relocating_shards" => 0,
"initializing_shards" => 0,
"unassigned_shards" => 135,
"delayed_unassigned_shards" => 0,
"number_of_pending_tasks" => 0,
"number_of_in_flight_fetch" => 0,
"task_max_waiting_in_queue_millis" => 0,
"active_shards_percent_as_number" => 26.229508196721
],
"method" => "GET",
"uri" => "http://localhost:9500/_cluster/health",
"port" => 9500,
"HTTP code" => 200,
"duration" => 0.000701
]
+-----------------+-----------+
| Name | Status |
+-----------------+-----------+
| Cluster Status | yellow |
| Available Nodes | 1 |
| Indexing | completed |
+-----------------+-----------+
Sieht für mich alles erst einmal korrekt aus. Oder? Dennoch erhalte ich den Fehler No alive nodes found in your cluster wenn ich z. B. php bin/console es:admin:test sofa aufrufe.
php bin/console es:index läuft korrekt durch:
40066 [============================] 6 secs 60.5 MiB
[INFO] default/es-indexing: 60.50 MiB - 6770 ms
Bin ratlos. Es sieht fast so aus, als würde er die Portnummer an einer anderen Stelle nicht korrekt verwenden. Wenn ich in der env auf localhost:9200 ändere und dann es:status ausführe, erhalte ich direkt den No alive nodes Fehler…
In Klasse StaticNoPingConnectionPool liefert $this->connections ein leeres Array zurück. Was dann zum besagten Fehler führt.
public function nextConnection(bool $force = false): ConnectionInterface
{
$total = count($this->connections);
Auch taucht aktuell die Option Advanced Search im Admin nicht mehr auf. Bezahlplan ist vorhanden. Hatte zeitweise funktioniert.
Gruß Mike