Seafdav not working

@bionade24 I appreciate your suggestions. That seemed to do it! I’ll continue to test it today and come back if I find any more issues :smiley:

here is my Apache config, for the HTTPS (443) site:

  ServerName seafile.mydomain.com
  DocumentRoot /mnt/data/websites/seafile.mydomain.com

  SSLEngine On
  SSLCertificateFile /path/to/fullchain.pem
  SSLCertificateKeyFile /path/to/privkey.pem

  Alias /media /mnt/data/SeafileFiles/seafile-server-latest/seahub/media

  <Location /media>
    ProxyPass !
    Require all granted
  </Location>

  RewriteEngine On

  # seafile fileserver
  ProxyPass /seafhttp http://127.0.0.1:8082
  ProxyPassReverse /seafhttp http://127.0.0.1:8082
  RewriteRule ^/seafhttp - [QSA,L]

  # seahub
  SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
  SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
  #ProxyPass / fcgi://127.0.0.1:8000/
  ProxyPass / http://127.0.0.1:8000/
  ProxyPassReverse / http://127.0.0.1:8000/

#webdav
ProxyPass /seafdav http://127.0.0.1:8089/seafdav
ProxyPassReverse /seafdav http://127.0.0.1:8089/seafdav

  ErrorLog /var/log/apache2/seafile_error.log
  LogLevel error
  TransferLog /var/log/apache2/seafile_access.log

And this is the HTTP site:

DocumentRoot /mnt/data/websites/seafile.mydomain.com
Alias /media /mnt/data/SeafileFiles/seafile-server-latest/seahub/media
ServerName seafile.mydomain.com

RewriteEngine On

<Location /media>
  Require all granted
</Location>

<Directory "/mnt/data/websites/seafile.mydomain.com">
allow from all
Options None
Require all granted
</Directory>

# seafile fileserver
ProxyPass /seafhttp http://127.0.0.1:8082
ProxyPassReverse /seafhttp http://127.0.0.1:8082
RewriteRule ^/seafhttp - [QSA,L]

# seahub
#SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
#ProxyPass / fcgi://127.0.0.1:8000/
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/

# webdav
ProxyPass /seafdav http://127.0.0.1:8089/seafdav
ProxyPassReverse /seafdav http://127.0.0.1:8089/seafdav

ErrorLog /var/log/apache2/seafile_error.log
LogLevel error
TransferLog /var/log/apache2/seafile_access.log

Should have also said that only the 443 site is used.

I just got through fighting this myself.

Move the seahub proxy lines to the bottom, they are capturing your seafdav requests.

@arjones85, thanks! This seems to work. At least the iPad apps now authenticate and show the expected folder structures. I will have to do some testing that it works as expected.

Anyone from Seafile watching this thread is probably worth mentioning the correct order of the webserver config files in documentation / wikis.

I’m having the exact same problem as @paapereira. Is there really no solution for this?

I’ve tried a bunch of things in regards to wsgidav (had an issue opened here) but seemingly nothing helps.

No ideas? :frowning:

On Arch Linux ?

I forgot to mention that; I’m running Debian Stretch.

There are many people who get it working on debian 9, I would open a new thread and describe my problem clearly with configs and logs. Then they’ll help you :grinning:

Yes, including myself. I had it working back on my old server. Thing is, that I experience the exact same issue as OP. I’ve checked my logs, read every post and here and I really got nothing more to add. All in all, I don’t think it’s related to Arch/Debian. :\

Arch uses Python 3.6.5 as default and even modules, which aren’t currently stable on debian. Nobody knows where, but since over 3 people tried it there is a issue because of the other default version.

If I got python3.5 installed, would that perhaps cause issues? I’m not sure which is the default.

python -V will let you know what version the path points to as long as you aren’t in the python folder.

@wthess yea it says Python 2.7.13 so I’m definitely using the right version.

Any other ideas? I really want webdav. I’ve tried updatering from 6.2.5 to 6.3.2 but it made no difference.

Do your log files have the same errors? Also, does the process run and then terminate within a few seconds? The issue does not appear to be related to Seafile, but rather elsewhere…

When SeaDrive was released, I stopped using WebDav due to the numerous problems with it. And, that’s not just limited to Seafile. WebDav has given me fits on all OS’s, all web servers, etc over the years.

I’m running Debian Stretch as well. Time permitting, I may try to set up webdav to see if I can reproduce the problem.

The same logs about the webdav server needing restarting appears in my controller.log. From what I can tell it seems identical to OPs issue.

Should this command be working?:

/usr/bin/python2.7 -m wsgidav.server.run_server --log-file /opt/apps/drive/logs/seafdav.log --pid /opt/apps/drive/pids/seafdav.pid --port 8282 --host 0.0.0.0
/usr/bin/python2.7: No module named wsgidav.server

OP’s issue had to do with the process starting and then terminating within a couple of seconds after starting.

Yours appears to be missing a module…

From a linux prompt, try this command and report the results…

wsgidav --version -v

Also, you might try: pip list and see if wsgidav or cheroot are in there.

OP also pointed this out in his initial post, though.

I’ve tried installing, reinstalling and upgrading wsgidav using pip, pip2 or easy_install both as root and as the user that runs seafile. No difference.

This is the output of the version command for wsgidav:

/usr/lib/python2.7# wsgidav --version -v
Traceback (most recent call last):
File “/usr/local/bin/wsgidav”, line 11, in
load_entry_point(‘WsgiDAV==3.0.0a3’, ‘console_scripts’, ‘wsgidav’)()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 479, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2703, in load_entry_point
return ep.load()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2321, in load
return self.resolve()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources/init.py”, line 2327, in resolve
module = import(self.module_name, fromlist=[‘name’], level=0)
ImportError: No module named wsgidav.server.server_cli

pip list shows a lot of modules i got installed, including cheroot (6.3.3), WsgiDAV (3.0.0a3) and WSGIserver (1.3)

I had to go back and read, and I do see now where he mentioned it in his original post. Just needed to refresh my mind.

So, wsgidav is looking for a module that it can’t find… Therein lies the problem. What should have happened with the command was it returning the wsgidav version number, the python version it relies on, and some info about your OS.

According to the wsgidav docs, 3.0.0a3 is in beta, released this week, according to the docs. I will dig into the docs to see if there is some kind of issue between wsgidav 3 and python 2.7. It’s possible that there may be a new dependency .

Found this, from two months ago… Same exact problem you are having. Appears to be an issue in version 3 of wsgidav. A workaround is included, but my suggestion is to try going back to the latest release of version 2.