Problem/Motivation
Hello, I recently upgraded from Elasticsearch Connector 7.0-alpha to 8.0.0-alpha3, and now I am facing an issue where the connection to Elasticsearch fails, preventing indexing from working. Previously, with Elasticsearch Connector 7.0-alpha and Elasticsearch 7.13.0 (Docker), everything was working fine: the connection was established, and indexing was successful. After upgrading to Elasticsearch Connector 8.0.0-alpha3 and Elasticsearch 8.15.5 (Docker), I now get the following error when running drush sapi-i:
> [error] Retry 0: Idle timeout reached for "http://elasticsearch:9200/index_1/_bulk".
> [error] Elastic\Transport\Exception\NoNodeAvailableException: No alive nodes. All the 1 nodes seem to be down. in Elastic\Transport\NodePool\SimpleNodePool->nextNode() (line 77 of /home/appli/drupal/vendor/elastic/transport/src/NodePool/SimpleNodePool.php).
> [notice] An error occurred during indexing on Index 1: No alive nodes. All the 1 nodes seem to be down. Environment Details
Environment Details:
- Previous working setup:
- Elasticsearch Connector 7.0-alpha
- Elasticsearch 7.13.0 (Docker)
- Current setup (failing):
- Elasticsearch Connector 8.0.0-alpha3
- Elasticsearch 8.15.5 (Docker)
- Drupal version: 11
- PHP version: 8.3
- Search API module version : 1.37.0
Docker Setup:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.5
environment:
- discovery.type=single-node
- cluster.name=docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
- xpack.security.http.ssl.enabled=false
Elasticsearch Connector Cluster Config:
uuid: 5c37f1be-2ff5-4dc9-923d-6f0ba52fa122
status: '1'
cluster_id: cluster
name: Cluster
url: 'http://elasticsearch:9200'
options:
multiple_nodes_connection: false
use_authentication: 0
authentication_type: Basic
username: ''
password: ''
timeout: '3'
Search API Server Config:
uuid: e21e0193-2c05-4098-8077-fe8f013e659a
langcode: fr-FR
status: true
dependencies:
module:
- elasticsearch_connector
id: server_elasticsearch
name: 'Server ElasticSearch'
backend: elasticsearch
backend_config:
connector: standard
connector_config:
url: 'http://elasticsearch:9200'
enable_debug_logging: true
advanced:
fuzziness: auto
prefix: ''
suffix: ''
synonyms:
- ''
Cluster Status & Issue Debugging:
Running curl -X GET "http://elasticsearch:9200/_cluster/health?pretty"
returns:
{
"cluster_name": "docker-cluster",
"status": "red",
"number_of_nodes": 1,
"number_of_data_nodes": 1,
"active_primary_shards": 0,
"active_shards": 0,
"unassigned_shards": 4,
"active_shards_percent_as_number": 0.0
}
</code></p>
<p>Running curl -X GET "http://elasticsearch:9200": </p>
<p><code>
{
"name" : "49f38a604a8e",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "voBwOO8BTHSWZIS_9AQUuw",
"version" : {
"number" : "8.15.5",
"build_flavor" : "default",
"build_type" : "docker",
"build_hash" : "b10896bcfe167cce44a84ba2771d101fb596d40d",
"build_date" : "2024-11-21T22:06:13.985834967Z",
"build_snapshot" : false,
"lucene_version" : "9.11.1",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
Running curl -X GET "http://elasticsearch:9200/_cat/shards?v"
shows that all shards are UNASSIGNED
.