seafile-client
seafile-client copied to clipboard
Linux CLI client error: Couldn't prepare query, error:1->'no such table: Certs'
As mentioned in https://github.com/haiwen/seafile/issues/1348 these error messages should be suppressed at least in seafile-cli_4.3.2_xx.tar.gz which has no GUI. They are harmless but are filling up the logs, and so we have to stick to version 4.0.4 Maybe seaf-cli could load the certificates or don't try to do that when there is no table to store them.
This is still present and is also manipulates the seaf-cli status
output. This should get fixed asap.
A possible work arround is to log rotate the files so they don't take to much space. I't dirty but for the time being.
i have this same error message, but sync was stalled for over half an hour, until the error disappeared from the log and sync continued. is it 100% sure this error message has nothing to do with the stall?
[03/15/18 13:05:11] sync-mgr.c(702): Repo 'pdl1' sync state transition from 'uploading' to 'initializing'. [03/15/18 13:05:11] sync-mgr.c(1516): Removing blocks for repo pdl1(1243fc5d). [03/15/18 13:06:43] Couldn't prepare query, error:1->'no such table: Certs' SELECT cert FROM Certs; [....] [03/15/18 13:48:03] Couldn't prepare query, error:1->'no such table: Certs' SELECT cert FROM Certs; [03/15/18 13:48:13] sync-mgr.c(702): Repo 'pdl1' sync state transition from 'synchronized' to 'committing'. [03/15/18 13:48:16] repo-mgr.c(2554): Creating partial commit after adding results/surv.randomForestSRC__4__mrmr__clinical__/permModel29.RData.
This is in 8.0.5 seaf-cli still and logs every 30 seconds.
Maybe add an empty table 'Certs', but to which database?
Here https://github.com/haiwen/seafile-client/blob/57aa79cf4d1175a39cde20a38167db4fd3e12293/src/certs-mgr.cpp#L66 the name of the db is mentioned.
Indeed, in the seafile-data directory of the seaf-cli install there is a 'certs.db' file, 0 bytes. On another system with seaf-gui, this file exists too, having a positive size and being an sqlite db containing missing table with no entries.
Copying the gui installed certs.db over to the cli install and voilà, no more nagging in the log :)
Maybe seaf-cli does not run the 'start' routine?
from : https://github.com/haiwen/seafile-client/blob/5bc61af6ad2bfd39d0c6da6cc90ac16d62ad3150/src/certs-mgr.cpp#L69
Locate the certs.db file. It is in the same location than config.db,, branch.db, ...
sqlite3 certs.db
sqlite> CREATE TABLE IF NOT EXISTS Certs (url VARCHAR(255) PRIMARY KEY, cert TEXT);
sqlite> exit
no more error message
still present in seafile-cli
9.0.5 (debian bookworm)
error still present in ~/.ccnet/logs/seafile.log
[05/14/24 16:15:29] start to serve on pipe client
[05/14/24 16:15:36] Couldn't prepare query, error:1->'no such table: Certs'
SELECT cert FROM Certs;
certs.db
is an empty file
total 648
-rw-r--r-- 1 debian debian 12288 14 mai 16:06 branch.db
-rw-r--r-- 1 debian debian 0 14 mai 16:14 certs.db
-rw-r--r-- 1 debian debian 45056 14 mai 13:57 clone.db
drwxr-xr-x 2 debian debian 4096 14 mai 12:44 commits
-rw-r--r-- 1 debian debian 12288 14 mai 16:15 config.db
drwxr-xr-x 5 debian debian 4096 14 mai 12:44 deleted_store
-rw-r--r-- 1 debian debian 20480 14 mai 12:44 filelocks.db
drwxr-xr-x 2 debian debian 4096 14 mai 12:44 fs
-rw-r--r-- 1 debian debian 40 14 mai 12:44 id
drwxr-xr-x 2 debian debian 4096 14 mai 16:06 index
-rw-r--r-- 1 debian debian 536576 14 mai 16:15 repo.db
srwx------ 1 debian debian 0 14 mai 16:15 seafile.sock
drwxr-xr-x 5 debian debian 4096 14 mai 12:44 storage
drwxr-xr-x 2 debian debian 4096 14 mai 16:06 tmpfiles
what is the purpose of the certs?