Error in report tool "Trunked core switch ports"
I'm having the same error messages as you Roger. I guess this can have something to do with the version of postgres we are using. I have installed Fedora Core 4 which comes with ver. 8.0.3 of postgres. I guess RHEL4 comes with ver 8 to. And I believe boolean expressions are handled in a different way in version 8 of postgres than in ver. 7. But I'm not a database expert. But if you edit /usr/local/nav/etc/report/front.html and replaces trunk=1 with trunk=t in line 80 the report works. The other "error" you reported earlier can be avoid by editing /usr/local/nav/etc/report/report.conf. Change line 290 from: GROUP BY roomid,sysname,host(ip),catid,orgid,val,netbox.netboxid,prefixid"; to GROUP BY roomid,sysname,host(ip),catid,orgid,val,netbox.netboxid,netbox.ip,prefix id"; Nice if someone of the devolpers can comment this. Cheers Odd Arne Hauge Molde University College
-----Original Message----- From: nav-users-bounces@itea.ntnu.no [mailto:nav-users-bounces@itea.ntnu.no] On Behalf Of Roger Aas Sent: Monday, October 03, 2005 1:34 PM To: nav-users@itea.ntnu.no Subject: [Nav-users] Error in report tool "Trunked core switch ports"
Nav version 3.0.0
"Toolbox -> Report -> Core Switches/Trunked core switch ports" gives me this error:
Configuration error! The report generator is not able to do such things. ERROR: operator does not exist: boolean = integer HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. SELECT b1.sysname,s1.interface,m1.module,s1.port,s1.link,s1.speed,s1. duplex,s1.media,s1.trunk,vlan.vlan,s1.portname,b2.sysname AS to_netboxid,m2.module AS remote_module,s1.swportid,b1.netboxid AS netboxid,b1.catid FROM swport AS s1 JOIN module AS m1 USING (moduleid) JOIN netbox AS b1 USING (netboxid) LEFT JOIN netbox AS b2 ON (to_netboxid=b2.netboxid) LEFT JOIN swportvlan ON (s1.swportid=swportvlan.swportid AND (trunk=false OR trunk IS NULL)) LEFT JOIN vlan using(vlanid) LEFT JOIN swport AS s2 ON (s1.to_swportid=s2.swportid) LEFT JOIN module AS m2 ON (s2.moduleid=m2.moduleid) WHERE s1.trunk = 1 AND b1.catid = 'SW' ORDER BY b1.sysname,module,port LIMIT 100 OFFSET 0
I sent earlier an email about another error I got on another report tool, when sorting on IP-address on servers. I have not received any hints to what could be the problem there.
httpd 2.0.52 jakarta-tomcat 5.0.28 java j2sdk1.4.2_08 perl 5.8.5 php 4.3.9 postgresql 7.4.8 python 2.3.4, mod_python 3.1.3
Regards, Roger
-- Roger Aas Stord/Haugesund College
_______________________________________________ Nav-users mailing list Nav-users@itea.ntnu.no http://mailman.itea.ntnu.no/mailman/listinfo/nav-users
But if you edit /usr/local/nav/etc/report/front.html and replaces trunk=1 with trunk=t in line 80 the report works.
Yes, this should be changed. '1' is not a valid value for a boolean field.
GROUP BY roomid,sysname,host(ip),catid,orgid,val,netbox.netboxid,netbox.ip,prefix id";
Someone probably forgot to include the netbox.ip column in the query. Morten, can you check in these two changes (I could too, but I am not sure what the current state of the subversion tree is)? -- Kristian
Hi Odd Arne. Thanks for replying. I tried your two edits and they worked perfectly for me also. RHEL4 use postgres 7.4.8 so this is a behaviour that has changed earlier than 8.0 I guess. And for others wanting to do the same before an "official" fix is available the first edit is on line 90 (at least in my 3.0.0 version) :-) And you seem like quite the db expert to me ;-) - Roger Hauge Odd Arne wrote:
I'm having the same error messages as you Roger. I guess this can have something to do with the version of postgres we are using. I have installed Fedora Core 4 which comes with ver. 8.0.3 of postgres. I guess RHEL4 comes with ver 8 to. And I believe boolean expressions are handled in a different way in version 8 of postgres than in ver. 7. But I'm not a database expert.
But if you edit /usr/local/nav/etc/report/front.html and replaces trunk=1 with trunk=t in line 80 the report works.
The other "error" you reported earlier can be avoid by editing /usr/local/nav/etc/report/report.conf. Change line 290 from: GROUP BY roomid,sysname,host(ip),catid,orgid,val,netbox.netboxid,prefixid"; to GROUP BY roomid,sysname,host(ip),catid,orgid,val,netbox.netboxid,netbox.ip,prefix id";
Nice if someone of the devolpers can comment this.
Cheers Odd Arne Hauge Molde University College
-----Original Message----- From: nav-users-bounces@itea.ntnu.no [mailto:nav-users-bounces@itea.ntnu.no] On Behalf Of Roger Aas Sent: Monday, October 03, 2005 1:34 PM To: nav-users@itea.ntnu.no Subject: [Nav-users] Error in report tool "Trunked core switch ports"
Nav version 3.0.0
"Toolbox -> Report -> Core Switches/Trunked core switch ports" gives me this error:
Configuration error! The report generator is not able to do such things. ERROR: operator does not exist: boolean = integer HINT: No operator matches the given name and argument type(s). You may need to add explicit type casts. SELECT b1.sysname,s1.interface,m1.module,s1.port,s1.link,s1.speed,s1. duplex,s1.media,s1.trunk,vlan.vlan,s1.portname,b2.sysname AS to_netboxid,m2.module AS remote_module,s1.swportid,b1.netboxid AS netboxid,b1.catid FROM swport AS s1 JOIN module AS m1 USING (moduleid) JOIN netbox AS b1 USING (netboxid) LEFT JOIN netbox AS b2 ON (to_netboxid=b2.netboxid) LEFT JOIN swportvlan ON (s1.swportid=swportvlan.swportid AND (trunk=false OR trunk IS NULL)) LEFT JOIN vlan using(vlanid) LEFT JOIN swport AS s2 ON (s1.to_swportid=s2.swportid) LEFT JOIN module AS m2 ON (s2.moduleid=m2.moduleid) WHERE s1.trunk = 1 AND b1.catid = 'SW' ORDER BY b1.sysname,module,port LIMIT 100 OFFSET 0
I sent earlier an email about another error I got on another report tool, when sorting on IP-address on servers. I have not received any hints to what could be the problem there.
httpd 2.0.52 jakarta-tomcat 5.0.28 java j2sdk1.4.2_08 perl 5.8.5 php 4.3.9 postgresql 7.4.8 python 2.3.4, mod_python 3.1.3
Regards, Roger
-- Roger Aas Stord/Haugesund College
_______________________________________________ Nav-users mailing list Nav-users@itea.ntnu.no http://mailman.itea.ntnu.no/mailman/listinfo/nav-users
-- Roger Aas F?rstekonsulent IT-tjenesten H?gskolen Stord/Haugesund E: roger.aas@hsh.no T: +47 52 70 26 21 F: +47 52 70 26 01 M: +47 917 99 053
participants (3)
-
kreide@gmail.com -
odd.hauge@hiMolde.no -
roger.aas@hsh.no