Could not add document

Hi @cdwmhcc! Very mysterious. Can you share the logs for your instance?

Is it convenient to send it to your mailbox? I can give you the ssh user and password of the server. thank you for your help.

You can share the logs here. No need to give access to your machine.

If logs are too big, please share them on and link them here.

Thank you for your reply.

Would be easier if you can just paste the logs instead of a zip file.

It's difficult to tell what the root of the problem is, but I'm seeing a lot of messages like this:

app-server.log.5:[2021-01-02T14:54:16.294+00:00][3061][2494][app-server][INFO]: [ActiveJob] [Work::Engine::IndexAdder] [8a431a59b5ec1284506606197ea0a1e4355c1a2e] [db_lock] [document_type:field_mapping:5fefac1a8fec75fe5d48fab5] Failed to acquire the lock

If this is an empty instance, I recommend deleting the .ent-search-* Elasticsearch indices and restarting Enterprise Search to reinstall. Otherwise, you could try clearing out the lock index (.ent-search-db-lock-*) to see if that frees up the workers.

I don't know which log file to upload, too many. So I packed them all together.

I tried it in centos 8.2 and centos 7.6, both of which have the same problem. The version is 7.10.1.
They are all freshly installed without any old data.

If you don't mind trying another fresh install, it would be helpful to set log_level: debug in config/enterprise-search.yml first and then share those logs as well.

This is interesting. Looks like the problem is here:

[2021-01-05T20:55:03.497+00:00][13526][2490][es][DEBUG]: [ActiveJob] [Work::Engine::IndexAdder] [dc3770341d38b8b5c12598d3e4c795da64d47c86] {
  "request": {
    "url": "",
    "method": "get",
    "headers": {
      "User-Agent": "Faraday v0.15.2",
      "Authorization": "[FILTERED]",
      "Content-Type": "application/json"
    "params": null,
    "body": null
  "exception": "/es/www/wwwroot/server/enterprise-search/lib/war/app/middleware/request_logging_middleware.class:44: connect timed out (Faraday::TimeoutError)\n",
  "duration": 30642.6,
  "stack": [
    "app/models/cluster.class:190:in `block in is_mapping_consistent?'",

From what I can tell, the URL is incorrect since it shouldn't include the port 9200. The other requests use correctly.

What are you using for your setting? Can you share your enterprise-search.yml file?

I would try including the port explicitly, something like:

The good news is this bug looks like it's already fixed (accidentally) and will be in the next release.

Hm, I'm surprised that it worked in 7.10.0. Were you able to try with

Wow, this is crazy, it works! Thank you very much for your help, haha.

Glad to hear it! No problem.

How to run in the background like elasticsearch?

/bin/elasticsearch -d

ENT_SEARCH_DEFAULT_PASSWORD=xxxxxxx bin/enterprise-search

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