Seafdav does not work (seafdav.pid problem)

@CertifiedG and @das_apfel check out this forum link and if you need further help I can post my nginx configuration. On my side seafdav with wsgi working fine with 6.2.3. Froehes neues :wink:

1 Like

Danke, dir auchn frohes Neues.

The issue is actually not related to Nginx but Seafile itself and sadly I´m not aware of any config file variables in order to be able to raise the logging verbosity.
Current log files don´t tell anything … other than it´s restarting the service.

WSGI works just fine. CE manual contains the config.

I have the same problem after upgrading to seafile-server_7.0.5_x86-64.tar.gz coming from seafile-server-6.3.4 (where I hadn’t any webdav problems) - is this problem maybe version specific?

I suppose your WebDAV server does not run. Can you check with
netstat -tulpn
if therer is a service listening on the port you configured in your seafdav.conf?
If there isn’t, post your seafdav.conf here as well as the seafdav.log.
Please also check this: Shutdown your Seafile Server and check the pids folder at ~/pids. If there is still a pids file for seafdav, then delete it, startup your Seafile Server and test WebDAV access.

My fault, following your advice I notied SeafDav is working just fine. I somehow mixed the problem with fuse problems I have and during my investigation for "Unknown erorr" and "Server error" status syncing libraries since Seafile Server CE 7.0.5? I found this topic.

However: I still have the log error Failed to init seahub db: No module named seahub_settings. but maybe this is more related to Seafile 7.0.2, seafdav bug "No module named seahub_settings.".

I am experiencing the same issue on 6.3.13. using standard seafdav.conf with wsgi or fcgi

netstat -tlpn not showing any python process listening on Port 8080

Don’t see any seafdav.log either (makes sense, if the process has never been started)

Anybody have an idea how to debug this? Can someone tell me how to set the correct environment to run

/usr/bin/python2.7 -m wsgidav.server.run_server runfcgi --log-file /data/seafile/logs/seafdav.log --pid /data/seafile/pids/seafdav.pid --port 8080 --host localhost

directly? Maybe that would produce more output than shown in the logs.

  • check the contain of logs/controller.log
  • post your conf/seafdav.conf file

controller.log

[05/14/20 07:27:13] seafile-controller.c(592): pid file /data/seafile/pids/seafdav.pid does not exist
[05/14/20 07:27:13] seafile-controller.c(629): seafdav need restart…
[05/14/20 07:27:13] seafile-controller.c(88): spawn_process: /usr/bin/python2.7 -m wsgidav.server.run_server runfcgi --log-file /data/seafile/logs/seafdav.log --pid /data/seafile/pids/seafdav.pid --port 8080 --host localhost
[05/14/20 07:27:13] seafile-controller.c(103): spawned /usr/bin/python2.7, pid 31583

seafdav.conf

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

(tried both “fastcgi = true/false”)

Based on your controller.log, I would assume that WebDAV is started and
a.) you should find a seafdav.pid in the /pids folder and
b.) netstat -tulpn should show a python process listingin on port 8080

I just started WebDAV on my server. This is relevant part from the controller log:

[05/14/20 10:27:09] seafile-controller.c(94): spawned seaf-server, pid 7979
[05/14/20 10:27:19] seafile-controller.c(414): pid file /home/seafile/pids/seafdav.pid does not exist
[05/14/20 10:27:19] seafile-controller.c(446): seafdav need restart…
[05/14/20 10:27:19] seafile-controller.c(79): spawn_process: /usr/bin/python3 -m wsgidav.server.server_cli --server gunicorn --root / --log-file /home/seafile/logs/seafdav.log --pid /home/seafile/pids/seafdav.pid --port 8888 --host 0.0.0.0
[05/14/20 10:27:19] seafile-controller.c(94): spawned /usr/bin/python3, pid 8029

There are some variances between yours an mine. Most of which can be explained by me using 7.1.3 on Python 3 and running WebDAV on port 8888 rather than 8080.

What strikes me odd is the bold part

Isn’t this the address WebDAV listens to? So only WebDAV requests from localhost is allowed?

Hi rdb,
thanks for looking into this!

i tried to alter the config to make the server listen on 0.0.0.0:8080

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

the logfile suggests that the setting is accepted:

[05/14/20 08:45:48] seafile-controller.c(103): spawned /usr/bin/python2.7, pid 2315
[05/14/20 08:45:58] seafile-controller.c(592): pid file /data/seafile/pids/seafdav.pid does not exist
[05/14/20 08:45:58] seafile-controller.c(629): seafdav need restart…
[05/14/20 08:45:58] seafile-controller.c(88): spawn_process: /usr/bin/python2.7 -m wsgidav.server.run_server --log-file /data/seafile/logs/seafdav.log --pid /data/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
[05/14/20 08:45:58] seafile-controller.c(103): spawned /usr/bin/python2.7, pid 2327
[05/14/20 08:46:08] seafile-controller.c(592): pid file /data/seafile/pids/seafdav.pid does not exist
[05/14/20 08:46:08] seafile-controller.c(629): seafdav need restart…
[05/14/20 08:46:08] seafile-controller.c(88): spawn_process: /usr/bin/python2.7 -m wsgidav.server.run_server --log-file /data/seafile/logs/seafdav.log --pid /data/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0
[05/14/20 08:46:08] seafile-controller.c(103): spawned /usr/bin/python2.7, pid 2332
[05/14/20 08:46:18] seafile-controller.c(592): pid file /data/seafile/pids/seafdav.pid does not exist
[05/14/20 08:46:18] seafile-controller.c(629): seafdav need restart…
[05/14/20 08:46:18] seafile-controller.c(88): spawn_process: /usr/bin/python2.7 -m wsgidav.server.run_server --log-file /data/seafile/logs/seafdav.log --pid /data/seafile/pids/seafdav.pid --port 8080 --host 0.0.0.0

but still netstat -tlpn not showing anything on port 8080 nor any pid file nor any logfile

How to run /usr/bin/python2.7 -m wsgidav.server.run_server runfcgi --log-file /data/seafile/logs/seafdav.log --pid /data/seafile/pids/seafdav.pid --port 8080 --host localhost directly from cli for debugging?

The thing is - from your controller.lgo

The process is started.

Do you find the process with top?

@rdb having “spawned” in the controller log file is not good. This means that the seafdav process is created again and again, which is confirmed by the @muellefr posted log files.

@muellefr I would double check that the seafdav.pid is writable by seafile user. By doubt, you could delete the pid file.

Absolutely! Sorry, I was mentally so stuck to the first post of the controller log (where there is no spawn every 10 seconds) that I totally overlooked it.

I checked the access rights on the pids folder. Everything seems to be writable by seafile-user. Also all other pid files are there. But seafdav.pid never gets created.

I could imagine this being a python problem. Maybe the best way would really be to run the server from cli, but I am lacking the ability to set the correct environment, to make the webdav-server find all the python modules.

part by part. Do you have the possibility to update Seafile to 7.0.5 (still python2.7) ? I think there were some issues with seafdav.

That’s not complicated, but check my earlier post.

I had some issues running the upgrade script because python3 does not take “%” in passwords well. Also - at least for production - I am still migrating former templates to new react config for 7.0/7.1.

But apart from that I could work out the update in a testing environment.

I just noticed that I get the same error on 7.1.3. After putting export PYTHONPATH=${INSTALLPATH}/seafile/lib/python3.7/site-packages:${INSTALLPATH}/seafile/lib64/python3.7/site-packages:${INSTALLPATH}/seahub:${INSTALLPATH}/seahub/thirdpart:$PYTHONPATH from seahub.sh in seafile.sh, the error is gone and seafdav starts. Wondering where the PYTHONPATH for seafdav is set since it is using libs from seahub/thirdparty but is started from seafile.sh.

I compared the two files (seafile.sh and seahub.sh) but the PYTHONPATH environment variable appears to be set to the same paths.