Wrong ID error


I got this error when running

root@seafile:/home/administrator/haiwen/seafile-server-6.0.8# .

Starting seafserv-gc, please wait …
[03/07/18 17:07:13] ccnet_client_load_confdir: Wrong ID
Trace/breakpoint trap (core dumped)
seafserv-gc run done


I’m sure I ran before (successfully), so I don’t think the problem is because I have no user “seafile” (I installed and run seafile via “administrator”). I did stop the seafile-services before running it.

I also tried “seafserv-gc -c /home/administrator/haiwen/ccnet/ -d /home/administrator/haiwen/seafile-data/ -F /home/administrator/haiwen/conf/”, looks like this should do the same

root@seafile:/home/administrator/haiwen/seafile-server-latest# seafserv-gc -c /home/administrator/haiwen/ccnet/ -d /home/administrator/haiwen/seafile-data/ -F /home/administrator/haiwen/conf/
seafserv-gc: error while loading shared libraries: cannot open shared object file: No such file or directory

Accorded to the Seafile-Manual you can also run “ --dry-run [repo-id1] [repo-id2] …”. But what are those repos, and how to find out what " repos" I have?


Isn’t “seaf-gc” some fundamental function of Seafile? How comes noone seems to know how to use it?

Reading the Source Code

id = ccnet_util_key_file_get_string (key_file, “General”, “ID”);
if ( (id == NULL) || (strlen (id) != SESSION_ID_LENGTH)
|| (ccnet_util_hex_to_sha1 (id, sha1) < 0) )
ccnet_error (“Wrong ID\n”);
g_key_file_free (key_file);
goto onerror;

So you have a problem with the parameter ID in the section [General] in the config file /home/administrator/haiwen/conf/ccnet.conf

You need to set the LD_LIBRARY_PATH for this to work correctly:

LD_LIBRARY_PATH=/home/administrator/haiwen/seafile-server-latest/seafile/lib seafserv-gc -c […]

Because for us this tool simply works.

Solved. I used the following command to run Gargabe Collector:

export LD_LIBRARY_PATH=./lib:${LD_LIBRARY_PATH} && ./bin/seafserv-gc -c /home/administrator/haiwen/ccnet -d /home/administrator/haiwen/seafile-data -F /home/administrator/haiwen/conf

This “export […]” thing needs to set first.