Seafile 7.1.3 Pro: GC doesnt work properly, read_seafile_data_dir: command not found

Hi,
I run a Seafile 7.1.3 Pro-Version and have some problems with the garbage collection:

seafile@seafile:~$ /opt/seafile/seafile-pro-server-7.1.3/seaf-gc.sh -r

/opt/seafile/seafile-pro-server-7.1.3/seaf-gc.sh: line 96: read_seafile_data_dir: command not found
Starting seafserv-gc, please wait ...
[05/04/20 16:16:20] gc-core.c(673): === Repos deleted by users ===
seafserv-gc run done

Done.

Without the option -r the process runs but throws the same error at the beginning:

seafile@seafile:~$ /opt/seafile/seafile-pro-server-7.1.3/seaf-gc.sh

/opt/seafile/seafile-pro-server-7.1.3/seaf-gc.sh: line 96: read_seafile_data_dir: command not found
Starting seafserv-gc, please wait ...
[05/04/20 16:18:05] gc-core.c(803): Database is MySQL/Postgre/Oracle, use online GC.
[05/04/20 16:18:05] gc-core.c(827): Using up to 1 threads to run GC.
...

Is there an official solution for this problem?

2 Likes

I am seeing the same error with the docker version…line 96 of seaf-gc.sh:

 95 function run_seaf_gc () {
 96     read_seafile_data_dir;
 97     seafile_conf=${default_conf_dir}/seafile.conf
 98     db_type=$($PYTHON $check_db_py $seafile_conf)

However, the read_seafile_data_dir fucntion does not exist in that script.

2 Likes

I’m having the same error in 7.1.5.

I’m facing the same issue, too at Seafile Pro 7.1.4 docker…

Hi, Found this block of code in the pre v7.1 seafile releases:

function read_seafile_data_dir () {
seafile_ini=${default_ccnet_conf_dir}/seafile.ini
if [[ ! -f ${seafile_ini} ]]; then
echo “${seafile_ini} not found. Now quit”
exit 1
fi
seafile_data_dir=$(cat “${seafile_ini}”)
if [[ ! -d ${seafile_data_dir} ]]; then
echo “Your seafile server data directory “${seafile_data_dir}” is invalid or doesn’t exits.”
echo “Please check it first, or create this directory yourself.”
echo “”
exit 1;
fi

export SEAFILE_CONF_DIR=$seafile_data_dir

}

Hope it helps!

If the maintainer would fix the shit, this helps :wink:

I have the same error with seafile pro 7.1.22 …

./seaf-gc.sh: ligne96: read_seafile_data_dir : commande introuvable
Starting seafserv-gc, please wait …
[05/16/22 16:57:31] gc-core.c(806): Database is MySQL/Postgre/Oracle, use online GC.
[05/16/22 16:57:31] gc-core.c(830): Using up to 1 threads to run GC.
[05/16/22 16:57:31] gc-core.c(882): === GC is finished ===
seafserv-gc run done

Did you find a solution on your side?