PDA

View Full Version : Zabbix 1.4.2 with mysql query error


hcosta
10-09-2007, 20:01
Hi everyone,

I installed Zabbix 1.4.2 in a CentOS 5 server (kernel 2.6.18-8, Mysql 5.0.22) and the installation was ok, but when I accessed the web interface, in the screen Monitoring/Overview shows to me the following mysql errors:

* Error in query [select n.nodeid as nodeid,n.name as node_name,hg.groupid,hg.name,min(r.permission) as permission,g.userid from groups hg left join rights r on r.id=hg.groupid and r.type=1 left join users_groups g on r.groupid=g.usrgrpid and g.userid=1 left join nodes n on (hg.groupid div 100000000000000)=n.nodeid where (hg.groupid div 100000000000000) in (0) and group by n.nodeid, n.name, hg.groupid, hg.name, g.userid, g.userid order by n.name, hg.name, permission desc] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by n.nodeid, n.name, hg.groupid, hg.name, g.userid, g.userid order by n.n' at line 1]
* mysql_fetch_array(): supplied argument is not a valid MySQL result resource[/var/www/html/zabbix/include/db.inc.php:411]
* Error in query [select distinct n.nodeid,n.name as node_name,h.hostid,h.host, min(r.permission) as permission,ug.userid from hosts h left join hosts_groups hg on hg.hostid=h.hostid left join groups g on g.groupid=hg.groupid left join rights r on r.id=g.groupid and r.type=1 left join users_groups ug on ug.usrgrpid=r.groupid and ug.userid=1 left join nodes n on (h.hostid div 100000000000000)=n.nodeid where (h.hostid div 100000000000000) in (0) and group by h.hostid,n.nodeid,n.name,h.host,ug.userid order by n.name,n.nodeid, h.host, permission desc, userid desc] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group by h.hostid,n.nodeid,n.name,h.host,ug.userid order by n.name,n.nodeid, h.' at line 1]
* mysql_fetch_array(): supplied argument is not a valid MySQL result resource[/var/www/html/zabbix/include/db.inc.php:411]

What could be this?

Thank in advanced...

Hugo Costa
Brazil - SP

fcmt
20-11-2007, 04:07
Hi,

I got the same problem as yours.
anyone can help?

P.S. I've change the graphs.php (line 348, 'while' to 'where') but no luck still not working.....:(

cross
20-11-2007, 15:42
My situation looks like this while getting Group:all, Host:all list of graphs from configuration menu:

* Error in query [select distinct g.* from graphs g left join graphs_items gi on g.graphid=gi.graphid left join items i on gi.itemid=i.itemid while (g.graphid div 100000000000000) in (0) and ( i.hostid not in (-1) OR i.hostid is NULL ) order by g.name, g.graphid] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'while (g.graphid div 100000000000000) in (0) and ( i.hostid not in (-1) OR i.' at line 1]
* mysql_fetch_array(): supplied argument is not a valid MySQL result resource[/etc/zabbix/db.inc.php:411]

zabbix-1.4.2-2.fc6
mysql-server-5.0.22-2.1.0.1
httpd-2.2.3-11.el5
php-5.1.6-15.el5

Is threre any fixes or workarrounds?

Thanks in advance.