Tryton - Issues

 

Issue1662

Title WebDAV lock management
Priority feature Status closed
Superseder Nosy List ced, gohle, pokoli
Type Components
Assigned To Keywords
Reviews

Created on 2010-08-27.14:35:10 by gohle, last changed by pokoli.

Files
File name Uploaded Type Edit Remove
tryton-webdav-log.rtf gohle, 2010-08-27.17:38:47 text/rtf
Messages
msg33989 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2017-06-09.12:18:44
I'm closing this as webdav is no longer supported.
msg6825 (view) Author: [hidden] (gohle) Date: 2010-09-06.11:55:57
Dear C├ędric,

Yes it is activated. I also tried without. No change.
> - you try to fetch pdf report but Ooo failed to start (it is  
> required to convert odt into pdf)
This is a problem that occurs, when I start trytond on the console to  
get a detailed log. Not sure why. But it is not a related problem. The  
behaviour remains the same when started using an init script, where Oo  
works.
> - the client try to write to the root "/" but it is readonly in  
> Tryton. Did you try to mount the database name repository instead of  
> "/"?
I also tried mounting the database name. No change.

Greetings,
Christoph.
msg6804 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2010-08-31.23:05:37
Here is some remarks about the log file:

- it seems that the client try to make ssl connection. Did you activate it?
- you try to fetch pdf report but Ooo failed to start (it is required to convert odt into pdf)
- the client try to write to the root "/" but it is readonly in Tryton. Did you try to mount the database name repository instead of "/"?
msg6787 (view) Author: [hidden] (gohle) Date: 2010-08-27.17:50:43
And again...,

I found that I was a little bit too impatient with the lockup during copy. After some minutes without killing the server, the copy is aborted and I get the following on the console:

^C----------------------------------------
Exception happened during processing of request from ('::ffff:10.0.2.2', 62599, 0, 0)
Traceback (most recent call last):
  File "/usr/lib/python2.6/SocketServer.py", line 558, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/pymodules/python2.6/DAV/AuthServer.py", line 215, in handle
    AuthRequestHandler.handle(self)
  File "/usr/lib/pymodules/python2.6/DAV/AuthServer.py", line 134, in handle
    method()
  File "/usr/lib/pymodules/python2.6/DAV/WebDAVServer.py", line 418, in do_PUT
    body=self.rfile.read(atoi(l))
  File "/usr/lib/python2.6/socket.py", line 353, in read
    data = self._sock.recv(left)
SysCallError: (-1, 'Unexpected EOF')
----------------------------------------
[Fri Aug 27 17:22:47 2010] INFO:server:stopped

Have a nice weekend,
Christoph
msg6786 (view) Author: [hidden] (gohle) Date: 2010-08-27.17:43:35
Hi again,
another thing (probably unrelated) I noticed when using webdav with ssl was the following:
----------------------------------------
Exception happened during processing of request from ('::ffff:10.0.2.2', 62479, 0, 0)
Traceback (most recent call last):
  File "/usr/lib/python2.6/SocketServer.py", line 558, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.6/SocketServer.py", line 320, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.6/SocketServer.py", line 615, in __init__
    self.handle()
  File "/usr/lib/pymodules/python2.6/DAV/AuthServer.py", line 215, in handle
    AuthRequestHandler.handle(self)
  File "/usr/lib/pymodules/python2.6/DAV/AuthServer.py", line 80, in handle
    self.raw_requestline = self.rfile.readline()
  File "/usr/lib/python2.6/socket.py", line 406, in readline
    data = self._sock.recv(self._rbufsize)
Error: [('SSL routines', 'SSL23_READ', 'ssl handshake failure')]
----------------------------------------

it appears in quite frequently (on the console, not in the log file). When switching off SSL it is gone. The other errors described before remain.

Just to let you know.
Greetings
msg6784 (view) Author: [hidden] (gohle) Date: 2010-08-27.17:38:47
I have tested it. with little success:

I have set lockemulation = True

as you suggested. The result is, that Mac OS Finder mounts the share as read/write. So far so good.
BUT: when one tries to write to one of the directories it fails. there is two cases I have tried:
-Opening an existing text file, edit it and write the file back. 
-Copying a new file to one folder.
both things fail. In the latter case, the thread doing this file operation locks up. I.e. the trytond is still responding (also to webdav requests) but it has to be killed with SIGKILL if you want to stop it. On the client side (Finder) the copy operation never finishes until the server is killed.

Rewriting a file fails with the following output:
----------
::ffff:10.0.2.2 - - [27/Aug/2010 17:12:50] "PROPFIND /testdb/Einkauf/000001-6/._Readme.txt HTTP/1.1" 404 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:12:50] "PROPFIND /testdb/Einkauf/ HTTP/1.1" 207 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:12:50] "GET /testdb/Einkauf/000001-6/Readme.txt HTTP/1.1" 200 -
  . #### here is where I opened the file ####
  .
  . #### a lot of other stuff inbetween #####
  .
  .
::ffff:10.0.2.2 - - [27/Aug/2010 17:13:20] "MKCOL /.TemporaryItems HTTP/1.1" 401 -
[Fri Aug 27 17:13:20 2010] INFO:database:connect to ".TemporaryItems"
::ffff:10.0.2.2 - - [27/Aug/2010 17:13:20] code 401, message Authorization Required
::ffff:10.0.2.2 - - [27/Aug/2010 17:13:20] "MKCOL /.TemporaryItems HTTP/1.1" 401 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:13:21] "PROPFIND /testdb/Einkauf/000001-6/(TextEdit-Dokument%20sichern) HTTP/1.1" 404 -
[Fri Aug 27 17:13:21 2010] ERROR:webdav:Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/trytond-1.6.1-py2.6.egg/trytond/protocols/webdav.py", line 315, in mkcol
    cache=CACHE)
  File "/usr/local/lib/python2.6/dist-packages/trytond-1.6.1-py2.6.egg/trytond/webdav/webdav.py", line 549, in mkcol
    raise DAV_Forbidden
DAV_Forbidden: (403, '')
-------------------------------------


copying a file fails with the following output:
------------------------------------
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:54] "PROPFIND /testdb/Einkauf/000001-6/test.py HTTP/1.1" 404 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:54] "PROPFIND /testdb/Einkauf/000001-6/test.py HTTP/1.1" 404 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:54] "PUT /testdb/Einkauf/000001-6/test.py HTTP/1.1" 201 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:54] "PROPFIND /testdb/Einkauf/000001-6/._test.py HTTP/1.1" 404 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:55] "PROPFIND /testdb/Einkauf/000001-6/test.py HTTP/1.1" 207 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:56] "PROPFIND /testdb/Einkauf/000001-6/._Purchase-255.pdf HTTP/1.1" 404 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:56] "PROPFIND /testdb/Einkauf/000001-6/._test.py HTTP/1.1" 404 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:56] "PROPFIND /testdb/Einkauf/000001-6/ HTTP/1.1" 207 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:56] "PUT /testdb/Einkauf/000001-6/._test.py HTTP/1.1" 201 -
::ffff:10.0.2.2 - - [27/Aug/2010 17:14:56] "LOCK /testdb/Einkauf/000001-6/._test.py HTTP/1.1" 200 -
-----------------------------------------------

An (essentially) complete log is attached.
msg6783 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2010-08-27.14:51:47
Testing are welcome.
You can set lockemulation to True in http://hg.tryton.org/hgwebdir.cgi/trytond/file/48206780871e/trytond/protocols/webdav.py#l59
msg6782 (view) Author: [hidden] (gohle) Date: 2010-08-27.14:35:09
Webdav GUI tools like MacOS Finder and Windows Explorer require the WebDAV server to implement file locking. This seems not to be done for the Tryton WebDAV. 
Therefore Mac OS Finder (and iCal) only allow read access while Windows Explorer refuses to connect.
Is there a reason for this? Could it be changed?
History
Date User Action Args
2017-06-09 12:18:44pokolisetstatus: chatting -> closed
nosy: + pokoli
messages: + msg33989
2011-07-24 15:36:39cedsettitle: WebDAV/CalDAV write access -> WebDAV lock management
2010-09-06 11:55:58gohlesetmessages: + msg6825
2010-08-31 23:05:38cedsetmessages: + msg6804
2010-08-27 17:50:43gohlesetmessages: + msg6787
2010-08-27 17:43:35gohlesetmessages: + msg6786
2010-08-27 17:40:04gohlesetfiles: - tryton-webdav-log.rtf
2010-08-27 17:39:59gohlesetmessages: - msg6785
2010-08-27 17:39:02gohlesetfiles: + tryton-webdav-log.rtf
messages: + msg6785
2010-08-27 17:38:48gohlesetfiles: + tryton-webdav-log.rtf
messages: + msg6784

Showing 10 items. Show all history (warning: this could be VERY long)