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
    storage 1
    var $INSTANCE/var
    # ZEO client cache, in bytes
    cache-size 20MB
    # Uncomment to have a persistent disk cache
    client zeo1
# ZEO temporary storage
<zodb_db temporary>
        storage temp
        name zeostorage
        var $INSTANCE/var
    mount-point /temp_folder
    container-class Products.TemporaryFolder.TemporaryContainer

And the relevant portion of the zeo.conf configuration file is:

  read-only false
  invalidation-queue-size 100
  pid-filename $INSTANCE/var/ZEO.pid
  # monitor-address PORT
  # transaction-timeout SECONDS

<filestorage 1>
  path $INSTANCE/var/Data.fs

# temporary storage has to be ZEO side
%import tempstorage
<temporarystorage temp>
    name temporary storage for sessioning

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; 
2005-05-09T23:01:43 INFO(0) ZCS:10522 Testing connection 
<ManagedClientConnection ('', 8301)>
2005-05-09T23:01:43 INFO(0) zrpc-conn(C): 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', 
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 
2005-05-09T23:01:43 INFO(0) ZCS:10522 Waiting for cache verification to 
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: 
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):
line 23, in __init__
  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
  File "/opt2/zope/zproducts/standard/ZopeProfiler/ZopeProfiler.py", line 
383, in _hookApplicationManager
line 210, in 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: 
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 
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 
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 ('', 8301)
2005-05-09T23:01:43 INFO(0) ZSS:10285 new connection ('', 
57425): <ManagedServerConnection ('', 57425)>
2005-05-09T23:01:43 INFO(0) zrpc-conn(S): received 
handshake 'Z201'
2005-05-09T23:07:20 INFO(0) ZSS:10285/ disconnected

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to