Seafile server 6.0.1 beta is ready! A few fixes

Seafile server 6.0.1 beta is ready for testing. It fixes several bugs found in version 6.0.0. We also add the feature to allow admin setting library shares and permissions in admin panel.

You can download this version from https://www.seafile.com/en/download/

Here is the full changelog:

  • [fix] Fix default value of field created_at in table api2_tokenv2. This bug leads to login problems for desktop and mobile clients.
  • [fix] Fix a bug in generating a password protected share link
  • Improve checking the user running Seafile must be the owner of seafile-data. If seafile-data is symbolic link, check the destination folder instead of the symbolic link.
  • [UI] Improve rename operation
  • Admin can set library permissions in admin panel
  • Show name/contact email in admin panel and enable search user by name/contact email
  • Add printing style for markdown
  • The “Seafile” in “Welcome to Seafile” message can be customised by SITE_NAME
  • Improve sorting of files with numbers
  • [fix] Fix can’t view more than 100 files
  • [API] Add admin API to only return LDAP imported user list
3 Likes

Upgrading to 6.0.1 seems to have broken Webdav for me on Linux. Webdav shares were returning 404 errors. Everything back to normal after reverting to 6.0.0.

I completely agree. Webdav not working in version 6.0.1. The server returns a 404 error.

Yes this is a bug. We’ll fix it in the next version.
A simple work around for now is to export an environment variable before starting Seafile server:

export SEAFDAV_CONF=/${path_to_seafile_installation}/conf/seafdav.conf
1 Like

I’m just going to throw this out there because this was one of the issues with the split.
One would figure that while in BETA known bugs would be fixed before release, not released and the bugs that were found in BETA fixed in next version…
Maybe need to looking into a convention for numbering the BETAs to prevent point increments on the actual final releases.
So in reality this BETA would be 6.0 Beta 2 (6.0.0.2 /or 6.0.0-1234 possibly.?.?, that last decimal or dashed place would signify its a beta and its version, you can then drop the last decimal/dashed numbers when released to the public) not actually 6.0.1 because 6.0 has never been publicly released outside of beta status.

1 Like

Not sure if this is related, but I can’t seem to save files accessed over WebDAV. In particular, I am trying to open my Keepass database in Keeweb (though I have checked and the same thing happens with Keepass2Android). I can open the files okay, but when I save, the file is renamed with some sort of TMP string after the extension and the seafdav error log tells me:

tail -f seafdav.error.log
2016/08/23 12:47:21 [error] 20209#20209: *406 FastCGI sent in stderr: "" while reading response header from     upstream, client: IP.ADDRESS, server: my.server.ca:8001, request: "MOVE  /seafdav/Keepass/.KpX160808.kdbx.1471970838891 HTTP/1.1", upstream: "fastcgi://127.0.0.1:8080", host: "my.server.ca:8001"
2016/08/23 12:47:21 [error] 20209#20209: *406 FastCGI sent in stderr: "Traceback (most recent call last):
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 558, in run
protocolStatus, appStatus = self.server.handler(self)
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/flup-1.0.2-py2.7.egg/flup/server/fcgi_base.py", line 1120, in handler
    for data in result:
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/wsgidav_app.py", line 397, in __call__
    for v in app_iter:
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/debug_filter.py", line 154, in __call__
    for v in app_iter:
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/error_printer.py", line 43, in __call__
    for v in app_iter:
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_resolver.py", line 201, in __call__
    for v in app_iter:
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 113, in __call__
    app_iter = method(environ, start_response)
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 756, in doMOVE
    return self._copyOrMove(environ, start_response, True)
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 902, in _copyOrMove
    srcRes, HTTP_NO_CONTENT, errorList)
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 146, in _sendResponse
    return util.sendStatusResponse(environ, start_response, errorList[0][1])
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/util.py", line 758, in sendStatusResponse
    assert type(body) is str # If not, Content-Length is wrong!
AssertionError" while reading response header from upstream, client: IP.ADDRESS, server: my.server.ca:8001,     request: "MOVE /seafdav/Keepass/.KpX160808.kdbx.1471970838891 HTTP/1.1", upstream: "fastcgi://127.0.0.1:8080", host: "my.server.ca

Any suggestions?

I guess your webdav client first uploads the new version as a tmp file, then tries to move the tmp file to its destination. But the move fails.

You can check your seafile.log on the server for errors.

Now that you mention the seafile.log. I just checked and it is FULL of errors since upgrade to 6.01. All complaining about a locked database.

[08/23/2016 10:27:31 PM] http-server.c(900): Repo f583211a-4baa-441e-a4e3-8e9294dd50ba doesn't exist.
[08/23/2016 10:27:31 PM] http-server.c(988): Fast forward merge for repo f583211a-4baa-441e-a4e3-8e9294dd50ba is failed.
[08/23/2016 10:28:25 PM] ../common/seaf-db.c(576): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[08/23/2016 10:28:25 PM] http-server.c(733): DB error when check repo existence.
[08/23/2016 10:29:51 PM] ../common/seaf-db.c(576): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[08/23/2016 10:29:51 PM] http-server.c(733): DB error when check repo existence.
[08/23/2016 10:30:27 PM] ../common/seaf-db.c(576): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[08/23/2016 10:30:27 PM] http-server.c(733): DB error when check repo existence.
[08/23/2016 10:33:07 PM] ../common/seaf-db.c(576): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[08/23/2016 10:33:07 PM] http-server.c(733): DB error when check repo existence.
[08/23/2016 10:35:15 PM] ../common/mq-mgr.c(54): [mq client] mq cilent is started    
[08/23/2016 10:35:21 PM] ../common/seaf-db.c(416): Error prepare statement SELECT 1 FROM Repo WHERE repo_id=?: sqlite3_prepare_v2 failed: database is locked.
[08/23/2016 10:35:21 PM] http-server.c(733): DB error when check repo existence.
[08/23/2016 10:35:21 PM] ../common/seaf-db.c(416): Error prepare statement SELECT 1 FROM Repo WHERE repo_id=?: sqlite3_prepare_v2 failed: database is locked.
[08/23/2016 10:35:21 PM] http-server.c(733): DB error when check repo existence.
[08/23/2016 10:35:22 PM] ../common/seaf-db.c(416): Error prepare statement SELECT 1 FROM Repo WHERE repo_id=?: sqlite3_prepare_v2 failed: database is locked.
[08/23/2016 10:35:22 PM] http-server.c(733): DB error when check repo existence.
[08/23/2016 10:35:22 PM] ../common/seaf-db.c(416): Error prepare statement SELECT 1 FROM Repo WHERE repo_id=?: sqlite3_prepare_v2 failed: database is locked.
[08/23/2016 10:35:22 PM] http-server.c(733): DB error when check repo existence.

This should be a problem introduced by changing multi-threaded access of Sqlite in this version. We’ll fix it and let you test again.

1 Like

@ConorIA Here is an updated package: https://seacloud.cc/f/e8b2ea0582/?raw=1

I’ve tested it in our environment. It should have no database lock issues. Please try and give me feedback.

[fix] Fix can’t view more than 100 files

-> Thanks for the fix, but it’s not really fixed. If you enter a directory with more than 100 files (eg. pictiures dir with 500 files) then seafile only loads 100 pictures. If you click on one picture to view, you see 1/100. If you want so see 1/500, you have to scroll down and wait for seafile to load the next 100 files, scroll down and wait for seafile to load the next 100 files and so on and so on.
I also noticed, when you have 1/100 files, but having 500 in place and click the back button on picture preview, then the last picture is only 100 insteat of 500 :frowning:
Please fix that to, that the whole directory will be loaded after entering.

Thanks!

Thanks @Jonathan. The errors have disappeared from my seafile.log.
Somehow, though, the seafdav server refuses to start (since even before 6.0.1.1) when I start Seafile. Do we no longer need to export the SEAFDAV_CONF location? That is the only thing that had changed for me.

EDIT: Nevermind. The host in my seafdav.conf was set to 0.0.0.0 I changed that to localhost and it seemed to have fixed it. Now to check into the original issue with the ‘move and rename’ via seafdav.

EDIT 2: Okay, here’s the output:

seafile.log
[08/27/2016 07:10:11 PM] ../common/seaf-db.c(636): Error get next result from prep stmt: sqlite3_step failed: database is locked.

seafdav.log
[2016-08-27 19:10:11,677]:  ErrorPrinter: caught Exception
[2016-08-27 19:10:11,681]:  Traceback (most recent call last):
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/error_printer.py", line 43, in __call__
for v in app_iter:
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_resolver.py", line 201, in __call__
for v in app_iter:
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 113, in __call__
app_iter = method(environ, start_response)
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 756, in doMOVE
return self._copyOrMove(environ, start_response, True)
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 902, in _copyOrMove
srcRes, HTTP_NO_CONTENT, errorList)
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/request_server.py", line 146, in _sendResponse
return util.sendStatusResponse(environ, start_response, errorList[0][1])
  File "/srv/seafile/seafile-server-6.0.1/seahub/thirdpart/wsgidav/util.py", line 758, in sendStatusResponse
assert type(body) is str # If not, Content-Length is wrong!
AssertionError

The host is also set to 0.0.0.0 on my test machine. But it works. Maybe you didn’t completely stop the old server? Yes you don’t need to export SEAFDAV_CONF any more.

About the “move and rename” error, does it work with 6.0.0? Can you post more complete log messages around the error in seafile.log?

Hi

I also get a lot of those errors:

assert type(body) is str # If not, Content-Length is wrong!

I’m using 6.0.3 with webdav and apache as a reverse proxy for ssl/tls. Also I get a lot of timeouts with my requests:

File “/var/lib/seafile/XXXXXXXXXXXXXX/seafile-server-6.0.3/seahub/thirdpart/wsgidav
/server/cherrypy/wsgiserver/wsgiserver2.py”, line 990, in recv
data = self._sock.recv(size)
timeout: timed out

Is there any way of increasing the timeout there. It looks like the timeout there is a unreasonable low value at least for webdav clients on a remote network with not so much bandwidth.

Erik

I also have problem with save Keepass DB over webdav. He saved the new file with .tmp extension but dont rename it.
I must rename it manually.
With the older versions 5.x it works.

[2016-09-17 11:08:48,065]:  ErrorPrinter: caught Exception
[2016-09-17 11:08:48,066]:  Traceback (most recent call last):
  File "/storage/websites/Seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/error_printer.py", line 43, in __call__
    for v in app_iter:
  File "/storage/websites/Seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_resolver.py", line 201, in __call__
    for v in app_iter:
  File "/storage/websites/Seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 113, in __call__
    app_iter = method(environ, start_response)
  File "/storage/websites/Seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 756, in doMOVE
    return self._copyOrMove(environ, start_response, True)
  File "/storage/websites/Seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 902, in _copyOrMove
    srcRes, HTTP_NO_CONTENT, errorList)
  File "/storage/websites/Seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 146, in _sendResponse
    return util.sendStatusResponse(environ, start_response, errorList[0][1])
  File "/storage/websites/Seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/util.py", line 758, in sendStatusResponse
    assert type(body) is str # If not, Content-Length is wrong!
AssertionError

Do you have the same database locked errors in your seafile.log?

No Seafile.log is clear.
I have found this one: https://sourceforge.net/p/keepass/discussion/329221/thread/d1cf2040/
He says the Webdav Server must support “moving files”. I disabled this option in Keepass and now he writes the file directly without tmp file, but with older seafile versions all working fine.

P.S. Seafile runs behind an Apache2 with SSL and Maria Database.

Hi

I’m using FolderSync on Android to backup some of my local folders on my phone to Seafile, and I assume it also uses temporary files. Is there maybe a problem with renaming or similar things?

Erik

Just realized we’d been discussing this earlier. These are fresh logs from my seafile server. I stopped the server, cleared out the log folder, then started the server. I then opened a file on webdav and tried to save it. This is the only output in the logs.

==> seafdav.log <==
  File "/srv/seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 756, in doMOVE
    return self._copyOrMove(environ, start_response, True)
  File "/srv/seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 902, in _copyOrMove
    srcRes, HTTP_NO_CONTENT, errorList)
  File "/srv/seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/request_server.py", line 146, in _sendResponse
    return util.sendStatusResponse(environ, start_response, errorList[0][1])
  File "/srv/seafile/seafile-server-6.0.3/seahub/thirdpart/wsgidav/util.py", line 758, in sendStatusResponse
    assert type(body) is str # If not, Content-Length is wrong!
AssertionError


==> seafile.log <==
[09/18/2016 11:50:35 AM] ../common/mq-mgr.c(54): [mq client] mq cilent is started
[09/18/2016 11:51:38 AM] ../common/seaf-db.c(424): Error prepare statement SELECT repo_id FROM RepoOwner WHERE owner_id=?: sqlite3_prepare_v2 failed: database is locked.

Hi ConorIA,
i’m trying to get keeweb with WebDAV access to Seafile up an running but i’m stuck with the OPTIONS requirement of keeweb.
Were you able to get i working again and could you please share your proxy configuration?
I’m still runnnig a pre 6 version of seafile.
Best regards, Sönke