hi I found an entire hierarchy had gone POSKeyError on me today, and the bad folder hierarchy resists deletion. below is a transcript of the session, BadFolder is the first inaccessible folder. it has a lot of peer folder that i don't want to lose. This is Zope 2.7.0 and Python 2.3.3. The ZODB is about 1.5GB and some parts of it have been upgraded over time from as early as zope 2.4.x. fsrecover.py reports zero bytes removed. Since i can't delete it i am uncertain as to what to try next. thanks in advance for any suggestions. zopectl debug <snip>
from Zope import app from ZODB import POSException from OFS import DTMLMethod from OFS import Folder from AccessControl import User root= app() obj= root.unrestrictedTraverse('/BTreeFolder/BadFolder') obj.manage_delObjects('SoleObjectOfBadFolder')
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/bradc/zope/270/lib/python/ZODB/Connection.py", line 561, in setstate p, serial = self._storage.load(oid, self._version) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 687, in load return self._load(oid, version, self._index, self._file) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 655, in _load raise POSKeyError(oid) ZODB.POSException.POSKeyError: 00000000001ae582 <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
George, Maybe export all but the bad directory. Then import back into a fresh data.fs. I did this once due to necessity and it worked out fine. Naturally if the bad folder represents alot of work and cannot be reproduced than thats a hit you will may to take. David ----- Original Message ----- From: "george donnelly" <list@zettai.net> To: <zope@zope.org> Sent: Friday, July 16, 2004 5:18 PM Subject: [Zope] The immortal POSKeyError hi I found an entire hierarchy had gone POSKeyError on me today, and the bad folder hierarchy resists deletion. below is a transcript of the session, BadFolder is the first inaccessible folder. it has a lot of peer folder that i don't want to lose. This is Zope 2.7.0 and Python 2.3.3. The ZODB is about 1.5GB and some parts of it have been upgraded over time from as early as zope 2.4.x. fsrecover.py reports zero bytes removed. Since i can't delete it i am uncertain as to what to try next. thanks in advance for any suggestions. zopectl debug <snip>
from Zope import app from ZODB import POSException from OFS import DTMLMethod from OFS import Folder from AccessControl import User root= app() obj= root.unrestrictedTraverse('/BTreeFolder/BadFolder') obj.manage_delObjects('SoleObjectOfBadFolder')
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/bradc/zope/270/lib/python/ZODB/Connection.py", line 561, in setstate p, serial = self._storage.load(oid, self._version) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 687, in load return self._load(oid, version, self._index, self._file) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 655, in _load raise POSKeyError(oid) ZODB.POSException.POSKeyError: 00000000001ae582 <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
David Hassalevris <bluepaul@earthlink.net> on 7/16/04 wrote:
Maybe export all but the bad directory. Then import back into a fresh data.fs. I did this once due to necessity and it worked out fine.
Naturally if the bad folder represents alot of work and cannot be reproduced than thats a hit you will may to take.
hi, thanks. yeah we have played the import export game before, but always between 5 and 10 % of the directories throw some error on the import so i am hoping to avoid that. the bad folder we can restore from (very) old backups, i just want to be able to salvage the other folders (100+)... <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
These seem to be turning up more and more. Is ZC actively looking at the problem here? Jake -- http://www.ZopeZone.com David Hassalevris said:
George,
Maybe export all but the bad directory. Then import back into a fresh data.fs. I did this once due to necessity and it worked out fine.
Naturally if the bad folder represents alot of work and cannot be reproduced than thats a hit you will may to take.
David ----- Original Message ----- From: "george donnelly" <list@zettai.net> To: <zope@zope.org> Sent: Friday, July 16, 2004 5:18 PM Subject: [Zope] The immortal POSKeyError
hi
I found an entire hierarchy had gone POSKeyError on me today, and the bad folder hierarchy resists deletion. below is a transcript of the session,
BadFolder is the first inaccessible folder. it has a lot of peer folder that i don't want to lose.
This is Zope 2.7.0 and Python 2.3.3. The ZODB is about 1.5GB and some parts of it have been upgraded over time from as early as zope 2.4.x.
fsrecover.py reports zero bytes removed.
Since i can't delete it i am uncertain as to what to try next.
thanks in advance for any suggestions.
zopectl debug <snip>
from Zope import app from ZODB import POSException from OFS import DTMLMethod from OFS import Folder from AccessControl import User root= app() obj= root.unrestrictedTraverse('/BTreeFolder/BadFolder') obj.manage_delObjects('SoleObjectOfBadFolder')
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/bradc/zope/270/lib/python/ZODB/Connection.py", line 561, in setstate p, serial = self._storage.load(oid, self._version) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 687, in load return self._load(oid, version, self._index, self._file) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 655, in _load raise POSKeyError(oid) ZODB.POSException.POSKeyError: 00000000001ae582 <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
On Fri, Jul 16, 2004 at 07:18:25PM -0500, george donnelly wrote:
hi
I found an entire hierarchy had gone POSKeyError on me today, and the bad folder hierarchy resists deletion. below is a transcript of the session,
BadFolder is the first inaccessible folder. it has a lot of peer folder that i don't want to lose.
(snip)
obj= root.unrestrictedTraverse('/BTreeFolder/BadFolder') obj.manage_delObjects('SoleObjectOfBadFolder')
since this doesn't work, and there's nothing else in BadFolder, have you tried App.BTreeFolder.manage_delObjects('BadFolder') ? -- Paul Winkler http://www.slinkp.com
* george donnelly <list@zettai.net> [2004-07-17 02:38]:
from Zope import app from ZODB import POSException from OFS import DTMLMethod from OFS import Folder from AccessControl import User root= app() obj= root.unrestrictedTraverse('/BTreeFolder/BadFolder') obj.manage_delObjects('SoleObjectOfBadFolder') Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/bradc/zope/270/lib/python/ZODB/Connection.py", line 561, in setstate p, serial = self._storage.load(oid, self._version) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 687, in load return self._load(oid, version, self._index, self._file) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 655, in _load raise POSKeyError(oid) ZODB.POSException.POSKeyError: 00000000001ae582
If you're lucky, it's just the ZODB index file that got corrupted, so try deleting 'Data.fs.index', and hope it rebuilds itself correctly when restarting. I probably don't have to tell you this but do it on a copy of your instance. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za
Some good info on POSKeyError http://zopezone.com/faq/1063119856 http://www.zopelabs.com/cookbook/1054240694 Jake -- http://www.ZopeZone.com Roché Compaan said:
* george donnelly <list@zettai.net> [2004-07-17 02:38]:
from Zope import app from ZODB import POSException from OFS import DTMLMethod from OFS import Folder from AccessControl import User root= app() obj= root.unrestrictedTraverse('/BTreeFolder/BadFolder') obj.manage_delObjects('SoleObjectOfBadFolder') Traceback (most recent call last): File "<stdin>", line 1, in ? File "/home/bradc/zope/270/lib/python/ZODB/Connection.py", line 561, in setstate p, serial = self._storage.load(oid, self._version) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 687, in load return self._load(oid, version, self._index, self._file) File "/home/bradc/zope/270/lib/python/ZODB/FileStorage.py", line 655, in _load raise POSKeyError(oid) ZODB.POSException.POSKeyError: 00000000001ae582
If you're lucky, it's just the ZODB index file that got corrupted, so try deleting 'Data.fs.index', and hope it rebuilds itself correctly when restarting. I probably don't have to tell you this but do it on a copy of your instance.
-- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Roché Compaan <roche@upfrontsystems.co.za> on 7/17/04 wrote:
If you're lucky, it's just the ZODB index file that got corrupted, so try deleting 'Data.fs.index', and hope it rebuilds itself correctly when restarting. I probably don't have to tell you this but do it on a copy of your instance.
thanks but nope that's not it <--> george donnelly ~ http://www.zettai.net/ ~ "Quality Zope Hosting" Shared and Dedicated Zope Hosting ~ Zope Servers ~ Zope Websites Yahoo, AIM: zettainet ~ ICQ: 51907738 ~ Sales (USA): 1-866-967-3669
* george donnelly <list@zettai.net> [2004-07-19 21:09]:
Roché Compaan <roche@upfrontsystems.co.za> on 7/17/04 wrote:
If you're lucky, it's just the ZODB index file that got corrupted, so try deleting 'Data.fs.index', and hope it rebuilds itself correctly when restarting. I probably don't have to tell you this but do it on a copy of your instance.
thanks but nope that's not it
Try removing the reference from the parent folder, without accessing the bad object: id = 'BadId' folder._objects=tuple(filter(lambda i,n=id: i['id']!=n, folder._objects)) delattr(folder, id) 'manage_delObjects', calls '_getOb' to do additional checks before deleting an object, and in your case this will give a POSKeyError. You'll be left with a dangling reference, but at least siblings of the bad folder will be accessible again. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za
* Roché Compaan <roche@upfrontsystems.co.za> [2004-07-19 21:27]:
* george donnelly <list@zettai.net> [2004-07-19 21:09]:
Roché Compaan <roche@upfrontsystems.co.za> on 7/17/04 wrote:
If you're lucky, it's just the ZODB index file that got corrupted, so try deleting 'Data.fs.index', and hope it rebuilds itself correctly when restarting. I probably don't have to tell you this but do it on a copy of your instance.
thanks but nope that's not it
Try removing the reference from the parent folder, without accessing the bad object:
id = 'BadId' folder._objects=tuple(filter(lambda i,n=id: i['id']!=n, folder._objects)) delattr(folder, id)
'manage_delObjects', calls '_getOb' to do additional checks before deleting an object, and in your case this will give a POSKeyError.
You'll be left with a dangling reference, but at least siblings of the bad folder will be accessible again.
Actually the reference will be gone, so the bad object should get packed away if I'm not mistaken. -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za
george donnelly wrote:
Roché Compaan <roche@upfrontsystems.co.za> on 7/17/04 wrote:
If you're lucky, it's just the ZODB index file that got corrupted, so try deleting 'Data.fs.index', and hope it rebuilds itself correctly
when
restarting. I probably don't have to tell you this but do it on a copy of your instance.
thanks but nope that's not it
Have you raised this issue on zodb-dev@zope.org? The ZODB folks may be interested in sniffing around your Data.fs... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (6)
-
Chris Withers -
David Hassalevris -
george donnelly -
Jake -
Paul Winkler -
Roché Compaan