[Zope] ZODB issues

Craig Lewis clewis at ebaseweb.com
Mon Feb 28 17:21:08 EST 2005


Hello,

I have installed a new instance of zope 2.7.4. I have brought in a 
Data.fs file from another ISP. I don't know exactly what version this 
file is from, but I am fairly sure its some 2.x version. My question(s) 
is what to do next, I am new to zope, but I have tried a lot of things. 
The basic problem is that the btree structure of the interesting part of 
the site is broken (perhaps corrupt).I can start and run the server, and 
browse through the control panel, and perform various administrative 
tasks. The top level index_html file is just a redirect to the site1 
folder structure, which is the one that is broken. I mention this, 
because this file works, but any contents below site1 are not visible.

=====
this works
-su-2.05b$ python utilities/ZODBTools/fstest.py var/Data.fs
-su-2.05b$ python utilities/ZODBTools/fsrefs.py var/Data.fs
as does

-su-2.05b$ python utilities/ZODBTools/fsdump.py var/Data.fs | less


======

This doesn't

-su-2.05b$ python utilities/ZODBTools/checkbtrees.py var/Data.fs
<root> {'Application': <Application instance at 8346650>, 'ZGlobals': 
<OOBTree object at 0x8910ec8>}
['Application'] <Application instance at 8346650>
['ZGlobals'] <OOBTree object at 0x8910ec8>
['Application'].__error_log__ <SiteErrorLog at error_log>
['Application'].Sync <ZSyncer instance at 890c800>
['Application'].standard_error_message <DTMLMethod instance at 8b6e200>
['Application'].temp_folder MountedObject(id='temp_folder')
['Application'].vhm1 <VirtualHostMonster instance at 8b6ef50>
['Application'].__allow_groups__ <UserFolder instance at 8b6e7a0>
['Application'].session_data_manager <SessionDataManager instance at 
8b7c410>
['Application'].browser_id_manager <BrowserIdManager instance at 8b7c350>
['Application'].standard_template.pt <ZopePageTemplate at 
standard_template.pt>
['Application'].Control_Panel <ApplicationManager instance at 8b86860>
['Application'].standard_html_footer <DTMLMethod instance at 8b868c0>
['Application'].index_html <DTMLMethod instance at 8b86920>
['Application'].site1 <Folder instance at 8b86950>
Traceback (most recent call last):
  File "utilities/ZODBTools/checkbtrees.py", line 122, in ?
    main(fname)
  File "utilities/ZODBTools/checkbtrees.py", line 110, in main
    add_if_new_persistent(todo, v, newpath)
  File "utilities/ZODBTools/checkbtrees.py", line 28, in 
add_if_new_persistent
    getattr(obj, '_', None) # unghostify
  File "/www/htdocs/esginc.com/zope/lib/python/ZODB/Connection.py", line 
600, in setstate
    self._set_ghost_state(obj, p)
  File "/www/htdocs/esginc.com/zope/lib/python/ZODB/Connection.py", line 
639, in _set_ghost_state
    state = unpickler.load()
  File "/www/htdocs/esginc.com/zope/lib/python/ZODB/Connection.py", line 
220, in _persistent_load
    return self[oid]
  File "/www/htdocs/esginc.com/zope/lib/python/ZODB/Connection.py", line 
182, in __getitem__
    klass=self._db._classFactory(self, module, name)
  File "/www/htdocs/esginc.com/zope/lib/python/ZODB/DB.py", line 127, in 
_classFactory
    return getattr(__import__(location, _globals, _globals, _silly),
ImportError: No module named *ED1fLY3QImx5D39mCNz0gw==

===============================================================

nor does this, but I also get this error on a Data.fs that is not 
broken, so I don't understand what I am doing wrong ?

-su-2.05b$ python lib/python/ZODB/fsrecover.py -P 1 -v 2 var/Data.fs
Traceback (most recent call last):
  File "lib/python/ZODB/fsrecover.py", line 374, in ?
    main()
  File "lib/python/ZODB/fsrecover.py", line 226, in main
    opts, (inp, outp) = getopt.getopt(sys.argv[1:], "fv:pP:")
ValueError: unpack list of wrong size
-su-2.05b$

=================================================================

I attempted to try and follow the instructions to fix a corrupted 
database, but I got errors that
the root did not exist....
following
http://www.zopelabs.com/cookbook/1095965033
==============================================================

 >>> from Zope.Startup.run import configure
 >>> configure('/www/htdocs/esginc.com/zope/etc/zope.conf')
 >>> from ZODB.POSException import POSKeyError
 >>> obj=root.unrestrictedTraverse('/site1')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'root' is not defined

=================================================================

It really sort of 'seems' like I have mounted the database incorrectly, 
and if I could fix some simple
mistake some where, ....

What I have done to import this Data.fs is to copy the file into var, 
delete the index, modify the zope.conf to be somewhat similar to the way 
it was in the 'other' server, and copy the files/contents of import 
folder...
=============

-su-2.05b$ ls import/
AdManager.zexp                  ZopeTutorialExamples.zexp       custom.zexp
Examples.zexp                   acl_users.zexp                  
submit_resume_form.zexp
Portal.zexp                     biz_referral_form.zexp
README.txt                      content.zexp






More information about the Zope mailing list