Occ fulltextsearch:index fails after approx. 1500 documents with ClientResponseException

Nextcloud version (eg, 29.0.5): 29.0.6
Operating system and version (eg, Ubuntu 24.04): Docker version 19.03.11-ol on Oracle Linux Server 7.9
Apache or nginx version (eg, Apache 2.4.25): Built-in Docker Container nextcloud:29.0.6
PHP version (eg, 8.3): Built-in Docker Container nextcloud:29.0.6

The issue you are facing:
Full-text indexing runs successfully for the first approx. 1500 documents, after which a ClientResponseException occurs for each document. The index in Elasticsearch is in state green. The behavior is reproducible.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Setup Nextcloud with the following Apps: Full text search, Full text search - Elasticsearch Platform, Full text search - Files
  2. Setup Elasticsearch single node cluster
  3. Run occ fulltextsearch:test. Everythings ok.
  4. Run occ fulltextsearch:index.

The output of occ fulltextsearch:index:

Options: []
Memory: 232 MB
┌─ Indexing  ────
│ Action: fillDocument
│ Provider: Files                Account: ***REMOVED SENSITIVE VALUE***
│ Document: 5822920
│ Info: application/vnd.openxmlformats-officedocument.wordprocessingml.document
│ Title: ***REMOVED SENSITIVE VALUE***
│ Content size:
│ Chunk:    444/475
│ Progress:      2/4
└──
┌─ Results ────
│ Result:  13762/13762
│ Index: files:4305714
│ Status: fail
│ Message:
│
│
└──
┌─ Errors ────
│ Error:  23972/23972
│ Index: files:4305714
│ Exception: OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseException
│ Message: unknown error
│
│
└──
## x:first result ## c/v:prec/next result ## b:last result
## f:first error ## h/j:prec/next error ## d:delete error ## l:last error
## q:quit ## p:pause

The output of curl "http://elasticsearch:9200/_cat/indices?v":

health status index    uuid                   pri rep docs.count docs.deleted store.size pri.store.size dataset.size
green  open   my_index o5peityDQa6HsEuKd34Lcw   1   0       1498            0     14.5mb         14.5mb       14.5mb

The output of occ fulltextsearch:check:

Full text search 29.0.1
{
    "search_platform": "OCA\\FullTextSearch_Elasticsearch\\Platform\\ElasticSearchPlatform",
    "app_navigation": "1",
    "provider_indexed": "",
    "cron_err_reset": "1725979246",
    "tick_ttl": "1800",
    "collection_indexing_list": "50",
    "migration_24": "1",
    "collection_internal": "local"
}

- Search Platform:
Elasticsearch 29.0.1 (Selected)
{
    "elastic_host": [
        "http://elastic:********@elasticsearch:9200"
    ],
    "elastic_index": "my_index",
    "fields_limit": "10000",
    "es_ver_below66": "0",
    "elastic_logger_enabled": "true",
    "analyzer_tokenizer": "standard",
    "allow_self_signed_cert": "false"
}

- Content Providers:
Deck 1.13.1
[]
Files 29.0.1
{
    "files_local": "1",
    "files_external": "0",
    "files_group_folders": "1",
    "files_encrypted": "0",
    "files_federated": "0",
    "files_size": "20",
    "files_pdf": "1",
    "files_office": "1",
    "files_image": "0",
    "files_audio": "0",
    "files_chunk_size": "2"
}

The output of your Nextcloud log in Admin > Logging:

No errors occoured

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "default_phone_region": "DE",
    "allow_local_remote_servers": "true",
    "overwriteprotocol": "https",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "cloud.bfs.de"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "29.0.6.1",
    "overwrite.cli.url": "https:\/\/localhost",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "ldapIgnoreNamingRules": false,
    "maintenance": false,
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "25",
    "loglevel": 0,
    "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
    "memcache.local": "\\OC\\Memcache\\APCu",
    "skeletondirectory": "",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": "6379",
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "maintenance_window_start": "1"
}

The output of your Apache/nginx/system log in /var/log/____:

No errors occoured

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

No errors occoured

Thank you for your support
Felix

Hi!

Experiencing the exact same issue (except but for my elasticsearch index being yellow instead of green). Any advance in this?

If I query the index

curl -cacerts /etc/pki/tls/certs/elasticsearch.crt -u elastic https://elasticsearch.domain.my:9200/_cat/indices?v

I get

health status index           uuid                   pri rep docs.count docs.deleted store.size pri.store.size dataset.size
yellow open   nextcloud_index -X4LS2dSQIqksA_4O1AIjA   1   1     306166          239        1gb            1gb          1g

And every other file gets status fail, so its obviously not indexing (docs.count is not increasing).

I’m using, CentOS 7.8.2003, nginx/1.20.1, nextcloud 30.0.1 and php 8.3.8
The elasticsearch is running in a Rocky Linux 9.4 , elasticsearch version is 8.15.3

I tried with a occ fulltextsearch:reset so the index got deleted and had to go again with occ fulltextsearch:index.

It started to work again, but this time crashed even before

health status index           uuid                   pri rep docs.count docs.deleted store.size pri.store.size dataset.size
yellow open   nextcloud_index kJShrdf0QwSYjyVmKIhYcQ   1   1     304544            1    857.6mb        857.6mb      857.6mb

and the process of index is showing something like this

Memory: 446 MB
┌─ Indexing (paused) ────
│ Action: fillDocument
│ Provider: Files Account: REMOVED SENSITIVE VALUE
│ Document: 909330
│ Info: application/msword
│ Title: REMOVED SENSITIVE VALUE.doc
│ Content size: 480600
│ Chunk: 1/2
│ Progress: 13545/47080
└──
┌─ Results ────
│ Result: 304808/304808
│ Index: files:909329
│ Status: fail
│ Message:


└──
┌─ Errors ────
│ Error: 55935/55935
│ Index: files:909329
│ Exception: OCA\FullTextSearch_Elasticsearch\Vendor\Elastic\Elasticsearch\Exception\ClientResponseExcepion
│ Message: unknown error


└──
x:first result ## c/v:prec/next result ## b:last result
f:first error ## h/j:prec/next error ## d:delete error ## l:last error
q:quit ## u:unpause ## n:next step

Number of fails keeps growing as the result of each index is fail, but as Message is unknown error I don’t know what is going on.

I’ve also noticed that memory keeps growing on the index process, as it started in around 100MB and now it’s consuming around 630MB

Any help?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.