Failed to read file and libcurl failed to PUT error

My library stuck here. I’ve reinstalled seadrive already and checked the lib with seaf-fsck.sh on server. No luck. I’m on Ubuntu 18 with latest seadrive cli.

[10/28/18 16:57:06] http-tx-mgr.c(3919): Upload with HTTP sync protocol version 2.
[10/28/18 16:57:06] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'init') --> ('normal', 'check')
[10/28/18 16:57:07] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'check') --> ('normal', 'commit')
[10/28/18 16:57:07] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'commit') --> ('normal', 'fs')
[10/28/18 16:57:07] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'fs') --> ('normal', 'data')
[10/28/18 16:57:07] fs-mgr.c(591): [fs mgr] Failed to read file 545cdfed8f33424b1de4b257f4c2ca74042e6bc6.
[10/28/18 16:57:07] http-tx-mgr.c(3655): Failed to get file 545cdfed8f33424b1de4b257f4c2ca74042e6bc6 in repo 512ff274.
[10/28/18 16:57:08] http-tx-mgr.c(911): libcurl failed to PUT https://hostname/seafhttp/repo/512ff274-786a-4755-ab00-adef6a4371ea/block/a757c857403fc6bbca10f604a68e6928edf426b4: Operation was aborted by an application callback.
[10/28/18 16:57:08] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'data') --> ('error', 'finished')
[10/28/18 16:57:08] sync-mgr.c(604): Repo 'pdf-files' sync state transition from uploading to 'error': 'Error occured in upload.'.
[10/28/18 16:57:37] sync-mgr.c(570): Repo 'pdf-files' sync state transition from 'synchronized' to 'uploading'.
[10/28/18 16:57:37] http-tx-mgr.c(3919): Upload with HTTP sync protocol version 2.
[10/28/18 16:57:37] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'init') --> ('normal', 'check')
[10/28/18 16:57:38] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'check') --> ('normal', 'commit')
[10/28/18 16:57:38] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'commit') --> ('normal', 'fs')
[10/28/18 16:57:38] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'fs') --> ('normal', 'data')
[10/28/18 16:57:38] fs-mgr.c(591): [fs mgr] Failed to read file 545cdfed8f33424b1de4b257f4c2ca74042e6bc6.
[10/28/18 16:57:38] http-tx-mgr.c(3655): Failed to get file 545cdfed8f33424b1de4b257f4c2ca74042e6bc6 in repo 512ff274.
[10/28/18 16:57:38] http-tx-mgr.c(1186): Transfer repo '512ff274': ('normal', 'data') --> ('error', 'finished')
[10/28/18 16:57:38] sync-mgr.c(604): Repo 'pdf-files' sync state transition from uploading to 'error': 'Error occured in upload.'.

Nginx access log gives this

[28/Oct/2018:17:29:41 +0000] "PUT /seafhttp/repo/512ff274-786a-4755-ab00-adef6a4371ea/block/a757c857403fc6bbca10f604a68e6928edf426b4 HTTP/1.1" 400 0 "-" "Seafile/0.9.5 (Linux)"

It looks like your local metadata on the client is corrupt. Unfortunately there is no way to logout with cli. You can clean the metadata manually. In ~/.seadrive/data directory, remove every sub-directory and files except the file-cache directory. Then restart the client.

Thanks for the response, @Jonathan. I cleared the ~/.seadrive/data directory already two times. Before I did it, I made a backup of the file-cache directory, I didn’t knew that I can just leave it in place and remove all other directories. I waited for seadrive to cachup the fs file list, when it was synchronized, I moved the seafile-cache data back in into the mount point of seadrive. First it hanged on some files, but then it started to show me exactly the same message. This happens with two independent libraries, on two separate client machines.

PS: What will happen, when I leave the seadrive-cache directories there? Will it try to merge its contents? I removed some files and directories on the server since that error happend. But on seadrives these files are still there. Will it upload them back to the server, or will they be removed from seadrive, since they are removed from the server already?

Thanks in advance @Jonathan!

Removing the metadata should fix your problem. The local content will be merged into the library.

The local content will not be really merged as it should do it. Just tested.

Background:

I use seadrive headless on a webserver to sync user files with the seafile server and an external server which is modifying the files and sending them back to the websever (using seafile). Now seadrive is stuck with that curl error breaking the whole syncing, but I managed to configure a sftp connection to the external server. So now the application on the external server is fetching the files over sftp. The files are still stored in the seadrive fuse mount location and also modified there via sftp, but seadrive is not syncing up. Now if I would delete the seadrive storage (except file-cache) and start seadrive again, it would just upload new files, but will not merge the existing ones. Seadrive will create conflict files with names like (SFConflict …). Further more seadrive will not remove files from the seafile server which have been removed locally on the webserver. It will simply download these files back to the webserver into seadrive. So if I remove the seadrive data storage, I lose track of all my changes.