Hi all, I am trying to mount the ZODB of a Plone 2.0.5/Zope-2.7.6/Python 2.3.5 on a Plone 2.1.2/Zope-2.8.5/Python 2.3.5 I have created the appropriate entry in the zope.conf thus... <zodb_db weeble> mount-point /weeble <zeoclient> server 10.4.96.98:9999 storage 1 name zeostorage var $INSTANCE/var </zeoclient> </zodb_db> I know that this setup works on another Zope instance, because I cut and pasted it out of the zope.conf there. I do not believe that there are any firewall issues between the servers because a seperate instance on t the same machine is already connecting to this ZEO server. The problem that I have is that when I create a ZODB Mount Point, the weeble mount point appears available but when I click Create the browser just sits there waiting for a reply that never comes. The ZODB Mount Point is not created. The Zope instance, however, does not appear to deadlock; I can just stop the browser browse the ZMI perfectly well. Is this a Zope version issue? Is there a 'rule' in ZEO where it can only accept one connection from each client machine? Or have I just missed a step in the process? Many thanks in advance. Jonathan Cleaver Defence Academy - UK
Do you have the appropriate access to the directory on the server? (ie. the process zope runs as needs to be able to read/write to the directory on the server). Jonathan ----- Original Message ----- From: "Jonathan Cleaver" <jcleaver.hq@da.mod.uk> To: <zope@zope.org> Sent: Tuesday, May 09, 2006 7:50 AM Subject: [Zope] Mounting ZODB issue
Hi all,
I am trying to mount the ZODB of a Plone 2.0.5/Zope-2.7.6/Python 2.3.5 on a Plone 2.1.2/Zope-2.8.5/Python 2.3.5
I have created the appropriate entry in the zope.conf thus...
<zodb_db weeble> mount-point /weeble <zeoclient> server 10.4.96.98:9999 storage 1 name zeostorage var $INSTANCE/var </zeoclient> </zodb_db>
I know that this setup works on another Zope instance, because I cut and pasted it out of the zope.conf there. I do not believe that there are any firewall issues between the servers because a seperate instance on t the same machine is already connecting to this ZEO server.
The problem that I have is that when I create a ZODB Mount Point, the weeble mount point appears available but when I click Create the browser just sits there waiting for a reply that never comes. The ZODB Mount Point is not created. The Zope instance, however, does not appear to deadlock; I can just stop the browser browse the ZMI perfectly well.
Is this a Zope version issue? Is there a 'rule' in ZEO where it can only accept one connection from each client machine? Or have I just missed a step in the process?
Many thanks in advance.
Jonathan Cleaver Defence Academy - UK
_______________________________________________ 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 )
Many thanks for the advice. Yes, the user does have read/write access to the zeo/var directory on the server and all of its contents. Still no joy though. Jonathan Cleaver Jonathan wrote:
Do you have the appropriate access to the directory on the server? (ie. the process zope runs as needs to be able to read/write to the directory on the server).
Jonathan
----- Original Message ----- From: "Jonathan Cleaver" <jcleaver.hq@da.mod.uk> To: <zope@zope.org> Sent: Tuesday, May 09, 2006 7:50 AM Subject: [Zope] Mounting ZODB issue
Hi all,
I am trying to mount the ZODB of a Plone 2.0.5/Zope-2.7.6/Python 2.3.5 on a Plone 2.1.2/Zope-2.8.5/Python 2.3.5
I have created the appropriate entry in the zope.conf thus...
<zodb_db weeble> mount-point /weeble <zeoclient> server 10.4.96.98:9999 storage 1 name zeostorage var $INSTANCE/var </zeoclient> </zodb_db>
I know that this setup works on another Zope instance, because I cut and pasted it out of the zope.conf there. I do not believe that there are any firewall issues between the servers because a seperate instance on t the same machine is already connecting to this ZEO server.
The problem that I have is that when I create a ZODB Mount Point, the weeble mount point appears available but when I click Create the browser just sits there waiting for a reply that never comes. The ZODB Mount Point is not created. The Zope instance, however, does not appear to deadlock; I can just stop the browser browse the ZMI perfectly well.
Is this a Zope version issue? Is there a 'rule' in ZEO where it can only accept one connection from each client machine? Or have I just missed a step in the process?
Many thanks in advance.
Jonathan Cleaver Defence Academy - UK
_______________________________________________ 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 )
_______________________________________________ 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, setting my Zope to run in Debug mode has shed some light on it, but I still do not know how to fix this. On trying to connect to the ZODB, I am getting the following error: 2006-05-09 15:43:09 INFO ZEO.ClientStorage (14591) Testing connection <ManagedClientConnection ('10.4.96.96', 8000)> 2006-05-09 15:43:09 ERROR ZEO.zrpc.Connection(C) (10.4.96.96:8000) bad handshake 'Z201' 2006-05-09 15:43:09 ERROR ZEO.zrpc.Connection(C) (10.4.96.96:8000) Error caught in asyncore Traceback (most recent call last): File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 706, in pending self.handle_read_event() File "/usr/local/python2.3/lib/python2.3/asyncore.py", line 390, in handle_read_event self.handle_read() File "/home/zope2/Zope285/lib/python/ZEO/zrpc/smac.py", line 219, in handle_read self.message_input(msg) File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 791, in recv_handshake Connection.recv_handshake(self, proto) File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 379, in recv_handshake raise ZRPCError("bad handshake %r" % proto) ZRPCError: bad handshake 'Z201' 2006-05-09 15:43:09 ERROR ZEO.zrpc (14591) CW: error in testConnection (('10.4.96.96', 8000)) Traceback (most recent call last): File "/home/zope2/Zope285/lib/python/ZEO/zrpc/client.py", line 483, in test_connection self.preferred = self.client.testConnection(self.conn) File "/home/zope2/Zope285/lib/python/ZEO/ClientStorage.py", line 466, in testConnection auth = stub.getAuthProtocol() File "/home/zope2/Zope285/lib/python/ZEO/ServerStub.py", line 85, in getAuthProtocol return self.rpc.call('getAuthProtocol') File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 529, in call raise DisconnectedError() DisconnectedError Jonathan Cleaver wrote:
Many thanks for the advice.
Yes, the user does have read/write access to the zeo/var directory on the server and all of its contents.
Still no joy though.
Jonathan Cleaver
Jonathan wrote:
Do you have the appropriate access to the directory on the server? (ie. the process zope runs as needs to be able to read/write to the directory on the server).
Jonathan
----- Original Message ----- From: "Jonathan Cleaver" <jcleaver.hq@da.mod.uk> To: <zope@zope.org> Sent: Tuesday, May 09, 2006 7:50 AM Subject: [Zope] Mounting ZODB issue
Hi all,
I am trying to mount the ZODB of a Plone 2.0.5/Zope-2.7.6/Python 2.3.5 on a Plone 2.1.2/Zope-2.8.5/Python 2.3.5
I have created the appropriate entry in the zope.conf thus...
<zodb_db weeble> mount-point /weeble <zeoclient> server 10.4.96.98:9999 storage 1 name zeostorage var $INSTANCE/var </zeoclient> </zodb_db>
I know that this setup works on another Zope instance, because I cut and pasted it out of the zope.conf there. I do not believe that there are any firewall issues between the servers because a seperate instance on t the same machine is already connecting to this ZEO server.
The problem that I have is that when I create a ZODB Mount Point, the weeble mount point appears available but when I click Create the browser just sits there waiting for a reply that never comes. The ZODB Mount Point is not created. The Zope instance, however, does not appear to deadlock; I can just stop the browser browse the ZMI perfectly well.
Is this a Zope version issue? Is there a 'rule' in ZEO where it can only accept one connection from each client machine? Or have I just missed a step in the process?
Many thanks in advance.
Jonathan Cleaver Defence Academy - UK
_______________________________________________ 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 )
_______________________________________________ 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 )
_______________________________________________ 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 )
I have a short python script: gc = context.restrictedTraverse('coup/temp_folder/GarbageCollector', None) print 'gc=',str(gc) if gc: print 'GarbageCollector exists' else: print 'No GarbageCollector' which, when run produces: gc= <TransientObjectContainer at GarbageCollector> No GarbageCollector Which is really strange because 'gc' was just reported to be a TOC! When the script is changed to: gc = context.restrictedTraverse('coup/temp_folder/GarbageCollector', None) print 'gc=',str(gc) if gc is not None: print 'GarbageCollector exists' else: print 'No GarbageCollector' I get the expected response: gc= <TransientObjectContainer at GarbageCollector> GarbageCollector exists I think I am misunderstanding something basic about python/zope here. Why does a TOC object evaluate to false? Thanks, Jonathan
On 5/9/06, Jonathan <dev101@magma.ca> wrote:
I think I am misunderstanding something basic about python/zope here. Why does a TOC object evaluate to false?
Well, why not? If you are checking for none-ness, use "is None". Evaluating the object is wrong. If the TOC object evaluates to something empty as a side-effect of something, or because it explicitly is supposed to return something useful when evaluated, who in this case happens to be empty/false, is besides the point. It should be easy to figure out if you read the source, though. :-) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 9 May 2006, at 16:18, Jonathan wrote:
gc= <TransientObjectContainer at GarbageCollector> GarbageCollector exists
I think I am misunderstanding something basic about python/zope here. Why does a TOC object evaluate to false?
I think the basic misunderstanding is about what happens if you say... if FOO: ... Python will try to evaluate using steps such as looking for methods like __nonzero__, __len__, etc, and you're not aware what these may evaluate to given your object. A Folder, for example, evaluates to False when it is empty. You should use a different test to determine if that item exists. jens -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFEYLRlRAx5nvEhZLIRAmSWAKCxP+IjWYHEC/J1E8zDvq0R2OUB1wCePA74 Fm8Oc74d3dn915gDefbR1Yo= =FOpK -----END PGP SIGNATURE-----
Thanks to everyone for setting me straight! I have been (erroneously!) assuming that any defined object would evaluate to 'true'. Thanks again. Jonathan ----- Original Message ----- From: "Jens Vagelpohl" <jens@dataflake.org> To: "[Zope] Mailing List" <zope@zope.org> Sent: Tuesday, May 09, 2006 11:25 AM Subject: Re: [Zope] A quick zope/python question
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 9 May 2006, at 16:18, Jonathan wrote:
gc= <TransientObjectContainer at GarbageCollector> GarbageCollector exists
I think I am misunderstanding something basic about python/zope here. Why does a TOC object evaluate to false?
I think the basic misunderstanding is about what happens if you say...
if FOO: ...
Python will try to evaluate using steps such as looking for methods like __nonzero__, __len__, etc, and you're not aware what these may evaluate to given your object. A Folder, for example, evaluates to False when it is empty.
You should use a different test to determine if that item exists.
jens
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin)
iD8DBQFEYLRlRAx5nvEhZLIRAmSWAKCxP+IjWYHEC/J1E8zDvq0R2OUB1wCePA74 Fm8Oc74d3dn915gDefbR1Yo= =FOpK -----END PGP SIGNATURE----- _______________________________________________ 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 )
--On 9. Mai 2006 11:18:25 -0400 Jonathan <dev101@magma.ca> wrote:
I have a short python script:
gc = context.restrictedTraverse('coup/temp_folder/GarbageCollector', None) print 'gc=',str(gc) if gc: print 'GarbageCollector exists' else: print 'No GarbageCollector'
which, when run produces:
Check the implementation. "if obj" calls obj.__nonzero__() or obj.__len__().. depending on the implemenation this will explain the result
When the script is changed to:
gc = context.restrictedTraverse('coup/temp_folder/GarbageCollector', None) print 'gc=',str(gc) if gc is not None: print 'GarbageCollector exists' else: print 'No GarbageCollector'
This is the right way to do it. -aj -- ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany Web: www.zopyx.com - Email: info@zopyx.com - Phone +49 - 7071 - 793376 E-Publishing, Python, Zope & Plone development, Consulting
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jonathan Cleaver wrote:
Well, setting my Zope to run in Debug mode has shed some light on it, but I still do not know how to fix this. On trying to connect to the ZODB, I am getting the following error:
2006-05-09 15:43:09 INFO ZEO.ClientStorage (14591) Testing connection <ManagedClientConnection ('10.4.96.96', 8000)> 2006-05-09 15:43:09 ERROR ZEO.zrpc.Connection(C) (10.4.96.96:8000) bad handshake 'Z201' 2006-05-09 15:43:09 ERROR ZEO.zrpc.Connection(C) (10.4.96.96:8000) Error caught in asyncore Traceback (most recent call last): File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 706, in pending self.handle_read_event() File "/usr/local/python2.3/lib/python2.3/asyncore.py", line 390, in handle_read_event self.handle_read() File "/home/zope2/Zope285/lib/python/ZEO/zrpc/smac.py", line 219, in handle_read self.message_input(msg) File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 791, in recv_handshake Connection.recv_handshake(self, proto) File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 379, in recv_handshake raise ZRPCError("bad handshake %r" % proto) ZRPCError: bad handshake 'Z201' 2006-05-09 15:43:09 ERROR ZEO.zrpc (14591) CW: error in testConnection (('10.4.96.96', 8000)) Traceback (most recent call last): File "/home/zope2/Zope285/lib/python/ZEO/zrpc/client.py", line 483, in test_connection self.preferred = self.client.testConnection(self.conn) File "/home/zope2/Zope285/lib/python/ZEO/ClientStorage.py", line 466, in testConnection auth = stub.getAuthProtocol() File "/home/zope2/Zope285/lib/python/ZEO/ServerStub.py", line 85, in getAuthProtocol return self.rpc.call('getAuthProtocol') File "/home/zope2/Zope285/lib/python/ZEO/zrpc/connection.py", line 529, in call raise DisconnectedError() DisconnectedError
Jonathan Cleaver wrote:
Many thanks for the advice.
Yes, the user does have read/write access to the zeo/var directory on the server and all of its contents.
Still no joy though.
Jonathan Cleaver
Jonathan wrote:
Do you have the appropriate access to the directory on the server? (ie. the process zope runs as needs to be able to read/write to the directory on the server).
Jonathan
----- Original Message ----- From: "Jonathan Cleaver" <jcleaver.hq@da.mod.uk> To: <zope@zope.org> Sent: Tuesday, May 09, 2006 7:50 AM Subject: [Zope] Mounting ZODB issue
Hi all,
I am trying to mount the ZODB of a Plone 2.0.5/Zope-2.7.6/Python 2.3.5 on a Plone 2.1.2/Zope-2.8.5/Python 2.3.5
I have created the appropriate entry in the zope.conf thus...
<zodb_db weeble> mount-point /weeble <zeoclient> server 10.4.96.98:9999 storage 1 name zeostorage var $INSTANCE/var </zeoclient> </zodb_db>
I know that this setup works on another Zope instance, because I cut and pasted it out of the zope.conf there. I do not believe that there are any firewall issues between the servers because a seperate instance on t the same machine is already connecting to this ZEO server.
The problem that I have is that when I create a ZODB Mount Point, the weeble mount point appears available but when I click Create the browser just sits there waiting for a reply that never comes. The ZODB Mount Point is not created. The Zope instance, however, does not appear to deadlock; I can just stop the browser browse the ZMI perfectly well.
Is this a Zope version issue? Is there a 'rule' in ZEO where it can only accept one connection from each client machine? Or have I just missed a step in the process?
Many thanks in advance.
You probably need to upgrade the storage server to a newer ZODB version. From the README.txt in my ZODB-3_4-branch sandbox:
Compatibility -------------
ZODB 3.4 requires Python 2.3.4 or later. For best results, we recommend Python 2.3.5. Python 2.4.1+ can also be used.
The Zope 2.8 release is compatible with this version of ZODB. Note that Zope 2.7 and higher includes ZEO, so this package should only be needed to run a ZEO server.
ZEO servers and clients are wholly compatible among 3.3, 3.3.1 and 3.4: a ZEO client from any of those versions can talk with a ZEO server from any.
Trying to mix ZEO clients and servers from 3.3 or later from ZODB releases before 3.3 is much harder. ZODB 3.3 introduced multiversion concurrency control (MVCC), and earlier ZEO servers do not support MVCC: a 3.3+ ZEO client cannot talk with an older ZEO server as a result.
In the other direction, a 3.3+ ZEO server can talk with older ZEO clients, but because the names of some basic classes have changed, if any 3.3+ clients commit modifications to the database it's likely that the database will contain instances of classes that don't exist in (can't be loaded by) older ZEO clients. For example, the database root object was an instance of ``ZODB.PersistentMapping.PersistentMapping`` before ZODB 3.3, but is an instance of ``persistent.mapping.PersistentMapping`` in ZODB 3.3. A 3.3.1+ client can still load a ``ZODB.PersistentMapping.PersistentMapping`` object, but this is just an alias for ``persistent.mapping.PersistentMapping``, and an object of the latter type will be stored if a 3.3 client commits a change to the root object. An older ZEO client cannot load the root object so changed.
This limits migration possibilities: a 3.3+ ZEO server can be used with older (pre-3.3) ZEO clients and serve an older database, so long as no 3.3+ ZEO clients commit changes to the database. The most practical upgrade path is to bring up both servers and clients using 3.3+, not trying to mix pre-3.3 and post-3.3 ZEO clients and servers.
Tres. - -- =================================================================== Tres Seaver +1 202-558-7113 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFEYLM4+gerLs4ltQ4RAmYRAKDEt0B2mX6Wskg69u66//Sn8MKf7ACgnuTE 2hth9XB155U14zU54lHDNN4= =PvcL -----END PGP SIGNATURE-----
Jonathan Cleaver wrote at 2006-5-9 12:50 +0100:
I am trying to mount the ZODB of a Plone 2.0.5/Zope-2.7.6/Python 2.3.5 on a Plone 2.1.2/Zope-2.8.5/Python 2.3.5
Note that this may be dangerous. If your Zope 2.8 modifies the Zope 2.7 storage, you may no longer be able to read it under Zope 2.7: Zope 2.8 contains a newer ZODB version. This version uses an optimization not understood by the ZODB version of Zope 2.7. Thus, be very careful and work with a copy, if you might have a need to access your old storage again under Zope 2.7. -- Dieter
participants (7)
-
Andreas Jung -
Dieter Maurer -
Jens Vagelpohl -
Jonathan -
Jonathan Cleaver -
Lennart Regebro -
Tres Seaver