Common Zenoss Errors - Post Install
From SysAdminWiki
Common Zenoss Errors Page:
Access denied for user 'zenoss'@'localhost'
Ok so your seeing some sort of mysql access errors. In my scenario the zenoss mysql password got changed. So here is how to find out what zenoss is currently trying to use for a username and password, then we are going to just set that into mysql so that it works.
1. Switch to the zenoss user. 'su - zenoss' if you were root.
2. Zenoss has a built in command shell called zendmd. ITs opened like this:
zenoss@ubuntubox:~$ /usr/local/zenoss/bin/zendmd Welcome to zenoss dmd command shell! use zhelp() to list commands >>>
3. Next we will two commands, the first one 'dmd.ZenEventManager.username' will give us the username and the second will give us the password 'dmd.ZenEventManager.password'.
Welcome to zenoss dmd command shell! use zhelp() to list commands >>> dmd.ZenEventManager.username 'zenoss' >>> dmd.ZenEventManager.password 'zenoss' >>>
4. So now that we know that the user/pass is zenoss, we need to change that in mysql so that zenoss can access the eventsdb again. I logged back in as root for this step.
root@ubuntubox:/usr/local/zenoss/libexec# mysql -h localhost -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10803 Server version: 5.0.51a-0.dotdeb.1 (Dotdeb) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> grant DROP,CREATE,INSERT,UPDATE,SELECT on events.* to zenoss identified by 'zenoss'; Query OK, 0 rows affected (0.02 sec) mysql> grant DROP,CREATE,INSERT,UPDATE,SELECT on events.* to zenoss@localhost identified by 'zenoss'; Query OK, 0 rows affected (0.00 sec)
AttributeError: 'module' object has no attribute disassemble
This is a known error, and has been fixed in Changeset6052. However here is the way to fix these manually, not overly complicated. We are basically going to replace three files with updated versions from the Changeset link above. So open two pages, this guide and the Changeset6052.
1. SSH into the zenoss server and go to $ZENHOME/Products/ZenStatus/.
2. Next backup the original file. 'cp AsyncPing.py AsyncPing.py.old'
3. Next we will get the new source code. I've made a zip with the 3 python files in it for ease. However you may want to get them for yourself from Changeset6052. Your call, my bundle is here.
4. So next you can either transfer those files to your server then cp them to their proper spot, or open them in a text editor, copy the text, and paste into the files on the server. Either way works. I like to copy the files over, so this method shows that way. Assuming you have copied the rar file into your home directory do the following:
# service zenoss stop (or ./zeoctl stop) # unrar e pythonfixes.rar # mv /usr/zenoss/Products/ZenStatus/AsyncPing.py /usr/zenoss/Products/ZenStatus/AsyncPing.py.old # mv /usr/zenoss/Products/ZenStatus/Ping.py /usr/zenoss/Products/ZenStatus/Ping.py.old # mv /usr/zenoss/Products/ZenStatus/pingjob.py /usr/zenoss/Products/ZenStatus/pingjob.py.old # cp AsyncPing.py /usr/zenoss/Products/ZenStatus/ # cp pingjob.py /usr/zenoss/Products/ZenStatus/ # cp Ping.py /usr/zenoss/Products/ZenStatus/ # chown zenoss.users /usr/zenoss/Products/ZenStatus/*.py # service zenoss start (or ./zeoctl start)
5. After Zenoss is backup you should be good go, if not hit up the fourms, there is a thread here: http://community.zenoss.com/forums/viewtopic.php?t=2871
Connection Refused / Zope fails to start
This happened to me after I upgraded my kernel, and rebooted the server. While collections and monitoring were still working finest kind, I could not connect to the web interface on port 8080. Luckily I found a thread where Chet Luther explains the fix. The upgrade apparently corrupted my zope cache. This fixed it:
- 1. Log in as the zenoss user.
- 2. Clear the zope cache.
zopectl stop rm $ZENHOME/var/zeo1-1.zec zeoctl start
ERROR_NET_WRITE_FAULT: A write fault occurred on the network
I've only seen this happen on windows systems. You will get this message in your event logs. The cause ended up being a misused \ instead of /.
- Go into your device zproperties for the device with this error.
- Change the existing zWinUser to <domain>/<username>
Google Maps is not working Correctly
See Zenoss Google Maps.
Missing devices / can longer see old devices you know are there
- Run zendmd and do the following:
> reindex() > commit()
You get permission errors on zensocket even tho changed permissions and setuid
This happened to me after upgrading from Zenoss 1.1 to 2.0. It looks something like this:
zenoss@atas1:/usr/zenoss> /usr/local/zenoss/bin/zendisc run --net 172.29.198.0 ZenSocket Error: zensocket needs to be run as root or setuid
Now keeping in mind, if you followed the guide on this to install zenoss, the last step has you setUID which should have corrected this, however for whatever reason it does not work. I had to do the following:
- 1. Shutdown Zenoss and Zope.
# zeoctl stop # zopectl stop
- 2.
# chown root.root /usr/local/zenoss/bin/zensocket # chmod 4755 /usr/local/zenoss/bin/zensocket
- 4. Restart Zenoss.
# zeoctl start # zopectl start
- 5. You should be able to run a discovery now / use the zensocket.
You go to run a discovery and it cannot run zenfunctions:
atas1:/usr/local/zenoss/log # /usr/local/zenoss/bin/zendisc run --net 172.29.198 .0 /usr/local/zenoss/bin/zendisc: line 13: /usr/zenoss/bin/zenfunctions: No such fi le or directory /usr/local/zenoss/bin/zendisc: line 21: generic: command not found
Ok so notice that zendisc lives in /usr/local/zenoss BUT its looking for zenfuctions in /usr/zenoss. That is a problem, how this came to be i am not sure, however the fix is somewhat easy.
- 1. Switch to root.
- 2.
ln -s /usr/local/zenoss /usr/zenoss
- 3. So you just created a sumbolic link that says /usr/zenoss is really /usr/local/zenoss. That will fix the above error with no extra consequences that i have run into as of yet.
