# AdvancedSearch/OpenSearch: No alive nodes found in your cluster

**URL:** <https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134>\
**Category:** Shopware 6 (German)\
**Created:** [19. Dezember 2024 um 06:37 UTC](https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134 "2024-12-19T06:37:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)\
**Post date:** [19. Dezember 2024 um 06:37 UTC](https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134/1 "2024-12-19T06:37:55Z")

</div>

Hallo. Ich hänge hier leider schon seit Stunden fest. Sobald ich OpenSearch in der .env Datei aktivier, erhalte ich im Listing folgenden Fehler:  
Error: **No alive nodes found in your cluster** at OpenSearch/ConnectionPool/StaticNoPingConnectionPool.php (line 68)

OS läuft und die Konfig sollte auch passen. Hoster ist MaxCluster. Hat jemand eine Idee?

```auto
'OPENSEARCH_URL' => 'http://127.0.0.1:9500',
  'ES_MULTILINGUAL_INDEX' => '0',
  'SHOPWARE_ES_HOSTS' => 'http://127.0.0.1:9500',
  'SHOPWARE_ES_ENABLED' => '1',
  'SHOPWARE_ES_INDEXING_ENABLED' => '1',
  'SHOPWARE_ES_INDEX_PREFIX' => 'sw',
  'SHOPWARE_ES_THROW_EXCEPTION' => '1',

```

```auto
18:37:45 INFO [elasticsearch] curl -XGET 'http://127.0.0.1:9500/_cluster/health?pretty=true'
18:37:45 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" => 30,
    "active_shards" => 30,
    "relocating_shards" => 0,
    "initializing_shards" => 0,
    "unassigned_shards" => 81,
    "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" => 27.027027027027
  ],
  "method" => "GET",
  "uri" => "http://127.0.0.1:9500/_cluster/health",
  "port" => 9500,
  "HTTP code" => 200,
  "duration" => 0.002012
]
+-----------------+-----------+
| Name | Status |
+-----------------+-----------+
| Cluster Status | yellow |
| Available Nodes | 1 |
| Indexing | completed |
+-----------------+-----------+

```

---

<div class="post-metadata">

**Author:** ![jeje1](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jeje1](https://forum.shopware.com/u/jeje1)\
**Post date:** [19. Dezember 2024 um 08:20 UTC](https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134/2 "2024-12-19T08:20:02Z")

</div>

Hi, vermutlich sehr unwahrscheinlich aber vll kannst du mal den ES\_HOST ohne http:// angeben.  
‚SHOPWARE\_ES\_HOSTS‘ =\> ‚127.0.0.1:9500‘

> **[Host Configuration | Elasticsearch-PHP \[8.17\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/client/php-api/current/host-config.html#inline-host-config)**

Alternativ 127.0.0.1 durch localhost ersetzen, so hab ich es in meiner Konfiguration.  
Dürfte aber eigentlich auch keinen Unterschied machen.

---

<div class="post-metadata">

**Author:** ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)\
**Post date:** [19. Dezember 2024 um 13:10 UTC](https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134/4 "2024-12-19T13:10:10Z")

</div>

Danke für dein Feedback. Habe ich alles schon probiert. Leider ohne Erfolg.

---

<div class="post-metadata">

**Author:** ![jeje1](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jeje1](https://forum.shopware.com/u/jeje1)\
**Post date:** [19. Dezember 2024 um 16:49 UTC](https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134/5 "2024-12-19T16:49:43Z")

</div>

und elasticsearch.yaml ist auch vorhanden? mit dem Inhalt

```auto
elasticsearch:
    hosts: "%env(string:OPENSEARCH_URL)%"

```

Und du hast auch nicht zufällig eine .env.local.php oder irgend eine andere Datei, die vll den Host/Port verändert?

Die shopware cli-Befehle bezüglich ElasticSearch liefern keine explizite Meldung?

Elasticsearch version passt auch?  
Requirements  
Opensearch \>= 1.0 or Elasticsearch \>= 7.8  
Running message queue workers in background

Ansonsten auch mal hier bisschen rumprobieren, kennst du aber sicher schon alles:

> **[Debugging Elasticsearch | Shopware Documentation](https://developer.shopware.com/docs/guides/hosting/infrastructure/elasticsearch/elasticsearch-debugging.html)**
>
> Documentation for Shopware developers

Wenns ne Testumgebung ist mal alle Plugins deaktivieren, hatte damals auch mit einem Plugin ein Problem.

Normalerweise sollte durch ein index:rebuild bzw. reset und anschließendem cache:clear alles klappen.

Ich würd auch mal den Port auf 9200 ändern bzw. elasticsearch komplett neu installieren und erstmal nichts vom Standard abweichend einstellen, viel Erfolg bei der Suche 🙂

---

<div class="post-metadata">

**Author:** ![\_MikeB](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/_mikeb/32/7856_2.png) [@\_MikeB](https://forum.shopware.com/u/_MikeB)\
**Post date:** [6. Januar 2025 um 08:58 UTC](https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134/6 "2025-01-06T08:58:27Z")

</div>

Hi @jeje1 .

Danke für dein Feedback und frohes neues Jahr! Ja die elasticsearch.yaml ist vorhanden. Ebenso die .env.local.php.

```auto
'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:

```auto
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:

```auto
 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.

```auto
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

---

<div class="post-metadata">

**Author:** ![jeje1](https://avatars.discourse-cdn.com/v4/letter/j/0ea827/32.png) [@jeje1](https://forum.shopware.com/u/jeje1)\
**Post date:** [6. Januar 2025 um 09:21 UTC](https://forum.shopware.com/t/advancedsearch-opensearch-no-alive-nodes-found-in-your-cluster/106134/7 "2025-01-06T09:21:29Z")

</div>

Also mir fällt gerade noch eine Sache ein. Dazu solltest du aber eigentlich Hinweise/Fehlermeldungen in den Logs irgendwo finden:

## Nach einem elasticsearch update war plötzlich eine Authentifizierung notwendig und da elastic auf localhost läuft und ich keine entsprechende Konfiguration seitens Shopware gefunden hatte, hatte ich mich auf die Suche gemacht, wie ich die Authentifizierung von elastic entfernen kann. Ich kann mich an diesen Beitrag erinnern, weiß aber nicht mehr genau ob der mir weitergeholfen hatte: [Disable authentification for elasticsearch - #6 by Ines\_ZAYANI - Elasticsearch - Discuss the Elastic Stack](https://discuss.elastic.co/t/disable-authentification-for-elasticsearch/304862/6)

ansonsten wie gesagt würde ich an deiner Stelle elastic erstmal NUR auf 9200 testen, konfigurieren und wenn alles klappt, dann auf 9500 switchen.

Es kann auch sein, dass eine Firewall den Port 9500 blockt, irgend ein user nicht ausreichend Rechte besitzt etc..
