Bug 15511 - elasticsearch >= 8.9.0 does not work as a spotlight backend
Summary: elasticsearch >= 8.9.0 does not work as a spotlight backend
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.19.2
Hardware: x64 Linux
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-05 07:51 UTC by Matt Jolly
Modified: 2023-11-27 11:35 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Jolly 2023-11-05 07:51:42 UTC
As per this mailing list post[1], and this downstream bug[2], modern versions of Elasticsearch (>8.9.0) are not suitable for use with spotlight, failing with:


```
../../source3/rpc_server/mdssvc/mdssvc_es.c:755(mds_es_search_http_read_done)
        mds_es_search_http_read_done: json_loadb failed
```

Reported as broken against Samba 4.18.4, 4.19.2

A browse over the ES changelogs doesn't indicate any intentional changes on their end that would result in breakage, but I haven't attached a debugger or really looked at the code to work out what's wrong here.

[1] https://www.spinics.net/lists/samba/msg180245.html
[2] https://bugs.gentoo.org/916143
Comment 1 Ralph Böhme 2023-11-27 11:35:50 UTC
In a log with level 10 I see:

[2023/11/27 12:16:33, 10, pid=718906, effective(0, 0), real(0, 0), class=rpc_srv] ../../source3/rpc_server/mdssvc/mdssvc_es.c:721(mds_es_search_http_read_done)
  mds_es_search_http_read_done: Got response for search [0x562088278b30]
[2023/11/27 12:16:33, 10, pid=718906, effective(0, 0), real(0, 0), class=rpc_srv] ../../source3/rpc_server/mdssvc/mdssvc_es.c:745(mds_es_search_http_read_done)
  mds_es_search_http_read_done: JSON response:
  (null)

So it seems ES sends an empty HTTP response.

Needs closer investigation...