Seafile Commit is missing, Failed to load commit json object

Hi everyone, I have a seafile server on a raspberry pi running seafile-server-6.2.3 with mysql and nginx, I’m storing my files to a raid 0 array managed by mdadm. Lately I started to see my files getting corrupted out of nowhere (I don’t have an ups), however the uptime for pi indicates there was no power outage yet. I’m getting the following error on one of my libraries. This is from the seafile server logs:

[03/23/18 22:08:15] …/common/commit-mgr.c(823): Failed to load commit json object: ‘[’ or ‘{’ expected near ‘?’.
[03/23/18 22:08:15] repo-mgr.c(888): Commit 7f8424d1-f248-4c5a-bda4-c22a1ca85faf:1fdc4f54d971a5292a41b36b7232c9ddfc532397 is missing
[03/23/18 22:08:21] …/common/commit-mgr.c(823): Failed to load commit json object: ‘[’ or ‘{’ expected near ‘?’.
[03/23/18 22:08:21] repo-mgr.c(888): Commit 7f8424d1-f248-4c5a-bda4-c22a1ca85faf:1fdc4f54d971a5292a41b36b7232c9ddfc532397 is missing
[03/23/18 22:09:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:14:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:19:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:24:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:29:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:34:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:39:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:44:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:49:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:54:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 22:59:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 23:04:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 23:09:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 23:14:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 23:19:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 23:24:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 23:29:15] size-sched.c(96): Repo size compute queue size is 0
[03/23/18 23:31:44] …/common/commit-mgr.c(823): Failed to load commit json object: ‘[’ or ‘{’ expected near ‘?’.
[03/23/18 23:31:44] repo-mgr.c(888): Commit 7f8424d1-f248-4c5a-bda4-c22a1ca85faf:1fdc4f54d971a5292a41b36b7232c9ddfc532397 is missing

After seeing this I went to the commit and realized that it was corrupted. the contents are unreadable.

Is there any way that I can delete this commit so that I can access to my library? Seaf-fsck does not find any problems however I cant access to the library because of this error… What should I do?

Honestly, rather than trying to tinker with fixing that library, the easiest and quickest thing to do would be:

  1. On one of the machines that have synced the library, make a backup copy of the folder.
  2. Unsync the library in the Seafile client on same said machine.
  3. Log into the server and delete the offending library.
  4. Go back to the machine where you made the backup folder, drag and drop the original folder to the Seafile Client. It will create the new library and start syncing again.

I managed to fix the library by executing the garbage collector. Is it possible to loose whole libraries just like that? Also the library is 5gb, it is not small, so it is a little pain to re-sync it every time a commit goes missing.

It is normal to loose nothing at all.

@kaangoksal

It’s possible, but not likely. I have lost an entire library before, but it was due to a hard drive beginning to fail.