Re: [Zope] ZEO and session variables.

2005-05-10 Thread Dennis Allison
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:
> > #
> > 
> >   mount-point /
> >   # ZODB cache, in number of objects
> >   cache-size 5000
> >   
> > 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
> >   
> > 
> > #
> > # ZEO temporary storage
> > #
> > 
> > 
> > server 192.168.0.92:8301
> > 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:
> > 
> > 
> >   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
> > 
> > 
> > 
> >   path $INSTANCE/var/Data.fs
> > 
> > 
> > # temporary storage has to be ZEO side
> > %import tempstorage
> > 
> > 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; 
> > file[0]='/opt2/zope/zinstances/leibnitz/var/c1-zeo1-0.zec'
> > --
> > 2005-05-09T23:01:43 INFO(0) ZCS:10522 Testing connection 
> > 
> > --
> > 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  > 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 _hookApplicationMana

Re: [Zope] ZEO and session variables.

2005-05-10 Thread Chris McDonough
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:
> #
> 
>   mount-point /
>   # ZODB cache, in number of objects
>   cache-size 5000
>   
> 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
>   
> 
> #
> # ZEO temporary storage
> #
> 
> 
> server 192.168.0.92:8301
> 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:
> 
> 
>   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
> 
> 
> 
>   path $INSTANCE/var/Data.fs
> 
> 
> # temporary storage has to be ZEO side
> %import tempstorage
> 
> 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; 
> file[0]='/opt2/zope/zinstances/leibnitz/var/c1-zeo1-0.zec'
> --
> 2005-05-09T23:01:43 INFO(0) ZCS:10522 Testing connection 
> 
> --
> 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  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: 
> '/

[Zope] ZEO and session variables.

2005-05-09 Thread Dennis Allison

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:
#

  mount-point /
  # ZODB cache, in number of objects
  cache-size 5000
  
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
  

#
# ZEO temporary storage
#


server 192.168.0.92:8301
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:


  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



  path $INSTANCE/var/Data.fs


# temporary storage has to be ZEO side
%import tempstorage

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; 
file[0]='/opt2/zope/zinstances/leibnitz/var/c1-zeo1-0.zec'
--
2005-05-09T23:01:43 INFO(0) ZCS:10522 Testing connection 

--
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 
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/zeoins

[Zope] ZEO and session variables.

2005-05-03 Thread Dennis Allison

I am just setting up a multi-headed distributed system with several Zope
heads all communications with a ZEO backend.  The zopes can be on the same
machine or on different machines connected through a high speed backbone.  
In our system, all zopes are frontended with pound.

zope1
  |
  zope2- ZEO-zope3
  |
zope4

We make heavy use of session variables.  Normally, with a single Zope
session variables are stored in a temporary folder, but, as such, they are
are not shared between the zope heads.   In the multiheaded system, the
session variables need to be shared and therefore must be managed by 
ZEO.   What is the recommended best practice for this?  


-- 
Dennis Allison * Computer Systems Laboratory * Gates 227
   * Stanford University *  Stanford CA  94305
   * (650) 723-9213 * (650) 723-0033 fax
   * [EMAIL PROTECTED]
   * [EMAIL PROTECTED]


___
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 )