Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Users

persistent sessions with ZEO not working

 

 

Zope users RSS feed   Index | Next | Previous | View Threaded


marko at oktober

Nov 13, 2009, 3:14 AM

Post #1 of 5 (1296 views)
Permalink
persistent sessions with ZEO not working

I'm maintaining a ZEO cluster setup that currently consists of 2 Zope
clients and 1 ZEO server (Zope version is 2.10.5.)

I'm using sessions on the hosted site and am having trouble sharing them
across the 2 servers.

I've done a config as described here:
http://www.zopelabs.com/cookbook/1061234337

Everything runs fine, except my sessions 'change' randomly. For example
if I output my SESSION data I notice that the sessions ID is not
persistent over i.e. 10 page loads.
The contents of the sessions also change, of course.

Am I missing something here? The central storage of the sessions should
fix this if i'm correct, but it doesn't.
Is this impossible to do, or is another issue causing this stange behaviour?

best regards,
Marko


_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


aschmidt at fredericksburg

Nov 13, 2009, 7:46 AM

Post #2 of 5 (1173 views)
Permalink
Re: persistent sessions with ZEO not working [In reply to]

What we did was create a Session.fs and added to the zope and zeo conf
files. Then after restarting the zopes and zeo, in the ZMI, create a
ZODB mount point and it should see the Session.fs and build the parts in
the root of the ZMI that you need. Been a long time but I think those
are the steps. That way the session data is its own data.fs file and is
persistent across zopes and restarts, etc. The problem is that it IS a
data.fs file and therefore an undoing storage. You will have to pack it
the same as your main data file. Not a big deal for us as its not used
much. Just pack back a couple days so you don't whip any session data
that could be going on at that moment.

Anyone please chime in if I am missing something. Just taking a shot at
an answer based on our set up.
Your mileage may vary.

Allen


Marko Kruijer wrote:
> I'm maintaining a ZEO cluster setup that currently consists of 2 Zope
> clients and 1 ZEO server (Zope version is 2.10.5.)
>
> I'm using sessions on the hosted site and am having trouble sharing them
> across the 2 servers.
>
> I've done a config as described here:
> http://www.zopelabs.com/cookbook/1061234337
>
> Everything runs fine, except my sessions 'change' randomly. For example
> if I output my SESSION data I notice that the sessions ID is not
> persistent over i.e. 10 page loads.
> The contents of the sessions also change, of course.
>
> Am I missing something here? The central storage of the sessions should
> fix this if i'm correct, but it doesn't.
> Is this impossible to do, or is another issue causing this stange behaviour?
>
> best regards,
> Marko
>
>
> _______________________________________________
> Zope maillist - Zope [at] zope
> https://mail.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope-dev )
>
>
>
_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


marko at oktober

Nov 13, 2009, 8:39 AM

Post #3 of 5 (1175 views)
Permalink
Re: persistent sessions with ZEO not working [In reply to]

That's not my problem, the session is in it's own .fs file, and it is
persistent.
The problem is that the two zope clients use different sessions id's for
the same user, that's not supposed to happen imo.

Allen Schmidt Sr. wrote:
> What we did was create a Session.fs and added to the zope and zeo conf
> files. Then after restarting the zopes and zeo, in the ZMI, create a
> ZODB mount point and it should see the Session.fs and build the parts
> in the root of the ZMI that you need. Been a long time but I think
> those are the steps. That way the session data is its own data.fs file
> and is persistent across zopes and restarts, etc. The problem is that
> it IS a data.fs file and therefore an undoing storage. You will have
> to pack it the same as your main data file. Not a big deal for us as
> its not used much. Just pack back a couple days so you don't whip any
> session data that could be going on at that moment.
>
> Anyone please chime in if I am missing something. Just taking a shot
> at an answer based on our set up.
> Your mileage may vary.
>
> Allen
>
>
> Marko Kruijer wrote:
>> I'm maintaining a ZEO cluster setup that currently consists of 2 Zope
>> clients and 1 ZEO server (Zope version is 2.10.5.)
>>
>> I'm using sessions on the hosted site and am having trouble sharing
>> them across the 2 servers.
>>
>> I've done a config as described here:
>> http://www.zopelabs.com/cookbook/1061234337
>>
>> Everything runs fine, except my sessions 'change' randomly. For
>> example if I output my SESSION data I notice that the sessions ID is
>> not persistent over i.e. 10 page loads.
>> The contents of the sessions also change, of course.
>>
>> Am I missing something here? The central storage of the sessions
>> should fix this if i'm correct, but it doesn't.
>> Is this impossible to do, or is another issue causing this stange
>> behaviour?
>>
>> best regards,
>> Marko
>>
>>
>> _______________________________________________
>> Zope maillist - Zope [at] zope
>> https://mail.zope.org/mailman/listinfo/zope
>> ** No cross posts or HTML encoding! **
>> (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce
>> https://mail.zope.org/mailman/listinfo/zope-dev )
>>
>>
>>
_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


aschmidt at fredericksburg

Nov 13, 2009, 9:49 AM

Post #4 of 5 (1167 views)
Permalink
Re: persistent sessions with ZEO not working [In reply to]

Do you have the ZODB mount point set up and pointing to your session_folder?

Marko Kruijer wrote:
> That's not my problem, the session is in it's own .fs file, and it is
> persistent.
> The problem is that the two zope clients use different sessions id's
> for the same user, that's not supposed to happen imo.
>
> Allen Schmidt Sr. wrote:
>> What we did was create a Session.fs and added to the zope and zeo
>> conf files. Then after restarting the zopes and zeo, in the ZMI,
>> create a ZODB mount point and it should see the Session.fs and build
>> the parts in the root of the ZMI that you need. Been a long time but
>> I think those are the steps. That way the session data is its own
>> data.fs file and is persistent across zopes and restarts, etc. The
>> problem is that it IS a data.fs file and therefore an undoing
>> storage. You will have to pack it the same as your main data file.
>> Not a big deal for us as its not used much. Just pack back a couple
>> days so you don't whip any session data that could be going on at
>> that moment.
>>
>> Anyone please chime in if I am missing something. Just taking a shot
>> at an answer based on our set up.
>> Your mileage may vary.
>>
>> Allen
>>
>>
>> Marko Kruijer wrote:
>>> I'm maintaining a ZEO cluster setup that currently consists of 2
>>> Zope clients and 1 ZEO server (Zope version is 2.10.5.)
>>>
>>> I'm using sessions on the hosted site and am having trouble sharing
>>> them across the 2 servers.
>>>
>>> I've done a config as described here:
>>> http://www.zopelabs.com/cookbook/1061234337
>>>
>>> Everything runs fine, except my sessions 'change' randomly. For
>>> example if I output my SESSION data I notice that the sessions ID is
>>> not persistent over i.e. 10 page loads.
>>> The contents of the sessions also change, of course.
>>>
>>> Am I missing something here? The central storage of the sessions
>>> should fix this if i'm correct, but it doesn't.
>>> Is this impossible to do, or is another issue causing this stange
>>> behaviour?
>>>
>>> best regards,
>>> Marko
>>>
>>>
>>> _______________________________________________
>>> Zope maillist - Zope [at] zope
>>> https://mail.zope.org/mailman/listinfo/zope
>>> ** No cross posts or HTML encoding! **
>>> (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce
>>> https://mail.zope.org/mailman/listinfo/zope-dev )
>>>
>>>
>>>
>
>
_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )


marko at oktober

Nov 16, 2009, 12:19 AM

Post #5 of 5 (1140 views)
Permalink
Re: persistent sessions with ZEO not working [In reply to]

Yes,

I followed the instructions from the howto, including the mount point part.
I have a folder named 'session_folder' in my root, and it containts a
session data manager. There are also items in there when sessions are
being used so it looks like that's functioning fine.

Are the sessions ID's not consistent accross clients or is this some
kind of bug?

Allen Schmidt Sr. wrote:
> Do you have the ZODB mount point set up and pointing to your
> session_folder?
>
> Marko Kruijer wrote:
>> That's not my problem, the session is in it's own .fs file, and it is
>> persistent.
>> The problem is that the two zope clients use different sessions id's
>> for the same user, that's not supposed to happen imo.
>>
>> Allen Schmidt Sr. wrote:
>>> What we did was create a Session.fs and added to the zope and zeo
>>> conf files. Then after restarting the zopes and zeo, in the ZMI,
>>> create a ZODB mount point and it should see the Session.fs and build
>>> the parts in the root of the ZMI that you need. Been a long time but
>>> I think those are the steps. That way the session data is its own
>>> data.fs file and is persistent across zopes and restarts, etc. The
>>> problem is that it IS a data.fs file and therefore an undoing
>>> storage. You will have to pack it the same as your main data file.
>>> Not a big deal for us as its not used much. Just pack back a couple
>>> days so you don't whip any session data that could be going on at
>>> that moment.
>>>
>>> Anyone please chime in if I am missing something. Just taking a shot
>>> at an answer based on our set up.
>>> Your mileage may vary.
>>>
>>> Allen
>>>
>>>
>>> Marko Kruijer wrote:
>>>> I'm maintaining a ZEO cluster setup that currently consists of 2
>>>> Zope clients and 1 ZEO server (Zope version is 2.10.5.)
>>>>
>>>> I'm using sessions on the hosted site and am having trouble sharing
>>>> them across the 2 servers.
>>>>
>>>> I've done a config as described here:
>>>> http://www.zopelabs.com/cookbook/1061234337
>>>>
>>>> Everything runs fine, except my sessions 'change' randomly. For
>>>> example if I output my SESSION data I notice that the sessions ID
>>>> is not persistent over i.e. 10 page loads.
>>>> The contents of the sessions also change, of course.
>>>>
>>>> Am I missing something here? The central storage of the sessions
>>>> should fix this if i'm correct, but it doesn't.
>>>> Is this impossible to do, or is another issue causing this stange
>>>> behaviour?
>>>>
>>>> best regards,
>>>> Marko
>>>>
>>>>
>>>> _______________________________________________
>>>> Zope maillist - Zope [at] zope
>>>> https://mail.zope.org/mailman/listinfo/zope
>>>> ** No cross posts or HTML encoding! **
>>>> (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce
>>>> https://mail.zope.org/mailman/listinfo/zope-dev )
>>>>
>>>>
>>>>
>>
>>

--

OKTOBER



WIBAUTSTRAAT 122
1091 GP AMSTERDAM



POSTBUS 93121
1090 BC AMSTERDAM

T +3120 462 60 60
F +3120 462 60 20 WWW.OKTOBER.NL
INFO [at] OKTOBER

_______________________________________________
Zope maillist - Zope [at] zope
https://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope-dev )

Zope users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.