Cuando hago click en "index now" aparece este error: Couldn't index items. Check the logs for details.

Versiones instaladas:
Search API 8.x-1.3
Elasticsearch-connector 8.x-5.0-alpha1
Elasticsearch 2.4.0

Seleccioné la opción "Make this cluster default connection" como sugiere el issue #2713227 y sigue dando error

Comments

juampynr’s picture

Status: Active » Postponed (maintainer needs more info)

@mariana.romaldi@unc.edu.ar: did you actually check the logs? Unless you have disabled dblog module, there should be further info of what is going on at Admin > Reports > Recent log messages.

mariana.romaldi@unc.edu.ar’s picture

StatusFileSize
new230.52 KB

thanks for answering @juampynr

log elasticsearch cluster

cat /var/log/elasticsearch/digesto.log

[2017-09-06 08:56:13,976][INFO ][cluster.metadata         ] [digesto] [elasticsearch_index_digesto_d8_normativa] creating index, cause [api], templates [], shards [5]/[1], mappings []
[2017-09-06 08:56:14,055][INFO ][cluster.metadata         ] [digesto] [elasticsearch_index_digesto_d8_normativa] create_mapping [normativa]
[2017-09-06 08:56:14,061][INFO ][cluster.routing.allocation] [digesto] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[elasticsearch_index_digesto_d8_normativa][4], [elasticsearch_index_digesto_d8_normativa][4]] ...]).
[2017-09-06 08:56:25,561][INFO ][cluster.metadata         ] [digesto] [elasticsearch_index_digesto_d8_normativa] creating index, cause [api], templates [], shards [5]/[1], mappings []
[2017-09-06 08:56:25,629][INFO ][cluster.metadata         ] [digesto] [elasticsearch_index_digesto_d8_normativa] create_mapping [normativa]
[2017-09-06 08:56:25,634][INFO ][cluster.routing.allocation] [digesto] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[elasticsearch_index_digesto_d8_normativa][4], [elasticsearch_index_digesto_d8_normativa][4]] ...]).

attachment screenshot of recent log

zulljin’s picture

I had a similar problem, when I clicked 'Clear all indexed data' on page search index, I got this error:

{
  "error": {
    "root_cause": [
      {
        "type": "invalid_index_name_exception",
        "reason": "Invalid index name [elasticsearch_index_ID_site_nodes], must be lowercase",
        "index_uuid": "_na_",
        "index": "elasticsearch_index_ID_site_nodes"
      }
    ],
    "type": "invalid_index_name_exception",
    "reason": "Invalid index name [elasticsearch_index_ID_site_nodes], must be lowercase",
    "index_uuid": "_na_",
    "index": "elasticsearch_index_ID_site_nodes"
  },
  "status": 400
}

My DB name - ID_site, when i changed to id_site, everything worked fine. If you have capital letters in your database name, simply change the name using lowercase letters.

zulljin’s picture

Status: Postponed (maintainer needs more info) » Needs review
skek’s picture

@Zulljin,

Thank you for the input.
Can you please apply the attached patch and check again?
It seems we need to lower case the index name because of Elasticsearch server requirement.

zulljin’s picture

Status: Needs review » Fixed

skek
Yes, patch has fixed this issue, thanks.

skek’s picture

Status: Fixed » Reviewed & tested by the community

@Zulljin,

We should mark the issues to RTBC when checked and confirm it is working.
We are marking it with Fixed, when it has been committed to the dev version.

@mariana.romaldi@unc.edu.ar
Most probably your problem is connected with Elasticsearch server version.
This module has been designed to work with 5.x for Elasticsearch server but you are running 2.
Can you please check it with 5.x?

  • skek authored 2007754 on 8.x-5.x
    Issue #2906783 by skek, Zulljin, juampynr: Couldn't index items. Check...
skek’s picture

Status: Reviewed & tested by the community » Fixed

@mariana.romaldi@unc.edu.ar please fill free to reopen it but I think the problem here is tightly connected with your Elasticsearch version.

zulljin’s picture

skek,
Maybe necessary added logs in watchdog when happening this or similar errors? Because it is very difficult debugging without logs.

The logic is: get errors from ElasticSearch and add them to watchdog Drupal.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

andrezstar’s picture

Not working for me after applying the patch