haiwen / seafile

High performance file syncing and sharing, with also Markdown WYSIWYG editing, Wiki, file label and other knowledge management features.
http://seafile.com/
Other
12.26k stars 1.54k forks source link

seafdav not working #2645

Closed dominikdev-m closed 1 year ago

dominikdev-m commented 1 year ago

Hey, i just installed Seafile and i tried to setup seafdav. But the seafdav service isn't starting up.

My config files: seafdav.conf

[WEBDAV]
enabled = true
port = 8031
share_name = /seafdav
workers = 10
timeout = 1200

nginx proxy:

location /seafdav {
        proxy_pass         http://127.0.0.1:8031/seafdav;
        proxy_set_header   Host $host;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host $server_name;
        proxy_set_header   X-Forwarded-Proto $scheme;
        proxy_read_timeout  1200s;
        client_max_body_size 0;
        proxy_request_buffering off;
        proxy_set_header Destination "http:$nossl_destination";
    }
map $http_destination $nossl_destination {
"~^https:(.+)$" $1;
"~^http:(.+)$" $1;
}

Log file controller:

2023-02-06 22:00:24 seafile-controller.c(82): spawn_process: seaf-server -F /srv/conf -c /srv/ccnet -d /srv/seafile-data -l /srv/logs/seafile.log -P /srv/pids/seaf-server.pid -p /srv/seafile/runtime
2023-02-06 22:00:24 seafile-controller.c(116): spawned seaf-server, pid 9038
2023-02-06 22:00:34 seafile-controller.c(447): pid file /srv/pids/seafdav.pid does not exist
2023-02-06 22:00:34 seafile-controller.c(526): seafdav need restart...
2023-02-06 22:00:34 seafile-controller.c(82): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /srv/logs/seafdav.log --pid /srv/pids/seafdav.pid --port 8031 --host 0.0.0.0
2023-02-06 22:00:34 seafile-controller.c(116): spawned /usr/bin/python3, pid 9111
2023-02-06 22:00:35 seafile-controller.c(124): Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/srv/seafile/seahub/thirdpart/wsgidav/server/server_cli.py", line 43, in <module>
    from wsgidav.dc.domain_controller import SeafileDomainController
  File "/srv/seafile/seahub/thirdpart/wsgidav/dc/domain_controller.py", line 7, in <module>
    from wsgidav.dc import seahub_db
  File "/srv/seafile/seahub/thirdpart/wsgidav/dc/seahub_db.py", line 6, in <module>
    from sqlalchemy.orm import sessionmaker
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/__init__.py", line 56, in <module>
    from .decl_api import add_mapped_attribute as add_mapped_attribute
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/decl_api.py", line 151, in <module>
    @compat_typing.dataclass_transform(
TypeError: dataclass_transform() got an unexpected keyworP▒▒▒U2023-02-06 22:00:35 seafile-controller.c(124): d argument 'field_specifiers'
st):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/srv/seafile/seahub/thirdpart/wsgidav/server/server_cli.py", line 43, in <module>
    from wsgidav.dc.domain_controller import SeafileDomainController
  File "/srv/seafile/seahub/thirdpart/wsgidav/dc/domain_controller.py", line 7, in <module>
    from wsgidav.dc import seahub_db
  File "/srv/seafile/seahub/thirdpart/wsgidav/dc/seahub_db.py", line 6, in <module>
    from sqlalchemy.orm import sessionmaker
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/__init__.py", line 56, in <module>
    from .decl_api import add_mapped_attribute as add_mapped_attribute
  File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/orm/decl_api.py", line 151, in <module>
    @compat_typing.dataclass_transform(
TypeError: dataclass_transform() got an unexpected keyworP▒▒▒Uroot@serv01:/srv/logs#

Greetings, Dominik Miskovic

laur89 commented 1 year ago

Need more info. How did you install the seafile? If it's installed in another environment than the official docker image, then what OS, packages et al are you using?

Did it start erroring only after you configured seafdav.conf?

kouyk commented 1 year ago

This appears to be caused by recent changes made to sqlalchemy that seafdav depends on, these changes are introduces in v2.0.0 and the workaround is to install any version below that. This fix has been employed for official docker images for Seafile Server v10 as well, you may find the changes here. The latest docker image (v9.0.10 as of writing) was build prior to the release of sqlalchemy v2 and thus works.