我在一个站点上安装了 Plone 4.3.3。首先,将构建配置为使用 var/filestorage 中的 Data.fs 文件和 var/blobstorage 中的共享 blob 存储。然后我在 buildout 中添加了一个 Relstorage,并将 Data.fs 文件的内容转换为底层 MySQL 数据库。现在 Plone 使用 Relstorage 而不是 Data.fs。
但现在我也想使用 Relstorage 而不是 blobstorage。因为我对 Plone 尤其是 Relstorage 比较陌生,所以我的想法是首先设置一个新的空 Plone。然后我将 buildout.cfg 和 base.cfg 从第一个复制到新的。然后我创建了一个新数据库 userZodb 并更改了 base.cfg 以使用新数据库,我还更改了 zeoserver 和客户端的端口。下一步是重新配置 relstorage 以不使用基于文件的 blobstorage。
rel-storage =
type mysql
db userZodb
user zodbuser
passwd innzop
blob-dir ${buildout:var-dir}/blobstorage
shared-blob-dir false
# shared blobs are much faster if we're on the same server.
# if not, turn it off.
shared-blob = off
然后我运行了构建。一切构建成功。启动 zeoserver 后,我从客户端收到此错误:
user@server:~/Plone433-dev/zeocluster3$ ./bin/zeoserver start
.
daemon process started, pid=35136
user@server:~/Plone433-dev/zeocluster3$ ./bin/client1 fg
2014-12-17 14:50:31 INFO ZServer HTTP server started at Wed Dec 17 14:50:31 2014
Hostname: 0.0.0.0
Port: 9180
2014-12-17 14:50:32 INFO Products.PloneFormGen gpg_subprocess initialized, using /usr/bin/gpg
Traceback (most recent call last):
File "/home/user/Plone433-dev/zeocluster3/parts/client1/bin/interpreter", line 289, in <module>
exec(compile(__file__f.read(), __file__, "exec"))
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
run()
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/run.py", line 22, in run
starter.prepare()
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/__init__.py", line 86, in prepare
self.startZope()
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/__init__.py", line 262, in startZope
Zope2.startup()
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/__init__.py", line 47, in startup
_startup()
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/App/startup.py", line 81, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/datatypes.py", line 287, in getDatabase
db = factory.open(name, self.databases)
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/datatypes.py", line 185, in open
DB = self.createDB(database_name, databases)
File "/home/user/Plone433-dev/buildout-cache/eggs/Zope2-2.13.22-py2.7.egg/Zope2/Startup/datatypes.py", line 182, in createDB
return ZODBDatabase.open(self, databases)
File "/home/user/Plone433-dev/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/config.py", line 101, in open
storage = section.storage.open()
File "/home/user/Plone433-dev/buildout-cache/eggs/RelStorage-1.6.0b2-py2.7.egg/relstorage/config.py", line 33, in open
return RelStorage(adapter, name=config.name, options=options)
File "/home/user/Plone433-dev/buildout-cache/eggs/RelStorage-1.6.0b2-py2.7.egg/relstorage/storage.py", line 212, in __init__
self.blobhelper = BlobHelper(options=options, adapter=adapter)
File "/home/user/Plone433-dev/buildout-cache/eggs/RelStorage-1.6.0b2-py2.7.egg/relstorage/blobhelper.py", line 118, in __init__
fshelper.create()
File "/home/user/Plone433-dev/buildout-cache/eggs/ZODB3-3.10.5-py2.7-linux-x86_64.egg/ZODB/blob.py", line 359, in create
(self.layout_name, self.base_dir, layout))
ValueError: Directory layout `zeocache` selected for blob directory /home/user/Plone433-dev/zeocluster3/var/blobstorage/, but marker found for layout `bushy`
不幸的是,我不知道问题可能出在哪里。有人建议吗?谢谢!