Seafile server 7.1.0 is ready for testing! Migrate to Python 3

Can you check your settings for file_server_root?

Can you also try to clear cache?

Hi, as far as I know there is no setting named file_server_root. There is HTTP_SERVER_ROOT in seahub_settings.py which is set to https://[mydomain]/seafhttp. SITE_ROOT is set to /.
Which cache do you mean? I cleared my browser cache and tried with multiple devices.

Can you change HTTP_SERVER_ROOT to FILE_SERVER_ROOT?

For the cache, I mean the server side cache. Do you use memcached?

It is still a beta version.

Here is the explanation for Python libraries

  • python3-ldap: for LDAP Sync, optional
  • Pillow: for avatars and other picture processing, needed
  • pylibmc django-pylibmc: for memcache, needed
  • captcha django-simple-captcha: login captcha, needed
  • jinja2 sqlalchemy: for webdav to work, optional
  • psd-tools: for PSD file preview, optional
3 Likes

7.1.1 is working now for me on Debian Buster. Except a very strange thing in combination with Seadroid (tested with latest 2.2.22). I can upload files manually via Seadroid without a problem, but automatic background uploads (camera upload feature) all fail.

Switching back to 7.0.5 resolves the failed uploads instantly without changing anything else. I can’t find an error in any log, the corresponding log entries for both server versions look exactly the same on first sight.

Can anyone confirm a working camera background upload with 7.1.1 before I try to debug on Android? TIA.

That worked. Changing the setting to FILE_SERVER_ROOT did the trick. I’m on 7.1.1 now. Thanks for the help!

Thanks. Can you please update the generic Seafile manual with this information!?
The manual is also missing information about packages for Debian. Some of them them differ to ubuntu ones. Your webpage states that Debian is tested and working. One then can expect information about this distro in the manual.
Thanks

1 Like

It did not work actually. I was not using Seafile yesterday and didn’t discover the problem then. But if I click on any Library the part of the window that usually shows the library contents and the path just turn white. There is no error in the console but the call to the API gets a 404.
GET /api/v2.1/repos/[some-repo]/

HTTP 404 Not Found
Content-Type: text/html; charset=utf-8
Vary: Accept
Allow: GET, DELETE, HEAD, OPTIONS

{
    "error_msg": "Library [some-repo] not found."
}

seahub.log shows something like this each time this happens:

2019-12-28 11:01:52,304 [WARNING] django.request:152 get_response Not Found: /api/v2.1/repos/[some-repo]/

seafile.log:

[12/28/2019 12:01:52 PM] repo-mgr.c(894): Commit [some-repo]:[some-commit] is missing

This seemed very worrying to me because it could mean data inconsistency but actually, in 7.0.5 everything works fine and I can access every file I tested.
Should I run fsck in 7.1.1? Or what could be the problem?
Downgraded to 7.0.5 again.
I cleared the memcached cache before each down-/upgrade this time.
Greetings
Levin

Upgrade now worked fine with the 7.1.1 package on my Debian 10 box. Seahub Cache had to be deleted tho. You may want to include this into the upgrade instructions, otherwise the web interface will crash.

Problem solved. The seafile-data symbolic link to my actual data folder was apparently not set (in the right way) and 7.1.1 created a new data directory in seafile-data. After renaming the “new” data directory and re-running minor_upgrade.sh the symlink was created and everything works fine.

Hi, I can confirm, that camera upload does not work with 7.1.1.

The upload requests return a status code 403 as seen in Nginx logs:

"POST /seafhttp/upload-api/<hash> HTTP/2.0" 403 31 "-" "okhttp/3.9.1"

The bug seems related to this change: https://github.com/haiwen/seafile-server/pull/286
Seadroid apparantly does not use the upload API as it is now intended (compare https://github.com/haiwen/seadroid/blob/master/app/src/main/java/com/seafile/seadroid2/SeafConnection.java#L905).

Any chance to get this fixed in either the server or in Seadroid?

We will look into the problem.

1 Like

Seems fixed with Seadroid 2.2.24.

On Debian/Ubuntu it needs to install python3-django-captcha package:

sudo apt install python3-django-captcha

Without this - seahub.sh start shows error without any records in log file:

$ ./seahub.sh start

LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 ...
Error:Seahub failed to start.
Please try to run "./seahub.sh start" again

And only via $ ./seahub.sh start-fastcgi we can see real source of the problem:

ModuleNotFoundError: No module named 'captcha'
1 Like

so do we need to install python3-django-captcha additionally or instead of captcha django-simple-captcha ? @Murz

At least for Debian you only need python3-django-captcha.

@daniel.pan @Jonathan For the sake of our sanity. Please update the manual to include detailed instructions on the required packages for all supported distros. This includes latest Debian, which is mentioned on the website but not really mentioned anymore in the manual.

Thanks in advance!

5 Likes

We will update the document to include instructions for Debian.

3 Likes

sudo apt install python3-django-captcha is enough on Ubuntu 18.04.

1 Like

Also there are problem with starting seafdav server via missing pip3 install wsgidav, and even after installing - I got the error:

$ /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile-server/logs/seafdav.log --pid /opt/seafile-server/pids/seafdav.pid --port 8080 --host 0.0.0.0
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.6/dist-packages/wsgidav/server/server_cli.py", line 38, in <module>
    from wsgidav import __version__, util
  File "/usr/local/lib/python3.6/dist-packages/wsgidav/util.py", line 12, in <module>
    from wsgidav import compat
  File "/usr/local/lib/python3.6/dist-packages/wsgidav/compat.py", line 15, in <module>
    from six.moves import (
ImportError: cannot import name 'collections_abc'

How can I fix it?