[Zope] ZEO and session variables.
Dennis Allison
allison at shasta.stanford.edu
Tue May 10 11:44:58 EDT 2005
That seems to have been the problem. The ZopeProfiler version I was using
does not work with Zope2.7 although Dieter has a version (1.4) that works
with Zope2.7.3, I was not using it. I also suspect there may be a problem
with multiheaded Zope/ZEO configurations.
On Tue, 10 May 2005, Chris McDonough wrote:
> It appears that something in the ZopeProfiler product is unhappy with
> your configuration. Does it work if you remove this product?
>
> On Mon, 2005-05-09 at 23:37 -0700, Dennis Allison wrote:
> > I am hoping someone with more experience that I with multi-headed
> > Zope/ZEO installations can point out my problem.
> >
> > I am using with Zope 2.7.6-final and Python 2.4.1. Yes, I know I am
> > jumping the gun with 2.4.1 but I expect that it is not the source of the
> > problem. Hardware is an Athlon dual processor CPU running Linux (RH 7.3).
> >
> > I am trying to configure multiple Zope heads with a ZEO with shared
> > session variables. This means that the session variables need to be in a
> > temporary folder associated with the ZEO instance rather than the Zope
> > instance. The logs seem to indicate both ZEO and the ZEO temporary
> > storage is properly hooked up.
> >
> > My setup dies with an unhandled exception during startup with a
> > ConnectionStateError. Since it appeared when I moved temporary
> > storage from Zope to ZEO, I suspect the problem is somewhere in
> > that space.
> >
> > The traceback appended below is truncated for some reason. I was
> > running the zope instance with the ``runzope`` program with output
> > appended to the controlling terminal.
> >
> >
> >
> > The relevant part of the zope.conf the configuration file is:
> >
> > # ZEO client storage:
> > #
> > <zodb_db main>
> > mount-point /
> > # ZODB cache, in number of objects
> > cache-size 5000
> > <zeoclient>
> > server 192.168.0.92:8301
> > storage 1
> > var $INSTANCE/var
> > # ZEO client cache, in bytes
> > cache-size 20MB
> > # Uncomment to have a persistent disk cache
> > client zeo1
> > </zeoclient>
> > </zodb_db>
> > #
> > # ZEO temporary storage
> > #
> > <zodb_db temporary>
> > <zeoclient>
> > server 192.168.0.92:8301
> > storage temp
> > name zeostorage
> > var $INSTANCE/var
> > </zeoclient>
> > mount-point /temp_folder
> > container-class Products.TemporaryFolder.TemporaryContainer
> > </zodb_db>
> >
> > And the relevant portion of the zeo.conf configuration file is:
> >
> > <zeo>
> > address 192.168.0.92:8301
> > read-only false
> > invalidation-queue-size 100
> > pid-filename $INSTANCE/var/ZEO.pid
> > # monitor-address PORT
> > # transaction-timeout SECONDS
> > </zeo>
> >
> > <filestorage 1>
> > path $INSTANCE/var/Data.fs
> > </filestorage>
> >
> > # temporary storage has to be ZEO side
> > %import tempstorage
> > <temporarystorage temp>
> > name temporary storage for sessioning
> > </temporarystorage>
> >
> > Running with this configuration, dies with an exception:
> >
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 ClientStorage (pid=10522) created
> > RW/normal for storage: '1'
> > ------
> > 2005-05-09T23:01:43 INFO(0)
> > ZEC:/opt2/zope/zinstances/leibnitz/var/c1-zeo1-0.zec ClientCache:
> > storage='1', size=20971520;
> > file[0]='/opt2/zope/zinstances/leibnitz/var/c1-zeo1-0.zec'
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 Testing connection
> > <ManagedClientConnection ('192.168.0.92', 8301)>
> > ------
> > 2005-05-09T23:01:43 INFO(0) zrpc-conn(C):192.168.0.92:8301 received
> > handshake 'Z201'
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 Server authentication protocol None
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 Connected to storage: ('x-epaul',
> > 8301)
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 Verifying cache
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 Waiting for cache verification to
> > finish
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 Waiting for cache verification to
> > finish
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 endVerify finishing
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 endVerify finished
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZODB Opening database for mounting:
> > '1087156928_1109278350.209647'
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZODB Mounted database
> > '1087156928_1109278350.209647' at /temp_folder
> > ------
> > 2005-05-09T23:01:43 INFO(0) Zope Ready to handle requests
> >
> > Unhandled exception in thread started by <class
> > ZServer.PubCore.ZServerPublisher.ZServerPublisher at 0x40467d4c>
> > Traceback (most recent call last):
> > File
> > "/usr/local/src/zope/Zope2.7/lib/python/ZServer/PubCore/ZServerPublisher.py",
> > line 23, in __init__
> > response=response)
> > File "/opt2/zope/zproducts/standard/ZopeProfiler/MonkeyPatcher.py", line
> > 35, in __call__
> > return self._function(*args,**kw)
> > File "/opt2/zope/zproducts/standard/ZopeProfiler/ZopeProfiler.py", line
> > 335, in _profilePublishModule
> > _hookApplicationManager()
> > File "/opt2/zope/zproducts/standard/ZopeProfiler/ZopeProfiler.py", line
> > 383, in _hookApplicationManager
> > R._p_jar.close()
> > File
> > "/usr/local/src/zope/Zope2.7/lib/python/Products/ZODBMountPoint/Mount.py",
> > line 210, in close
> > self._real_close()
> > File "/usr/local/src/zope/Zope2.7/lib/python/ZODB/Connection.py", line
> > 306, in close
> > raise ConnectionStateError("Cannot close a connection joined to "
> > ZODB.POSException.ConnectionStateError: Cannot close a connection joined
> > to a transaction
> >
> >
> > While the ZEO log shows
> >
> > 2005-05-09T22:46:35 INFO(0) ZD:10284 daemonizing the process
> > ------
> > 2005-05-09T22:46:35 INFO(0) ZD:10284 set current directory:
> > '/opt2/zope/zeoinstances/leibnitz'
> > ------
> > 2005-05-09T22:46:35 INFO(0) ZD:10284 daemon manager started
> > ------
> > 2005-05-09T22:46:35 INFO(0) ZD:10284 spawned process pid=10285
> > ------
> > 2005-05-09T22:46:36 INFO(0) RUNSVR created PID file
> > '/opt2/zope/zeoinstances/leibnitz/var/ZEO.pid'
> > ------
> > 2005-05-09T22:46:36 INFO(0) RUNSVR opening storage '1' using FileStorage
> > ------
> > 2005-05-09T22:46:36 INFO(0) RUNSVR opening storage 'temp' using
> > TemporaryStorage
> > ------
> > 2005-05-09T22:46:36 INFO(0) ZSS:10285 StorageServer created RW with
> > storages: 1:RW:/opt2/zope/zeoinstances/leibnitz/var/Data.fs,
> > temp:RW:temporary storage for sessioning
> > ------
> > 2005-05-09T22:46:36 INFO(0) zrpc:10285 listening on ('192.168.0.92', 8301)
> > ------
> > 2005-05-09T23:01:43 INFO(0) ZSS:10285 new connection ('192.168.0.92',
> > 57425): <ManagedServerConnection ('192.168.0.92', 57425)>
> > ------
> > 2005-05-09T23:01:43 INFO(0) zrpc-conn(S):192.168.0.92:57425 received
> > handshake 'Z201'
> > ------
> > 2005-05-09T23:07:20 INFO(0) ZSS:10285/192.168.0.92:57425 disconnected
> >
> >
> > _______________________________________________
> > Zope maillist - Zope at 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 )
> >
>
--
Dennis Allison * Computer Systems Laboratory * Gates 227
* Stanford University * Stanford CA 94305
* (650) 723-9213 * (650) 723-0033 fax
* allison at shasta.stanford.edu
* allison at sumeru.stanford.edu
More information about the Zope
mailing list