You should put the python tool somewhere the zenoss user can access it, maybe /tmp. Then login as the zenoss user, and navigate to wherever you put the file.
You should then be able to simply do
python zenfixit.py
and it ought to run.
--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
thank you...I tried it but it didn't fix Zenoss
zenoss@xxx:/tmp$ python zenfixit.py
Cleaning up invalid entries from catalogs:
* deviceSearch
* componentSearch
* layer3_catalog
* maintenanceWindowSearch
* zenPackPersistence
- removing /zport/ethernetCsmacd/datasources/PerfRawData.
- removing /zport/copy_of_FileSystem/datasources/usedBlocksWMI.
- removing /zport/FileSystem/datasources/usedBlocks.
- removing /zport/Device/datasources/PerfOSMemory.
- removing /zport/Device/datasources/sysUpTime.
- removing Device/datasources/Processor.
- removing /zport/ethernetCsmacd/datasources/ifOperStatus.
- removing /zport/OSProcess/datasources/Process.
- removing /zport/Win32DiskDrive/datasources/DiskDrive.
- removing Win32DiskDrive/datasources/DiskDrive.
- removing /zport/FileSystem/datasources/PerfDisk.
- removing ethernetCsmacd/datasources/PerfRawData.
- removing copy_of_FileSystem/datasources/usedBlocksWMI.
- removing /zport/Device/datasources/Processor.
- removing Device/datasources/sysUpTime.
- removing ethernetCsmacd/datasources/ifOperStatus.
- removing /zport/Win32DiskDrive/datasources/PerfDisk.
- removing FileSystem/datasources/PerfDisk.
- removing FileSystem/datasources/usedBlocks.
- removing Device/datasources/PerfOSMemory.
- removing OSProcess/datasources/Process.
- removing Win32DiskDrive/datasources/PerfDisk.
Cleaning up any admin roles associated to invalid users.
Updating component catalog with monitor state from database.
Verifying that all devices have a deviceClass relation.
Removing invalid devices from collectors.
Converting important values from unicode to string.
Unbinding component templates from devices.
Removing IP addresses linked to invalid devices.
I cleared the browser's History and checked Zenoss...no change
zenoss@xxx:/tmp$ zenoss restart
Daemon: zenperfwmi stopping...
Daemon: zeneventlog stopping...
Daemon: zenwin stopping...
Daemon: zenprocess stopping...
Daemon: zencommand stopping...
Daemon: zenperfsnmp stopping...
Daemon: zenmodeler stopping...
Daemon: zentrap stopping...
Daemon: zenactions stopping...
Daemon: zenstatus stopping...
Daemon: zensyslog stopping...
Daemon: zenping stopping...
Daemon: zenjobs stopping...
Daemon: zenhub stopping...
Daemon: zopectl .
daemon process stopped
Daemon: zeoctl .
daemon process stopped
Daemon: zeoctl .
daemon process started, pid=21043
Daemon: zopectl .
daemon process started, pid=21054
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...
Daemon: zenperfwmi starting...
Cleared again the browser's history and checked Zenoss...no joy
Rebooted Ubuntu...no change.
Any other suggestions?
Would I be able to export the current setup, templates etc..remove and re-install Zenoss and import?
My boss spent days tweaking the templates.
so exactly what is the issue you're seeing at this point since running zenfixit and restarting?
python zenfixit.py
Traceback (most recent call last):
File "zenfixit.py", line 3, in <module>
from Products.ZenUtils.ZenScriptBase import ZenScriptBase
ImportError: No module named ZenUtils.ZenScriptBase
resulting in the same error as before on when browsing to the infrastucture page
The server reported the following error:
Unable to connect to the server.
every single time when I try to view Events, the fallowing errors come up:
2011-09-13T11:40:23 ERROR extdirect 'allowedRolesAndUsers'
Traceback (most recent call last):
File "/usr/local/zenoss/zenoss/Products/ZenUtils/extdirect/router.py", line 128, in _processDirectRequest
result = _targetfn(**data)
File "/usr/local/zenoss/zenoss/Products/Zuul/routers/device.py", line 175, in getDevices
devices, details = facade.getDeviceList(uid, start, limit, sort, dir, params)
File "/usr/local/zenoss/zenoss/Products/Zuul/facades/devicefacade.py", line 147, in getDeviceList
query=query, hashcheck=hashcheck)
File "/usr/local/zenoss/zenoss/Products/Zuul/tree.py", line 286, in search
queryResults = self._queryCatalog(types, queryOrderby, reverse, paths, depth, query)
File "/usr/local/zenoss/zenoss/Products/Zuul/tree.py", line 378, in _queryCatalog
result = self.catalog.evalAdvancedQuery(*args)
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/eval.py", line 40, in eval
rs = _eval(query, cat)
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/eval.py", line 16, in _eval
rs = query._eval(_QueryContext(cat))
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/AdvancedQuery.py", line 220, in _eval
for q in nsq: r = intersection(r, q._eval(context))
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/AdvancedQuery.py", line 84, in _eval
return context._applyIndex(self, term)
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/AdvancedQuery.py", line 278, in _applyIndex
res = cat.indexes[index].__of__(cat)._apply_index(
KeyError: 'allowedRolesAndUsers'
------
2011-09-13T11:41:15 ERROR extdirect 'allowedRolesAndUsers'
Traceback (most recent call last):
File "/usr/local/zenoss/zenoss/Products/ZenUtils/extdirect/router.py", line 128, in _processDirectRequest
result = _targetfn(**data)
File "/usr/local/zenoss/zenoss/Products/Zuul/routers/device.py", line 175, in getDevices
devices, details = facade.getDeviceList(uid, start, limit, sort, dir, params)
File "/usr/local/zenoss/zenoss/Products/Zuul/facades/devicefacade.py", line 147, in getDeviceList
query=query, hashcheck=hashcheck)
File "/usr/local/zenoss/zenoss/Products/Zuul/tree.py", line 286, in search
queryResults = self._queryCatalog(types, queryOrderby, reverse, paths, depth, query)
File "/usr/local/zenoss/zenoss/Products/Zuul/tree.py", line 378, in _queryCatalog
result = self.catalog.evalAdvancedQuery(*args)
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/eval.py", line 40, in eval
rs = _eval(query, cat)
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/eval.py", line 16, in _eval
rs = query._eval(_QueryContext(cat))
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/AdvancedQuery.py", line 220, in _eval
for q in nsq: r = intersection(r, q._eval(context))
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/AdvancedQuery.py", line 84, in _eval
return context._applyIndex(self, term)
File "/usr/local/zenoss/python/lib/python2.6/site-packages/Products.AdvancedQuery-3.0-py2.6.egg/Products/AdvancedQuery/AdvancedQuery.py", line 278, in _applyIndex
res = cat.indexes[index].__of__(cat)._apply_index(
KeyError: 'allowedRolesAndUsers'
------
2011-09-13T16:02:03 INFO zen.ZenossInfo Telling zeoctl to stop
------
2011-09-13T16:02:03 INFO zen.ZenossInfo Telling zopectl to stop
------
2011-09-13T16:02:04 INFO zen.ZenossInfo Telling zenhub to stop
------
2011-09-13T16:02:04 INFO ZEO.ClientStorage zeostorage Disconnected from storage: "('localhost', 8100)"
------
2011-09-13T16:02:04 WARNING ZEO.zrpc (15597) CW: error connecting to ('localhost', 8100): ECONNREFUSED
------
2011-09-13T16:02:04 INFO zen.ZenossInfo Telling zenjobs to stop
------
2011-09-13T16:02:04 INFO SignalHandler Caught signal SIGTERM
------
2011-09-13T16:02:04 INFO Z2 Shutting down fast
------
2011-09-13T16:02:04 INFO ZServer closing HTTP to new connections
------
2011-09-13T16:02:57 INFO ZServer HTTP server started at Tue Sep 13 16:02:57 2011
Hostname: 0.0.0.0
Port: 8080
------
2011-09-13T16:02:58 INFO ZEO.ClientStorage zeostorage ClientStorage (pid=19989) created RW/normal for storage: '1'
------
2011-09-13T16:02:58 INFO ZEO.cache created temporary cache file '<fdopen>'
------
2011-09-13T16:02:58 INFO ZEO.ClientStorage zeostorage Testing connection <ManagedClientConnection ('127.0.0.1', 8100)>
------
2011-09-13T16:02:58 INFO ZEO.zrpc.Connection(C) (localhost:8100) received handshake 'Z309'
------
2011-09-13T16:02:59 INFO ZEO.ClientStorage zeostorage Server authentication protocol None
------
2011-09-13T16:02:59 INFO ZEO.ClientStorage zeostorage Connected to storage: ('localhost', 8100)
------
2011-09-13T16:02:59 INFO ZEO.ClientStorage zeostorage No verification necessary -- empty cache
------
2011-09-13T16:03:01 INFO Zope_Hotfix_20110622 Patched traverse method of zope.traversing.namespaces.resource.
------
2011-09-13T16:03:01 INFO Zope_Hotfix_20110622 Disabled acquire traverser.
------
2011-09-13T16:03:01 INFO Zope_Hotfix_20110622 Disabled attr traverser.
------
2011-09-13T16:03:01 INFO Zope_Hotfix_20110622 Disabled item traverser.
------
2011-09-13T16:03:01 INFO Zope_Hotfix_20110622 Disabled lang traverser.
------
2011-09-13T16:03:01 INFO Zope_Hotfix_20110622 Disabled vh traverser.
------
2011-09-13T16:03:01 INFO Zope_Hotfix_20110622 Hotfix installed.
------
2011-09-13T16:03:01 INFO Zope Ready to handle requests
Advanced>Daemons>zopectl
Do you think it's related ?
it's fixed now.
My boss updated the zenpacks and run zenmigrate twice...
Job done, zenoss running fine now, I'm going to be looking into regular backups now on...we don't want this happening again...
I hope this helps other people.
I have the same errors as described in the post. Both zenmigrate and zenfixit give me this error:
AttributeError: 'HPCPU' object has no attribute 'index_object'
Anyone have any ideas where I should look to fix that error?
mmm, that's got me thinking. Looking at some othe Zenpacks. I see ZenPacks.zenoss.HPMonitor-2.1.0-py2.4.egg.zip.
But I see my python version is 2.6 and there's a 2.6 version of this Zenpack from
servlet/JiveServlet/download/3448-7-2902/ZenPacks.zenoss.HPMonitor-2.1.0-py2.6.egg.zip (docs/DOC-3448)
So I guess the Question is how to I replace the 2.4 Zenpack with the 2.6 Zenpack?
I can't seem to remove the 2.4 version via the web interface.
I used zenpack --remove=ZenPacks.zenoss.HPMonitor to remove it. Just tried to install the 2.6 version instead. Running a zenmigrate now to see if it works better now. Will return when it's done
Downloading the 2.6 version of the Zenpacks from http://dev.zenoss.org/zenpacks/ now - installed them successfully (seem to replace the old but also deleted the old zenpack py2.4 folders) but still get the same errors as before.
Now getting...
zenmigrate
INFO:zen.migrate:Database going to version Zenoss 3.1.70
INFO:zen.migrate:Installing DeviceSearchCatalogUpdate (3.1.1)
INFO:zen.migrate:Installing IpSearchCatalogUpdate (3.1.1)
INFO:zen.migrate:Updating IpAddress Catalog
INFO:zen.migrate:rate=57.49/sec count=200
INFO:zen.migrate:Finished total time=4.08 rate=58.04 count=237
INFO:zen.migrate:Installing RebuildPathIndex (3.1.1)
WARNING:zen.migrate:Recovering
Traceback (most recent call last):
File "/usr/local/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 21, in <module>
main()
File "/usr/local/zenoss/Products/ZenModel/migrate/zenmigrate.py", line 18, in main
m.main()
File "/usr/local/zenoss/Products/ZenModel/migrate/Migrate.py", line 417, in main
self.cutover()
File "/usr/local/zenoss/Products/ZenModel/migrate/Migrate.py", line 304, in cutover
self.migrate()
File "/usr/local/zenoss/Products/ZenModel/migrate/Migrate.py", line 280, in migrate
m.cutover(self.dmd)
File "/usr/local/zenoss/Products/ZenModel/migrate/rebuildPathIndex.py", line 41, in cutover
for x in zport.global_catalog():
TypeError: 'GlobalCatalog' object is not callable
Still get the same errors when trying to view Infrastructure.
I still get the same error in zenmigrate as I did before even with the 2.6 version of HPmonitor
Insane_Homer:
Sounds like your global catalog is messed up. Have you tried running a `python $ZENHOME/Products/ZenUtils/zencatalog.py --createcatalog --forcereindex` as user zenoss?
Best,
--Shane W. Scott(Hackman238)
ZCA - community/zca/blog
Shane,
thanks, I get the following running at command
python zencatalog.py --createcatalog --forcereindex
Traceback (most recent call last):
File "zencatalog.py", line 25, in <module>
from Products.ZenRelations.ToManyContRelationship import ToManyContRelationship
ImportError: No module named ZenRelations.ToManyContRelationship
... and made no difference. Still the same issue.
Insane_Homer:
Oh yikes. Thats a pretty serious error. Did you run this as user zenoss? Can you post the output of `env` as user zenoss?
Thanks!
Best,
--Shane W. Scott(Hackman238)
ZCA - community/zca/blog
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||