Nov 7, 2011 1:37 PM
AttributeError __call__ error
-
Like (0)
I get the following error when attempting to click on "INFRASTRUCTURE" in Zenoss 3.0.3 (CentOS)
The server reported the following error:
AttributeError __call__
The system has encountered an error. Please reload the page.
dswope:
I'd try to rebuild teh global catalog.
As the zenoss user on the zenoss master:
python $ZENHOME/Products/ZenUtils/zencatalog.py --forceindex --createcatalog
Let me know if it helps.
Best,
--Shane
Here is the output of the rebuild catalog and the error persists
[zenoss@ZENOSS root]$ python $ZENHOME/Products/ZenUtils/zencatalog.py --for ceindex --createcatalog
2011-11-22 08:35:31,909 INFO zen.Catalog: Global catalog already exists.
2011-11-22 08:35:31,911 INFO zen.Catalog: Reindexing your system. This may take some time.
/opt/zenoss/lib/python/Products/CMFCore/DirectoryView.py:489: UserWarning: DirectoryView ZenPacks.Nagios.CheckPing refers to a non-existing path '/opt/zenoss/ZenPacks/ZenPacks.Nagios.CheckPing-1.0-py2.4.egg/ZenPacks/Nagios/CheckPing/skins/ZenPacks.Nagios.CheckPing'
(self.id, reg_key), UserWarning)
/opt/zenoss/lib/python/Products/CMFCore/DirectoryView.py:489: UserWarning: DirectoryView WMIPerformanceMonitor refers to a non-existing path 'Products.WMIPerformanceMonitor:skins/WMIPerformanceMonitor'
(self.id, reg_key), UserWarning)
2011-11-22 08:35:35,589 ERROR zen.Catalog: [Failure instance: Traceback: <type 'exceptions.AttributeError'>: 'GlobalCatalog' object has no attribute 'catalog_object'
/opt/zenoss/lib/python/twisted/internet/defer.py:737:_inlineCallbacks
/opt/zenoss/Products/ZenUtils/zencatalog.py:97:inner
/opt/zenoss/lib/python/twisted/internet/defer.py:243:callback
/opt/zenoss/lib/python/twisted/internet/defer.py:312:_startRunCallbacks
--- <exception caught here> ---
/opt/zenoss/lib/python/twisted/internet/defer.py:328:_runCallbacks
/opt/zenoss/Products/ZenUtils/zencatalog.py:243:handle_chunk
/opt/zenoss/Products/ZenUtils/zencatalog.py:223:catalog_object
]
None
[zenoss@ZENOSS root]$
dsWope:
Yikes!
If this is an important install, back it up before we continue.
Once done, su zenoss the zenmigrate run --step='GlobalCatalog'
Let me know what happens.
Best,
--Shane (Hackman238)
Yeah, it's important. It's production environment but I back it up every night so no worries
Ok result of this are as follows
[zenoss@ZENOSS root]$ zenmigrate run --step='GlobalCatalog'
Use of "run" is deprecated.
INFO:zen.migrate:Will execute these steps: GlobalCatalog
INFO:zen.migrate:Installing GlobalCatalog (3.0.0)
INFO:zen.migrate:Installing SpeedUpGlobalCatalog (3.0.3)
INFO:zen.migrate:Removing Software and Operating Systems from catalog
WARNING:zen.migrate:Recovering
Traceback (most recent call last):
File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in <module>
main()
File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
m.main()
File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 417, in main
self.cutover()
File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 304, in cutover
self.migrate()
File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 280, in migrate
m.cutover(self.dmd)
File "/opt/zenoss/Products/ZenModel/migrate/SpeedUpGlobalCatalog.py", line 136, in cutover
self.removeSoftwareAndOperatingSystems(dmd)
File "/opt/zenoss/Products/ZenModel/migrate/SpeedUpGlobalCatalog.py", line 127, in removeSoftwareAndOperatingSystems
cat = ICatalogTool(dmd)
File "/opt/zenoss/lib/python/zope/site/hooks.py", line 95, in adapter_hook
return siteinfo.adapter_hook(interface, object, name, default)
File "/opt/zenoss/Products/Zuul/tree.py", line 191, in __init__
self.catalog._v_caches = getattr(self.catalog, "_v_caches", OOBTree())
File "/opt/zenoss/lib/python/ZODB/broken.py", line 317, in __setattr__
raise BrokenModified("Can't change broken objects")
ZODB.broken.BrokenModified: Can't change broken objects
This sticks out to me, something has broken with Python?
File "/opt/zenoss/lib/python/ZODB/broken.py", line 317, in __setattr__
raise BrokenModified("Can't change broken objects")
ZODB.broken.BrokenModified: Can't change broken objects
dsWope:
As user zenoss, zenchkrels -x1 -r
It could take a long time.
--Shane (Hackman238)
Ok running now..lots of output. Thanks for the insight here, I expect we will see which relations are messed up.
Ok, here is the bottom of all the output
Traceback (most recent call last):
File "/opt/zenoss/Products/ZenUtils/CheckRelations.py", line 72, in <module>
tmbk.rebuild()
File "/opt/zenoss/Products/ZenUtils/CheckRelations.py", line 40, in rebuild
object.checkRelations(repair=repair)
File "/opt/zenoss/Products/ZenRelations/RelationshipManager.py", line 262, in checkRelations
rel.checkRelation(repair)
File "/opt/zenoss/Products/ZenRelations/ToOneRelationship.py", line 215, in checkRelation
rrel = getattr(self.obj, rname)
AttributeError: collection_items
I don't get much from that, you?
Any ideas here anyone? I'm finding absolutely nothing online to help resolve this. I'm looking at a restore here looks like if I cannot find a solution.
Here is the output of me running a "zenmigrate run --step='GlobalCatalog'"
[zenoss@ZENOSS root]$ zenmigrate run --step='GlobalCatalog'
Use of "run" is deprecated.
INFO:zen.migrate:Will execute these steps: GlobalCatalog
INFO:zen.migrate:Installing GlobalCatalog (3.0.0)
INFO:zen.migrate:Installing SpeedUpGlobalCatalog (3.0.3)
INFO:zen.migrate:Removing Software and Operating Systems from catalog
WARNING:zen.migrate:Recovering
Traceback (most recent call last):
File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in <module>
main()
File "/opt/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
m.main()
File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 417, in main
self.cutover()
File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 304, in cutover
self.migrate()
File "/opt/zenoss/Products/ZenModel/migrate/Migrate.py", line 280, in migrate
m.cutover(self.dmd)
File "/opt/zenoss/Products/ZenModel/migrate/SpeedUpGlobalCatalog.py", line 136, in cutover
self.removeSoftwareAndOperatingSystems(dmd)
File "/opt/zenoss/Products/ZenModel/migrate/SpeedUpGlobalCatalog.py", line 127, in removeSoftwareAndOperatingSystems
cat = ICatalogTool(dmd)
File "/opt/zenoss/lib/python/zope/site/hooks.py", line 95, in adapter_hook
return siteinfo.adapter_hook(interface, object, name, default)
File "/opt/zenoss/Products/Zuul/tree.py", line 191, in __init__
self.catalog._v_caches = getattr(self.catalog, "_v_caches", OOBTree())
File "/opt/zenoss/lib/python/ZODB/broken.py", line 317, in __setattr__
raise BrokenModified("Can't change broken objects")
ZODB.broken.BrokenModified: Can't change broken objects
So this looks like an issues with ZODB broken.py? I'll start researching that
dswope:
In zendmd, try:
sync()
from Acquisition import aq_base
from Products.ZenRelations.ToManyContRelationship import ToManyContRelationship
reportclass = dmd.Reports._getOb('Multi-Graph Reports')
for organizer in reportclass.getSubOrganizers():
for report in organizer.reports():
try:
rptcolls = report.collections
except AttributeError:
continue
for coll in rptcolls():
rel = coll.items
if isinstance(rel, ToManyContRelationship):
obs = []
for ob in rel():
obs.append(aq_base(ob))
remote_rel = ob.collection
remote_rel._remove(coll)
rel._remove(ob)
coll._delObject('items')
coll.buildRelations()
newrel = coll.collection_items.primaryAq()
for ob in obs:
newrel._setObject(ob.getId(), ob)
ob = newrel._getOb(ob.getId())
print ob.__primary_parent__
assert ob.__primary_parent__ == newrel
assert ob.collection() == coll
assert ob in newrel()
commit()
--Shane
This is the output of me trying to get into zendmd
[zenoss@ZENOSS root]$ zendmd
2011-11-29 14:36:49 ERROR zc.lockfile Error locking file /opt/zenoss/var/zeo1-1.zec.lock; pid=UNKNOWN
Traceback (most recent call last):
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 76, in __init__
_lock_file(fp)
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 59, in _lock_file
raise LockError("Couldn't lock %r" % file.name)
LockError: Couldn't lock '/opt/zenoss/var/zeo1-1.zec.lock'
Traceback (most recent call last):
File "/opt/zenoss/Products/ZenModel/zendmd.py", line 421, in <module>
vars = _customStuff()
File "/opt/zenoss/Products/ZenModel/zendmd.py", line 93, in _customStuff
app = Zope2.app()
File "/opt/zenoss/lib/python/Zope2/__init__.py", line 51, in app
startup()
File "/opt/zenoss/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/zenoss/lib/python/Zope2/App/startup.py", line 72, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/opt/zenoss/lib/python/Zope2/Startup/datatypes.py", line 287, in getDatabase
db = factory.open(name, self.databases)
File "/opt/zenoss/lib/python/Zope2/Startup/datatypes.py", line 185, in open
DB = self.createDB(database_name, databases)
File "/opt/zenoss/lib/python/Zope2/Startup/datatypes.py", line 182, in createDB
return ZODBDatabase.open(self, databases)
File "/opt/zenoss/lib/python/ZODB/config.py", line 101, in open
storage = section.storage.open()
File "/opt/zenoss/lib/python/ZODB/config.py", line 210, in open
**options)
File "/opt/zenoss/lib/python/ZEO/ClientStorage.py", line 395, in __init__
self._cache = self.ClientCacheClass(cache_path, size=cache_size)
File "/opt/zenoss/lib/python/ZEO/cache.py", line 194, in __init__
self._lock_file = zc.lockfile.LockFile(path + '.lock')
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 76, in __init__
_lock_file(fp)
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 59, in _lock_file
raise LockError("Couldn't lock %r" % file.name)
zc.lockfile.LockError: Couldn't lock '/opt/zenoss/var/zeo1-1.zec.lock'
dswope:
I'd stop zenoss completely, restart it and try again. Thats a odd error.
Yeah, funny you mentioned that. I have restarted the entire server. Starting zenoss now..it's now running and still no go. This sucks
[zenoss@ZENOSS root]$ service zenoss start
Password:
Daemon: zeoctl .
daemon process started, pid=2400
Daemon: zopectl .
daemon process started, pid=2405
Daemon: zenhub starting...
Daemon: zenjobs starting...
Daemon: zenping starting...
Daemon: zensyslog starting...
Daemon: zenstatus starting...
Daemon: zenactions starting...
Daemon: zentrap starting...
Daemon: zenmodeler starting...
Daemon: zenperfsnmp starting...
Daemon: zencommand starting...
Daemon: zenprocess starting...
Daemon: zenwin starting...
Daemon: zeneventlog starting...
[zenoss@ZENOSS root]$
[zenoss@ZENOSS root]$
[zenoss@ZENOSS root]$
[zenoss@ZENOSS root]$
[zenoss@ZENOSS root]$ zendmd
2011-11-29 15:32:33 ERROR zc.lockfile Error locking file /opt/zenoss/var/zeo1-1.zec.lock; pid=UNKNOWN
Traceback (most recent call last):
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 76, in __init__
_lock_file(fp)
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 59, in _lock_file
raise LockError("Couldn't lock %r" % file.name)
LockError: Couldn't lock '/opt/zenoss/var/zeo1-1.zec.lock'
Traceback (most recent call last):
File "/opt/zenoss/Products/ZenModel/zendmd.py", line 421, in <module>
vars = _customStuff()
File "/opt/zenoss/Products/ZenModel/zendmd.py", line 93, in _customStuff
app = Zope2.app()
File "/opt/zenoss/lib/python/Zope2/__init__.py", line 51, in app
startup()
File "/opt/zenoss/lib/python/Zope2/__init__.py", line 47, in startup
_startup()
File "/opt/zenoss/lib/python/Zope2/App/startup.py", line 72, in startup
DB = dbtab.getDatabase('/', is_root=1)
File "/opt/zenoss/lib/python/Zope2/Startup/datatypes.py", line 287, in getDatabase
db = factory.open(name, self.databases)
File "/opt/zenoss/lib/python/Zope2/Startup/datatypes.py", line 185, in open
DB = self.createDB(database_name, databases)
File "/opt/zenoss/lib/python/Zope2/Startup/datatypes.py", line 182, in createDB
return ZODBDatabase.open(self, databases)
File "/opt/zenoss/lib/python/ZODB/config.py", line 101, in open
storage = section.storage.open()
File "/opt/zenoss/lib/python/ZODB/config.py", line 210, in open
**options)
File "/opt/zenoss/lib/python/ZEO/ClientStorage.py", line 395, in __init__
self._cache = self.ClientCacheClass(cache_path, size=cache_size)
File "/opt/zenoss/lib/python/ZEO/cache.py", line 194, in __init__
self._lock_file = zc.lockfile.LockFile(path + '.lock')
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 76, in __init__
_lock_file(fp)
File "/opt/zenoss/lib/python/zc/lockfile/__init__.py", line 59, in _lock_file
raise LockError("Couldn't lock %r" % file.name)
zc.lockfile.LockError: Couldn't lock '/opt/zenoss/var/zeo1-1.zec.lock'
[zenoss@ZENOSS root]$ service zenoss status
Password:
Daemon: zeoctl program running; pid=2400
Daemon: zopectl program running; pid=2405
Daemon: zenhub program running; pid=2440
Daemon: zenjobs program running; pid=2465
Daemon: zenping program running; pid=2539
Daemon: zensyslog program running; pid=2578
Daemon: zenstatus program running; pid=2584
Daemon: zenactions program running; pid=2610
Daemon: zentrap program running; pid=2690
Daemon: zenmodeler program running; pid=2711
Daemon: zenperfsnmp program running; pid=2745
Daemon: zencommand program running; pid=2779
Daemon: zenprocess program running; pid=2805
Daemon: zenwin program running; pid=2875
Daemon: zeneventlog program running; pid=2937
[zenoss@ZENOSS root]$
dswope:
As the zenoss user, zeoctl stop then zeoctl. It'll present a zeo> prompt. Type fg and post the trace.
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||