Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

seafdav not working #2645

Closed
dominikdev-m opened this issue Feb 7, 2023 · 2 comments
Closed

seafdav not working #2645

dominikdev-m opened this issue Feb 7, 2023 · 2 comments

Comments

@dominikdev-m
Copy link

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
Copy link

laur89 commented Mar 3, 2023

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
Copy link

kouyk commented Mar 20, 2023

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.

kouyk added a commit to kouyk/docker-seafile that referenced this issue Mar 20, 2023
This is due to incompatibility between sqlalchemy and the Python modules
used by Seafile. See
haiwen/seafile#2645 (comment)
for more details.
laur89 added a commit to laur89/docker-seafile that referenced this issue Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants