[Zope] Broken DB

Jim Fulton jim@digicool.com
Tue, 30 Mar 1999 13:12:20 -0500


Johan Lindstrom wrote:
> 
> Hi!
> 
> I get this error when trying to start the server with start.bat:
> 
> Traceback (innermost last):
>   File "serve.py", line 100, in ?
>     ZopeHTTPServer.main(args)
>   File "E:\appl\net\Zope\Rio\ZopeHTTPServer\ZopeHTTPServer.py", line 498,
> in main     start(module_file,host,port,threading,env)
>   File "E:\appl\net\Zope\Rio\ZopeHTTPServer\ZopeHTTPServer.py", line 436,
> in start    set_published_module(module_file,BoboRequestHandler,env)
>   File "E:\appl\net\Zope\Rio\ZopeHTTPServer\ZopeHTTPServer.py", line 432,
> in set _published_module __import__(name) # to catch problem modules right away
>   File "E:\appl\net\Zope\Rio\lib\python\Main.py", line 103, in ?
> Bobobase=OFS.Application.open_bobobase()
>   File "E:\appl\net\Zope\Rio\lib\python\OFS\Application.py", line 319, in
> open_bobobase   Bobobase=Globals.Bobobase=Globals.PickleDictionary(
>   File "E:\appl\net\Zope\Rio\lib\python\BoboPOS\PickleDictionary.py", line
> 159, in __init__   db=apply(DBType,(),storage_options)
>   File "E:\appl\net\Zope\Rio\lib\python\BoboPOS\SimpleDB.py", line 221, in
> __init__  self.open(file_name,create,revision_time,meta_index,read_only)
>   File "E:\appl\net\Zope\Rio\lib\python\BoboPOS\SimpleDB.py", line 287, in
> open   try: self.index,self.pos=read_index(
>   File "E:\appl\net\Zope\Rio\lib\python\BoboPOS\SimpleDB.py", line 1365, in
> read _index   raise DatabaseError, ('Corrupted data record at %s' % pos)
> DatabaseError: Corrupted data record at 1903771
> 
> Can I recover?

At a minimum, you can truncate the data file (var\Data.bbb) 
at the position indicated. (Let me know if you need help with this.)

> The db doesn't contain anything important so it's really
> okay to reinstall, should that be neccessary.

You could also just delete the database (var\Data.*) and
a new database will be created when you restart.

I'd appreciate it if you'd send me the corrupted database
as a zipped or gzipped attachment in a private email.

Also, what version of Zope were you running? What OS?
What products (not included in the Zope distribution) did
you have installed?  Can you tell me anything more about what 
might have led up to this?

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (540) 371-6909              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.