我们正在使用基于memcached的烧杯会话进行分布式Plone/Zope设置。同样的设置在我们的产品前环境中工作正常,但是当我们转向产品时,我们似乎无法将它连接到11211上的memcached。基于Memcached的烧杯会话未在Zope上初始化
我在启动Zope时运行了tcpdump甚至没有尝试连接。
我从Zope的服务器到memcached服务器(同ZEO服务器)来测试连接已经telnet和工作正常。
我试过两种不同的prod Zope服务器,结果是一样的。
我们有我们的旧体制(4.2.5)上运行的另一个督促服务器上,当我们开始吧,我们得到了预期的行为,并将其连接到memcached的就好了。不幸的是,我们还有一个4.3.2的设置(与prod相同),并且它还可以正常运行。我无法确定设置中的任何实质性差异。
所有系统都运行独立(不是系统/易于控制)Python 2.7s。从versions.cfg
# Beaker Configuration
zope-conf-additional =
<product-config beaker>
cache.type ext:memcached
cache.url ${ips:memcached}
cache.data_dir ${buildout:directory}/var/cache/data
cache.lock_dir ${buildout:directory}/var/cache/lock
cache.regions short, long
cache.short.expire 60
cache.long.expire 3600
session.type ext:memcached
session.url ${ips:memcached}
session.data_dir ${buildout:directory}/var/sessions/data
session.lock_dir ${buildout:directory}/var/sessions/lock
session.key beaker.session
session.secret magicalsecretcornedbeefhash
</product-config>
ZCML = collective.beaker
相关版本
相关一块zope.conf的:
# Beaker
Beaker = 1.6.4
Products.BeakerSessionDataManager = 1.1
collective.beaker = 1.0b3
python-memcached = 1.47
我已经测试了$ {IPS: memcached}在启动时产生正确的值。没有错误记录到Zope日志中,但没有创建烧杯会话,也没有尝试连接到memcached。 Memcached很高兴地运行,但没有生成日志(似乎从来没有)。
什么建议任何意见或可能可能会导致这是有帮助的。更多的背景:
Ubuntu 12.04.4 LTS
Linux 3.2.0-58-generiC#88-Ubuntu SMP Tue Dec 3 17:37:58 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
斌/扩建:
#!/opt/zope/pythons/python-2.7/bin/python
import sys
sys.path[0:0] = [
'/opt/zope/buildouts/FOO/eggs/distribute-0.6.28-py2.7.egg',
'/opt/zope/buildouts/FOO/eggs/zc.buildout-1.7.1-py2.7.egg',
]
UPDATE:从我们前移动工作ZODB产品环境“解决”了问题。仍然没有根本原因。 – Spanky