Seaf-import creates corrupted libraries

I first tried to import “real files” and the created library is corrupted so I tried with another one (a directory with a single empty file) and I got the same result in the web UI:

  • Broken (please contact your administrator to fix this library) 0 bytes 1970-01-01
  • Broken (please contact your administrator to fix this library) 137.9 GB 1970-01-01

I imported the libraries as root on the Docker container running Seafile Pro.

root@90164213baf4:/opt/haiwen/seafile-pro-server-6.3.9# ./seaf-import.sh -p /mnt/import/Test -n Imported -u user@example.com

Starting seaf-import, please wait ...
[02/27/19 20:20:38] seaf-import.c(181): Total file number: 1.
[02/27/19 20:20:38] seaf-import.c(124): Import file /mnt/import/Test/waza.txt successfully.
[02/27/19 20:20:39] seaf-import.c(238): Import dir /mnt/import/Test to repo c264618f successfully.
 run done

Done.

The result of seaf-fsck.sh:

seafile@90164213baf4:/opt/haiwen/seafile-pro-server-6.3.9$ ./seaf-fsck.sh

Starting seaf-fsck, please wait ...

[02/27/19 20:20:58] fsck.c(602): Running fsck for repo c264618f-52d4-46be-872b-fb454707e551.
[02/27/19 20:20:58] repo-mgr.c(346): Commit 22d4059e54728458d6c967c01cf678e5dde73742 is missing
[02/27/19 20:20:58] fsck.c(619): Repo c264618f HEAD commit is damaged, need to restore to an old version.
[02/27/19 20:20:58] fsck.c(507): Scanning available commits...
[02/27/19 20:20:58] fsck.c(514): No available commits for repo c264618f, can't be repaired.
[02/27/19 20:20:58] fsck.c(666): Fsck finished for repo c264618f.

[02/27/19 20:20:58] fsck.c(602): Running fsck for repo 2b903cff-d6ff-4a6a-a12b-a60d047c1b5a.
[02/27/19 20:20:58] repo-mgr.c(346): Commit 66a6408b90981d8cd5378b34dd650ec940f20cab is missing
[02/27/19 20:20:58] fsck.c(619): Repo 2b903cff HEAD commit is damaged, need to restore to an old version.
[02/27/19 20:20:58] fsck.c(507): Scanning available commits...
[02/27/19 20:20:58] fsck.c(514): No available commits for repo 2b903cff, can't be repaired.
[02/27/19 20:20:58] fsck.c(666): Fsck finished for repo 2b903cff.

[02/27/19 20:20:58] fsck.c(602): Running fsck for repo 12b4d1ff-09e5-47c6-a328-ca33e23bf84f.
[02/27/19 20:20:58] fsck.c(422): Checking file system integrity of repo My Library Template(12b4d1ff)...
[02/27/19 20:20:58] fsck.c(666): Fsck finished for repo 12b4d1ff.

seaf-fsck run done

Done.

NOTE: 2b903cff is the first library I imported.

Any idea what the problem could be?

PS: it’s super annoying to not being able to embed images nor links :frowning:

Hi,

Did you manage to fix this? I have the same issue.

Kind regrads,
Graxo

Which version do you use? Can you provide detailed outputs like the previous post?

Hi,

After using seaf-fsck.sh on the library and rebooting all the docker containers the library was fixed and not broken again.
What log file do you want?

Kind regards,
Graxo

If it’s fixed no log file is required. But can you tell me which version are you using?

Cant check right now, but the newest version of the docker-compose file of the seafile professional, 11.x.x something

Have you interrupted the import process when you import the files?

No, i have not

Do you use root user run the seaf-import script? If so, the created files are all owned by root. However, seafile server will be started with seafile user. That could be the reason why the library is corrupted.