Seafdav not working

firstly my seafdav.conf looks like:

[WEBDAV]
enabled = true
port = 8080
fastcgi = false
share_name = /seafdav

in CE 6.3.2 ubuntu@ARM I see when seafdav is running:

seafile 10212 10207 0 Jul12 ? 00:03:39 /usr/bin/python2.7 -m wsgidav.server.run_server --log-file /media/sda/seafile/logs/seafdav.log --pid /media/sda/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0

@mydoom could you please list ls -l the content of these directories:

/home/seafile/seafile-server-latest/seahub/thirdpart
/home/seafile/seafile-server-latest/seahub/thirdpart/wsgidav
/home/seafile/seafile-server-latest/seahub/thirdpart/wsgidav/server

check that run_server exists, because it is called by the python path.

BTW, there is no necessity for external WsgiDAV 2.3.0, the system calls the same python module which is pleaced on /thirdpart, at least in seafile CE rpi-version, which works out of the box, without pip install wsgidav. See here my “pip list”:

Package              Version
-------------------- ----------------------
acme                 0.24.0
appdirs              1.4.3
asn1crypto           0.24.0
attrs                18.1.0
Automat              0.6.0
beautifulsoup4       4.6.0
certifi              2018.4.16
chardet              3.0.4
ConfigArgParse       0.13.0
configobj            5.0.6
configparser         3.5.0
constantly           15.1.0
cryptography         1.9
decorator            4.3.0
dnspython            1.15.0
docopt               0.6.2
enum34               1.1.2
funcsigs             1.0.2
future               0.16.0
html5lib             1.0.1
hyperlink            18.0.0
idna                 2.6
imageio              2.3.0
incremental          17.5.0
ipaddress            1.0.22
josepy               1.1.0
Landscape-Client     16.3+bzr834
lxml                 3.5.0
mercurial            3.7.3
mock                 2.0.0
moviepy              0.2.3.5
mysqlclient          1.3.7
ndg-httpsclient      0.5.0
ngxtop               0.0.2
numpy                1.14.3
olefile              0.45.1
packaging            17.1
PAM                  0.4.2
parsedatetime        2.4
pbr                  4.0.3
Pillow               5.1.0
pip                  10.0.1
pip-review           1.0
pipdate              0.2.4
psutil               5.0.1
pyasn1               0.4.3
pyasn1-modules       0.0.7
pycparser            2.18
pycrypto             2.6.1
PyICU                1.9.2
pyOpenSSL            17.3.0
pyparsing            2.2.0
pyRFC3339            1.0
pyserial             3.0.1
Pyste                0.9.10
python-apt           1.1.0b1+ubuntu0.16.4.2
python-debian        0.1.32
python-memcached     1.59
python2-pythondialog 3.3.0
pytz                 2018.4
requests             2.18.4
requests-toolbelt    0.8.0
service-identity     17.0.0
setuptools           39.2.0
simplejson           3.8.1
six                  1.11.0
tabulate             0.8.2
tqdm                 4.23.4
Twisted              18.4.0
urllib3              1.22
webencodings         0.5.1
wheel                0.29.0
zope.component       4.4.1
zope.event           4.3.0
zope.hookable        4.2.0
zope.interface       4.5.0

Check /home/seafile/seafile-server-latest/seahub/thirdpart/wsgidav/server # cat run_server.py for more infos about seafdav/wsgidav

and have fun :slight_smile:

Edited: Added picture

and working with Bitkinex Client as well.

@jobenvil thanks a ton for the suggestion to look in run_server. I took a look and noticed it talking about using “CherryPy” if it is installed. I checked mine and I had python-cherrypy installed. I removed it and webdav started! :slight_smile: so it would seem the issue can occur when having CherryPy installed, atleast in my situation. Not sure why I had it installed.

Thanks for your help

1 Like

the thread started to be too long :wink:

Not sure if the original problem is solved.

I run Arch Linux and had the same issue, where seafdav would not run, kept spawning but would exit immediately.

2021-10-19 17:23:21 seafile-controller.c(416): pid file /opt/seafile/pids/seafdav.pid does not exist
2021-10-19 17:23:21 seafile-controller.c(443): seafdav need restart...
2021-10-19 17:23:21 seafile-controller.c(81): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8081 --host 0.0.0.0
2021-10-19 17:23:31 seafile-controller.c(416): pid file /opt/seafile/pids/seafdav.pid does not exist
2021-10-19 17:23:31 seafile-controller.c(443): seafdav need restart...
2021-10-19 17:23:31 seafile-controller.c(81): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8081 --host 0.0.0.0
2021-10-19 17:23:41 seafile-controller.c(416): pid file /opt/seafile/pids/seafdav.pid does not exist
2021-10-19 17:23:41 seafile-controller.c(443): seafdav need restart...
2021-10-19 17:23:41 seafile-controller.c(81): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid --port 8081 --host 0.0.0.0

All above answers did not work.

I created a wrapper which runs seafdav manually. I copied seahub.sh and changed the start-command to start the following script instead of seahub. Let’s call it seafdav.sh:

#!/usr/bin/python
import sys
import re
sys.path.insert(0, "/opt/seafile/seafile-server-latest/seahub/seahub")
sys.path.insert(0, "/opt/seafile/seafile-server-latest/seahub/thirdpart")
sys.path.insert(0, "/opt/seafile/seafile-server-latest/seahub/thirdpart/wsgidav")
sys.path.insert(0, "/opt/seafile/seafile-server-latest/seahub/thirdpart/wsgidav/server")
sys.path.insert(0, "/opt/seafile/seafile-server-latest/conf")
import seahub_settings

from wsgidav.server.server_cli import run
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(run())

To run seafdav, now call:
./seafdav.sh --server gunicorn --root / --port 8081 --host 0.0.0.0 --log-file /opt/seafile/logs/seafdav.log --pid /opt/seafile/pids/seafdav.pid

So it loads the python module wsgidav (from seafile) and starts it.