Pid file /opt/seafile/pids/elasticsearch.pid does not exist

Hello Seafile community !

I am running Seafile Pro 7.1.7 under Debian (up to date Buster version) in a cluster configuration. We do have separated roles on different servers (Front, DB, S3 Storage, Memcached and maintenance). The server I am talking about is the maintenance server.
I am trying to be as specific as possible but I think it would be the same thing on a single server environment.

On this server, the controller.log file keeps filling up with this :

    [04/13/21 15:52:04] seafile-controller.c(130): spawned /opt/seafile/seafile-pro-server-7.1.7/pro/elasticsearch/bin/elasticsearch, pid 6029
    [04/13/21 15:52:23] seafile-controller.c(585): pid file /opt/seafile/pids/elasticsearch.pid does not exist
    [04/13/21 15:52:23] seafile-controller.c(633): elasticsearch need restart...
    [04/13/21 15:52:23] seafile-controller.c(96): spawn_process: /opt/seafile/seafile-pro-server-7.1.7/pro/elasticsearch/bin/elasticsearch -Epath.logs=/opt/seafile/logs -Epath.data=/opt/seafile/pro-data/search/data -Enetwork.host=0.0.0.0 -p /opt/seafile/pids/elasticsearch.pid

I have seen this post ([SOLVED] Pid file /opt/seafile/pids/seafevents.pid does not exist [Was: 'Bad pidfile format: seafevents.pid']) and tried to install the pyhton-redis package to solve the problem but it didn’t change anything.
The message keeps being written in the log file every 10 seconds…

Does anyone have an idea about what is happening (the log file is pretty explicit on this matter :slight_smile:) and more importantly how to solve it ?

Thanks for your help

Hello,

The elasticsearch log was saying this :

[1] bootstrap checks failed
[1]: max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]

We did update the vm.max_map_count value in the /etc/sysctl.conf to 262144 as asked.
The error message is not there anymore, but ES still doesn’t find anything and I think it keeps restarting…

Hi,

After resolving the issue above, we get an error when elasticsearch tried to index files :

04/14/2021 13:57:53 [WARNING] seafes:73 check_recovery: ********-****-****-****-********: inrecovery
04/14/2021 13:57:53 [ERROR] seafes:92 get_repo_name_mtime_size: Could not locate column in row for column 'items'
04/14/2021 13:57:53 [ERROR] seafes:92 get_repo_name_mtime_size: Could not locate column in row for column 'items'
04/14/2021 13:57:53 [ERROR] seafes:116 thread_task: Index Repo Error: ********-*****-****-****-********
Traceback (most recent call last):
  File "/opt/seafile/seafile-server-latest/pro/python/seafes/repo_data/__init__.py", line 90, in get_repo_name_mtime_size
    return self._get_repo_name_mtime_size(repo_id)
  File "/opt/seafile/seafile-server-latest/pro/python/seafes/repo_data/__init__.py", line 84, in _get_repo_name_mtime_size
    raise e
  File "/opt/seafile/seafile-server-latest/pro/python/seafes/repo_data/__init__.py", line 82, in _get_repo_name_mtime_size
    return self.to_dict(res)
  File "/opt/seafile/seafile-server-latest/pro/python/seafes/repo_data/__init__.py", line 17, in to_dict
    res.append(dict(list(i.items())))
AttributeError: Could not locate column in row for column 'items'

We checked our Database and our storage but both are clean with no errors.

Finally we resolved it by replacing the script generating the error :

./seafile-server-latest/pro/python/seafes/repo_data/__init__.py

We are actually in Seafile pro v7.1.7 and we replaced the script by the same who is present on v8.0.0
To get more details about that you can check the original post exposing that solution : https://bbs.seafile.com/t/topic/13758/4