Trying the solution in the thread at 
http://community.zenoss.com/forums/viewtopic.php?t=3461&view=previous&sid=a723697051991bc0f1ee4c4a5845676b

I dumped, dropped and re-created the db zenoss is using.

Code:
mysqldump --opt zenoss --result-file=zenoss.db
mysql -u root -p
drop database zenoss;
create database zenoss;
grant all on zenoss.* to zenoss@'172.16.54.32' identified by 'password';
mysql -u root -p -D zenoss < zenoss.db




Then removed *.zec & *.pid from $ZENHOME/var and started Zenoss

Code:
cd /opt/zenoss/var
rm *.zec
rm *.pid
service zenoss start




Pointed my browser at zenoss and tried to move an event to the history.  Still 
no luck but different result in $ZENHOME/log/event.log

I got the following this time

Code:

------
2008-04-03T09:01:19 ERROR Zope.SiteErrorLog 
http://zenoss:8080/zport/dmd/Devices/Server/Windows/devices/whmail/manage_deleteBatchEvents
Traceback (most recent call last):
  File "/opt/zenoss/lib/python/ZPublisher/Publish.py", line 114, in publish
    request, bind=1)
  File "/opt/zenoss/lib/python/ZPublisher/mapply.py", line 88, in mapply
    if debug is not None: return debug(object,args,context)
  File "/opt/zenoss/lib/python/ZPublisher/Publish.py", line 40, in call_object
    result=apply(object,args) # Type s<cr> to step into published object.
  File "/opt/zenoss/Products/ZenModel/EventView.py", line 156, in 
manage_deleteBatchEvents
    self.manage_deleteEvents(evids, request)
  File "/opt/zenoss/Products/ZenModel/EventView.py", line 128, in 
manage_deleteEvents
    self.getEventManager().manage_deleteEvents(evids, request)
  File "/opt/zenoss/Products/ZenEvents/EventManagerBase.py", line 1769, in 
manage_deleteEvents
    self.deleteEvents(whereClause, 'Deleted by user')
  File "/opt/zenoss/Products/ZenEvents/EventManagerBase.py", line 1758, in 
deleteEvents
    self.updateEvents('DELETE FROM status', whereClause, reason)
  File "/opt/zenoss/Products/ZenEvents/EventManagerBase.py", line 1724, in 
updateEvents
    curs.execute(query)
  File "/opt/zenoss/lib/python/MySQLdb/cursors.py", line 137, in execute
    self.errorhandler(self, exc, value)
  File "/opt/zenoss/lib/python/MySQLdb/connections.py", line 33, in 
defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1227, 'Access denied; you need the SUPER privilege for this 
operation')




Firing up tcpdump and looking at the captured traffic in wireshark I get the 
following queries and responses.

Code:

zenoss -> mysql: INSERT INTO log (evid, userName, text) SELECT evid, "admin", 
"Deleted by user" FROM status  where evid in ('7f0000013693398bff5b81c')
mysql -> zenoss: OK (records: 1 Dups: 0 Warnings: 0)

zenoss -> mysql: DELETE FROM status  where evid in ('7f0000013693398bff5b81c')
mysql -> zenoss: Error message: Access denied; you need the SUPER privilege for 
this operation




Next I dropped the database and the mysql user 'zenoss'.

Code:
drop database zenoss;
show grants for zenoss@'172.16.54.32';
revoke all privileges, grant option from 'zenoss'@'172.16.54.32' identified by 
'password';
show grants for zenoss@'localhost';
revoke all privileges, grant option from 'zenoss'@'localhost' identified by 
'password';
drop user zenoss;




Then re-create the database

Code:
create database zenoss;
mysql -u root -p -D zenoss < zenoss.db
grant all on zenoss.* to zenoss@'172.16.54.32' identified by 'password';
show grants for [EMAIL PROTECTED];

+------------------------------------------------------------------------------------------+
| Grants for [EMAIL PROTECTED]                                                  
       |
+------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'zenoss'@'172.16.54.32' IDENTIFIED BY PASSWORD 
'1f8479e234dcce4f' | 
| GRANT ALL PRIVILEGES ON `zenoss`.* TO 'zenoss'@'172.16.54.32'                 
          | 
+------------------------------------------------------------------------------------------+

show grants for [EMAIL PROTECTED];
ERROR 1141 (42000): There is no such grant defined for user 'zenoss' on host 
'localhost'




Jump over to the server that zenoss runs on and manually try the DELETE command.

Code:
mysql -u zenoss -p -h mysql.server
use zenoss;
DELETE FROM status  where evid in ('7f0000013693398bff5b81c');
ERROR 1449 (HY000): There is no 'zenoss'@'localhost' registered




Ok, I now at least know where the 'zenoss'@'localhost' registered error message 
in event.log was coming from.  Don't know why but at least I can manually 
reproduce it.

So, now I grant [EMAIL PROTECTED] all on zenoss.* (on the mysql server box, not 
the server running zenoss)

Code:
grant all on zenoss.* to [EMAIL PROTECTED] identified by 'password';
show grants for [EMAIL PROTECTED];
+--------------------------------------------------------------------------------------+
| Grants for [EMAIL PROTECTED]                                                  
        |
+--------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'zenoss'@'localhost' IDENTIFIED BY PASSWORD 
'1f8479e234dcce4f' | 
| GRANT ALL PRIVILEGES ON `zenoss`.* TO 'zenoss'@'localhost'                    
       | 
+--------------------------------------------------------------------------------------+





And then jumping over to the zenoss server, I try the sql query again

Code:
DELETE FROM status  where evid in ('7f0000013693398bff5b81c');
ERROR 1227 (42000): Access denied; you need the SUPER privilege for this 
operation



So, at this point it looks like a MySQL issue.  I am using MySQL 5.0.22.

I'll keep digging but if anyone has an ideas, suggestions or fixes, please let 
me know.

thanks,
  greg




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=18063#18063

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to