[Zope] DirectoryStorage product - zope won't start
Thomas Bennett
bennetttm at appstate.edu
Tue Sep 9 13:12:57 EDT 2008
using
python 2.4.5
Zope 2.11.1-final
DirectoryStorage 1.1.19
First, is there a more preferable product to use to serve files, mostly PDF, from the file system with Zope?
I suspect lock_file.py has changed since the DirectoryStorage product was last updated.
I followed instructions on http://dirstorage.sourceforge.net/install.html to install DirectoryStorage. I got to step 11. "Start Zope"
and at the end of Traceback 1 (see below)
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.py", line 12, in ?
from ZODB.lock_file import lock_file
ImportError: cannot import name lock_file
There are no classes or methods named lock_file in lock_file.py so I changed the import statement in PosixFilesystem.py to
from ZODB import lock_file
Then the same thing occured in BaseDirectoryStorage.py and I made the same change to that import statement. (see Traceback 2)
Now (see Traceback 3) I get File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/LocalFilesystem.py", line 55, in engage
raise DirectoryStorageError('Storage is locked by another process')
DirectoryStorage.utils.DirectoryStorageError: Storage is locked by another process
But I'm not sure how to overcome this or is this because the locK_file problem but I suspect so. I can't find anything
that indicates Storage is locked except for the end of that traceback.
I don't know if I need to do " from ZODB.lock_file import _lock_file " or something else.
Any help would be appreciated.
Thanks,
Thomas
==================================================
Traceback 1
[xxxx at reserves bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:16:16 INFO ZServer HTTP server started at Tue Sep 9 12:16:16 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:16:17 INFO Zope Set effective user to "effective_user_here"
^[[ATraceback (most recent call last):
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?
run()
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run
starter.prepare()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 109, in prepare
self.startZope()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 300, in startZope
Zope2.startup()
File "/opt/zope/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/zope/lib/python/Zope2/App/startup.py", line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 288, in getDatabase
db = factory.open(name, self.databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 186, in open
DB = self.createDB(database_name, databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 183, in createDB
return ZODBDatabase.open(self, databases)
File "/opt/zope/lib/python/ZODB/config.py", line 97, in open
storage = section.storage.open()
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/config.py", line 5, in open
from DirectoryStorage.Storage import Storage
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Storage.py", line 1, in ?
from Filesystem import Filesystem
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Filesystem.py", line 9, in ?
from PosixFilesystem import PosixFilesystem as Filesystem
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/PosixFilesystem.py", line 12, in ?
from ZODB.lock_file import lock_file
ImportError: cannot import name lock_file
=======================================================================
Traceback 2
[xxxx at reserves bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:43:22 INFO ZServer HTTP server started at Tue Sep 9 12:43:22 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:43:22 INFO Zope Set effective user to "effective_user_here"
Traceback (most recent call last):
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?
run()
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run
starter.prepare()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 109, in prepare
self.startZope()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 300, in startZope
Zope2.startup()
File "/opt/zope/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/zope/lib/python/Zope2/App/startup.py", line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 288, in getDatabase
db = factory.open(name, self.databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 186, in open
DB = self.createDB(database_name, databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 183, in createDB
return ZODBDatabase.open(self, databases)
File "/opt/zope/lib/python/ZODB/config.py", line 97, in open
storage = section.storage.open()
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/config.py", line 6, in open
return Storage(self.config.path, read_only=self.config.read_only)
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Storage.py", line 7, in Storage
from Full import Full as S
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Full.py", line 13, in ?
from BaseDirectoryStorage import BaseDirectoryStorage
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/BaseDirectoryStorage.py", line 11, in ?
from ZODB.lock_file import lock_file
ImportError: cannot import name lock_file
=========================================================================
Traceback 3
[xxxx at reserves bin]# ./zopectl fg
/opt/zopehome/bin/runzope -X debug-mode=on
2008-09-09 12:58:57 INFO ZServer HTTP server started at Tue Sep 9 12:58:57 2008
Hostname: reserves.library.appstate.edu
Port: 8080
2008-09-09 12:58:57 INFO Zope Set effective user to "effective_user_here"
Traceback (most recent call last):
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 56, in ?
run()
File "/opt/zope/lib/python/Zope2/Startup/run.py", line 21, in run
starter.prepare()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 109, in prepare
self.startZope()
File "/opt/zope/lib/python/Zope2/Startup/__init__.py", line 300, in startZope
Zope2.startup()
File "/opt/zope/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/zope/lib/python/Zope2/App/startup.py", line 65, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 288, in getDatabase
db = factory.open(name, self.databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 186, in open
DB = self.createDB(database_name, databases)
File "/opt/zope/lib/python/Zope2/Startup/datatypes.py", line 183, in createDB
return ZODBDatabase.open(self, databases)
File "/opt/zope/lib/python/ZODB/config.py", line 97, in open
storage = section.storage.open()
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/config.py", line 6, in open
return Storage(self.config.path, read_only=self.config.read_only)
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/Storage.py", line 12, in Storage
return apply(S, (fs,)+args, kwargs)
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/BaseDirectoryStorage.py", line 33, in __init__
self.filesystem.engage(synchronous)
File "/usr/local/lib/python2.4/site-packages/DirectoryStorage/LocalFilesystem.py", line 55, in engage
raise DirectoryStorageError('Storage is locked by another process')
DirectoryStorage.utils.DirectoryStorageError: Storage is locked by another process
--
====================================================================
Thomas McMillan Grant Bennett Appalachian State University
Operations & Systems Analyst P O Box 32026
University Library Boone, North Carolina 28608
(828) 262 6587
"... using OpenOffice.org, and save them back to disk automatically,
in MS Word format. They surf the Web, check e-mail, do instant
messaging, view YouTube videos, visit their Facebook pages, learn
touch-typing skills and lots more. Our public library has been
offering these Linux public stations for the past three years."
- Phil Shapiro Linux Journal January 2008
Library Systems Help Desk: https://www.library.appstate.edu/help/
====================================================================
More information about the Zope
mailing list