Elasticsearch.pid does not exist after upgrade to 10 version


I have a big problem after upgrade to Seafile Server Pro version 10 from version 9. I followed these instructions from the manual Upgrade notes for 10.0.x - Seafile Admin Manual After upgrade all is OK except elasticsearch. In controller.log I see many messages:
2023-08-15 23:21:12 seafile-controller.c(97): spawn_process: /opt/seafile/seafile-pro-server-10.0.7/pro/elasticsearch/bin/elasticsearch -Epath.logs=/opt/seafile/logs -Epath.data=/opt/seafile/pro-data/search/data -Enetwork.host= -p /opt/seafile/pids/elasticsearch.pid 2023-08-15 23:21:12 seafile-controller.c(131): spawned /opt/seafile/seafile-pro-server-10.0.7/pro/elasticsearch/bin/elasticsearch, pid 405502 2023-08-15 23:21:12 seafile-controller.c(119): failed to execvp /opt/seafile/seafile-pro-server-10.0.7/pro/elasticsearch/bin/elasticsearch 2023-08-15 23:21:22 seafile-controller.c(585): pid file /opt/seafile/pids/elasticsearch.pid does not exist 2023-08-15 23:21:22 seafile-controller.c(680): elasticsearch need restart...

I installed redis python package and I have restarted docker container, docker daemon, seafile and seahub repeatedly… How can I create elasticsearch.pid or where is the problem please?
Could you help me please? It is very big problem for me…
Many thanks for your help.

Have you set to use ElasticSearch as an external service in seafevents.conf?

external_es_server = true
es_host = your server's IP
es_port = 9200

Hello @daniel.pan, many thanks for your help. The problem was:

external_es_server = true was missing in my config…

Now it looks like it works and in log I see:

2023-08-17 10:40:58 seafile-controller.c(97): spawn_process: /usr/bin/python3 -m seafevents.main --config-file /opt/seafile/conf/seafevents.conf --logfile /opt/seafile/logs/seafevents.log -P /opt/seafile/pids/seafevents.pid
2023-08-17 10:40:58 seafile-controller.c(131): spawned /usr/bin/python3, pid 423360
2023-08-17 10:40:59 seafile-controller.c(503): local elasticserach server will not be started