Seafile 9.0.4 with Elasticsearch

Hi everyone!

I have a problem with my Seafile Server and Elasticsearch because I have upgraded it from version 8 to 9. Because of this I think we know all that elasticsearch is now operating in a seperate docker-image. I followed the instructions from the Seafile-Manual site during the upgrade proccess. The Seafile-Server works fine with no errors or problems, but Elasticsearch don´t run correctly. When I search the Elasticsearch image over “docker ps” I can see the image and it´s running. But when I try to Update the Search index with “./pro/pro.py search --update” in my Seafile main directory I get an error message:

[ERROR] seafes:158 start_index_local: Index process init error: RequestError(400, ‘action_request_validation_exception’, ‘Validation Failed: 1: mapping type is missing;’).

When I try to search a file in the webbrowser it shows me only a loading circle.
Maybe there are some other error logs, where we can see the error more detailed?

I could imagine that I have to create an index with 7.x compatible mappings (under the Seafile Manual Site → Upgrade Seafile Server → Upgrade notes for 9.0.x → Method two,reindex the existing data)
This step I didn´t do until now because I don´t know how I can do this. (I’m more of a Windows expert :wink: )
I tryed to search the error on google but I found nothing.

My entry for elasticsearch in seafevents.conf:

[INDEX FILES]
interval = 1m
external_es_server = true
es_host = 127.0.0.1 (runs on the same server as seafile)
es_port = 9200

I hope you can help me with this annoying thing.

Greetings from germany!

Marcel

Had the same issue. What help was a solution somebody suggested:

“I installed ALL pip requirements in both users: root and seafile. This helped and is now working.”

Hi!

I saw this step already on similar issues at this forum. I tried this out but that didn´t help. :frowning:

Greetings!

Marcel

AFAICT this needs to be the entry name in your docker-compose.yml. By default this should be elasticsearch.

I searched for that docker-compose.yml over mlocate from my main directory, but I can´t find any file named so. Are you sure that this file is needed? Or in which directory I could find this file maybe?

Seafile uses docker-compose since version 7.0 to install Seafile with multiple Docker containers. I was assuming you were following the official documentation for your installation.
https://manual.seafile.com/docker/pro-edition/deploy_seafile_pro_with_docker/

If you are not using docker-compose, how do you start multiple containers with docker? Manually or via systemd-units?

Yes you´re right I´m starting my containers from systemd automatically (there´s another container for OnlyOffice). I didn´t follow the manual “Deploy Seafile pro with docker” but the manual “Installation of Seafile Server Professional Edition”.

Maybe that´s why I haven´t found any docker-compose directories or files. Because Docker-compose isn´t a requirement for this installation.

This command should provide the IP address of your Elasticsearch container:

docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id

It shows me the IP 172.17.0.2. When I set this IP in my seafevents.conf and clear the index with “./pro/pro.py search --clear” then seafile can´t establish any connection to the elasticsearch server. With 127.0.0.1 the results looks much better… And when I try to search files, I think it´s clear: It´s not possible.