ZSyncer and Zope-2.8.0
Hi, I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page templates...) between a Zope-2.7.6 source database and a Zope-2.8.0 destination database (both on Solaris with Python 2.3.4). I'm using a user which have a "Manager" role on both sides, but I can't manage ZSyncer to work : an "Unauthorized" exception is always raised ! I can't even manage to see a listing of the different folders. Any help would be great !! Thanks, Thierry
Am Freitag, 5. August 2005 09:16 schrieb Thierry FLORAC:
Hi,
I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page templates...) between a Zope-2.7.6 source database and a Zope-2.8.0 destination database (both on Solaris with Python 2.3.4). I'm using a user which have a "Manager" role on both sides, but I can't manage ZSyncer to work : an "Unauthorized" exception is always raised ! I can't even manage to see a listing of the different folders.
Any help would be great !!
hi thierry, i've seen the same. i get around it by including username:password into the url of the remote syncer, something like http://username:passwor@the.other.zsyncer.com/ZSyncer hope this helps, sascha
Note, I have done zero testing of zsyncer with zope 2.8. It is not officially supported yet. If it works, lucky you ;-) -PW
Am Freitag, 5. August 2005 09:16 schrieb Thierry FLORAC:
Hi,
I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page templates...) between a Zope-2.7.6 source database and a Zope-2.8.0 destination database (both on Solaris with Python 2.3.4). I'm using a user which have a "Manager" role on both sides, but I can't manage ZSyncer to work : an "Unauthorized" exception is always raised ! I can't even manage to see a listing of the different folders.
Any help would be great !!
hi thierry,
i've seen the same. i get around it by including username:password into the url of the remote syncer, something like
http://username:passwor@the.other.zsyncer.com/ZSyncer
hope this helps,
sascha _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Well... so I'm probably unlucky !! I've also tested with Sascha's method (http://username:passwd@...) but then I have a 'host/servname not known' error :-( !! I'm probably going to wait for a 2.8 compatible release... Thierry On Fri, 2005-08-05 at 08:51 -0500, Paul Winkler wrote:
Note, I have done zero testing of zsyncer with zope 2.8. It is not officially supported yet. If it works, lucky you ;-)
-PW
Am Freitag, 5. August 2005 09:16 schrieb Thierry FLORAC:
Hi,
I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page templates...) between a Zope-2.7.6 source database and a Zope-2.8.0 destination database (both on Solaris with Python 2.3.4). I'm using a user which have a "Manager" role on both sides, but I can't manage ZSyncer to work : an "Unauthorized" exception is always raised ! I can't even manage to see a listing of the different folders.
Any help would be great !!
hi thierry,
i've seen the same. i get around it by including username:password into the url of the remote syncer, something like
http://username:passwor@the.other.zsyncer.com/ZSyncer
hope this helps,
sascha
Thierry FLORAC wrote at 2005-8-5 09:16 +0200:
... I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (page templates...) between a Zope-2.7.6 source database and a Zope-2.8.0 destination database (both on Solaris with Python 2.3.4). I'm using a user which have a "Manager" role on both sides, but I can't manage ZSyncer to work : an "Unauthorized" exception is always raised ! I can't even manage to see a listing of the different folders.
Any help would be great !!
Reconfigure your "error_log" object not to ignore "Unauthorized". Try again and see what the traceback tells you... -- Dieter
In my, similar, situation it is:: Traceback (innermost last): Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Products.ZSyncer.ZSyncer, line 1199, in call_ Unauthorized: You are not allowed to access 'manage_listObjects' in this context If I try Sascha's username:password@ workaround, I get:: ... File "/zope1/Products/ZSyncer/ZSyncer.py", line 1050, in _getRemoteList return serverconn.manage_listObjects(path) File "/zope1/Products/ZSyncer/ConnectionMgr.py", line 164, in __call__ raise IOError, msg IOError: http://user:pass@root2.joyful.com/zsyncer/call_: 400 - Bad Request Bad Request (Invalid Hostname)
Am Samstag, 13. August 2005 02:11 schrieb Simon Michael:
If I try Sascha's username:password@ workaround, I get::
it may well be that the username:password thingy was introduced in the CVS at some point, but not in any release so far. sad thing is, last time I checked the HEAD wasn't usable. I'm running a checkout with (date-)tag "D2005.06.03.08.13.48". having said that, it look as if there were checkins just two day ago, may be the HEAD is in order again...? Hope that helps, Sascha
Am Samstag, 13. August 2005 02:11 schrieb Simon Michael:
If I try Sascha's username:password@ workaround, I get::
it may well be that the username:password thingy was introduced in the CVS at some point, but not in any release so far. sad thing is, last time I checked the HEAD wasn't usable. I'm running a checkout with (date-)tag "D2005.06.03.08.13.48".
having said that, it look as if there were checkins just two day ago, may be the HEAD is in order again...?
The trunk should now be in usable condition, I hope. I´m sorry it was broken for so long. I am on vacation now, and unlikely to respond in this thread again until I return on 8/21. Within a week thereafter, I hope to tag and release zsyncer 0.7-beta1. -PW
Am Montag, 15. August 2005 00:54 schrieb Paul Winkler:
The trunk should now be in usable condition, I hope. I´m sorry it was broken for so long. I am on vacation now, and unlikely to respond in this thread again until I return on 8/21. Within a week thereafter, I hope to tag and release zsyncer 0.7-beta1.
Hi Paul, thanks for the info. Just to let you know, I just cvs upped to the trunk, but unfortunately syncing didn't work for me. To make a long story short, i append a small diff against the trunk that seems to work for me (not thoroughly tested, though, and not perfect about authorization). Heres what happened: I've always seen this error: Module Products.ZSyncer.ZSyncer, line 1503, in call_ Module copy_reg, line 69, in _reduce_ex TypeError: can't pickle function objects Which I can get around by changing line 1501 of ZSyncer.py from result = sys.exc_info()[:2] to result = (str(sys.exc_info()[0]), str(sys.exc_info()[1])) Which in turn tells me, that security bites me. This happens no matter if I use the current account or the http://username:password@server.url/. I double checked permissions, Manager Role is Allowed to "User ZSyncer" and "View Management Screens". Good news is, Dieter gave a hint about to exchange "validateValue" with "validate", which seems to help (at least for the username:password thingy; it still wont sync with the current user for me). Incidentally, I stumbled about a problem when an object is on the remote syncer, but not the local, which seems to be fixed by an addition to an except clause; and finally I found that if you want to browse ZClasses for syncing, a reordering of an if/elif is necessary. Hope someone finds it useful. Cheers, Sascha
Am Montag, 15. August 2005 22:20 schrieb Sascha Ottolski:
To make a long story short, i append a small diff against the trunk that seems to work for me (not thoroughly tested, though, and not perfect about authorization).
sorry for replying to myself, just noticed that while browsing of ZClasses via ZSyncer works with my patch, diffing and syncing of methods still doesn't. the problem seems to lie in traverseFromRoot(self, relative_path) but I wasn't able to fix it. I think something about how to acces an attribute belonging to someZClass.propertysheets.methods. Cheers, Sascha
Am Montag, 15. August 2005 22:20 schrieb Sascha Ottolski:
To make a long story short, i append a small diff against the trunk that seems to work for me (not thoroughly tested, though, and not perfect about authorization).
sorry for replying to myself, just noticed that while browsing of ZClasses via ZSyncer works with my patch, diffing and syncing of methods still doesn't. the problem seems to lie in
traverseFromRoot(self, relative_path)
but I wasn't able to fix it. I think something about how to acces an attribute belonging to someZClass.propertysheets.methods.
Thanks for the update... but I'm still unlikely to get a chance to investigate issues running under 2.8 soon. I would like to do so before zsyncer 0.7 final, but I don't know when that will be. I think with my deadlines, I may be forced to wait for Dieter's experiences with patching whatever version he's working on, and see if I can apply similar fixes to the trunk.
Simon Michael wrote at 2005-8-12 17:11 -0700:
...
We will switch to Zope 2.8.1 within the next 2 to 3 weeks. As ZSyncer is a vital product for us, I will be forced to fix any problem it may have with Zope 2.8.1 and I will report back. Note, that we use a ZSyncer version which no longer uses XML-RPC but "ZPublisher.Client" to make its remote requests. When I remember right, Paul incorporated this change in some recent "ZSyncer" version. Are you using a current version? In that case, the problem is probably either * "ZPublisher.Client" no longer passing authentication info correctly (less likely -- almost surely nothing was changed there) * much more likely: the "validateValue" in "Products.ZSyncer.ZSyncer.ZSyncer.call_" no longer works. def call_(self,request): '''decode *request* and execute it.''' method,args= loads(request) m= getattr(self,method) if not getSecurityManager().validateValue(m): raise Unauthorized .... Jim had to change parts of the permission system for Zope 2.8 to the effect that validation without name is no longer possible. This means that "validateValue" must try to get a name and there may be a bug in the name detection. Try replacing "validateValue(m)" by "validate(self, self, method, m)". -- Dieter
Note, that we use a ZSyncer version which no longer uses XML-RPC but "ZPublisher.Client" to make its remote requests. When I remember right, Paul incorporated this change in some recent "ZSyncer" version.
correct. I don´t remember right now which was the first release to feature your zpublisher.client code, possibly it was 0.6.0. note that Alan Milligan subsequently contributed another transport back-end, as he was having problems with ZPublisher.Client not working over SSL as I recall. Alan´s "ConnectionMgr" seems to work well, nobody has reported problems with it so it´s now the default since at least 0.6.1. The ZPublisher.Client code is still a configurable option and still works AFAIK. The old XML-RPC code is still there, but it has not worked in a long time and will likely be removed soon. It is a poor choice for the application anyway IMHO, as there´s nothing to gain and many resources to lose by encoding and decoding large blobs as XML. Also note, Dieter, the zsyncer trunk is substantially different from the 0.6 series, with lots of internal changes, some new methods, and some public method signature changes. So if you want to work on zope 2.8 support I would strongly encourage you to take a look at the trunk. One major improvement is that there are some unit tests now, over 30 at last count. There is still a lot of cleaning up to do, but the tests should hopefully make that easier to do. Finally, Dieter, if you want to get your changes into zsyncer without working through an intermediary, I´d be happy to give you checkin privileges. Do you have a Sourceforge account? -PW
Paul Winkler wrote at 2005-8-14 18:07 -0500:
.... Finally, Dieter, if you want to get your changes into zsyncer without working through an intermediary, I´d be happy to give you checkin privileges. Do you have a Sourceforge account?
Yes: "dmaurer". However, my time currently is quite pressed. I probably will just make our version work with Zope 2.8.1 and report what I did -- without even looking at your current version. -- Dieter
Paul Winkler wrote at 2005-8-14 18:07 -0500:
.... Finally, Dieter, if you want to get your changes into zsyncer without working through an intermediary, I´d be happy to give you checkin privileges. Do you have a Sourceforge account?
Yes: "dmaurer".
I'm back now - and I've just added dmaurer on sourceforge.
However, my time currently is quite pressed.
I probably will just make our version work with Zope 2.8.1 and report what I did -- without even looking at your current version.
Fair enough. -PW
participants (5)
-
Dieter Maurer -
Paul Winkler -
Sascha Ottolski -
Simon Michael -
Thierry FLORAC