Guest User!

You are not Sophos Staff.

[2.050][SCHEDULED] Reporting->Aggregated->Accounting SQL Error

If i select a device in Reporting->Aggregated->Overview i can generate a report. But if i click any of the other tabs i get the following error:


An error occurred accessing the Database. Please contact your administrator if this issue persists.

Code: #10700
Error: SQL query error
RPC call in aggregated get objs


see also the attached screenshot!
Parents
  • Hi,

    can you please post the error message you get in /var/log/accd.log when you generate the report. The problem might be related to the 
    "SQL Errors in fallback.log" you reported.
    Thorsten
  • Here is the error message:


    2009:10:21-10:22:59 acc accd: 60251964 [0xb5a38ba0] ERROR libs.db.DatabaseProxy null - execute( SELECT country.name,ipaddr.name,sum(traffic),sum(flow_cnt),sum(packet_cnt) FROM aggregated_accounting_destinations,aggregated_lookup_country_names as country,aggregated_lookup_ip_addresses as ipaddr WHERE country_id=country.id AND ipaddr_id=ipaddr.id AND day BETWEEN '2009-10-21' AND '2009-10-21' AND guid IN('F633493C-617D-11DE-82FD-CAEB809A9E97') GROUP BY country.name,ipaddr.name ORDER BY country.name,ipaddr.name, ...)ERROR: column ipaddr.name does not exist LINE 1: SELECT country.name,ipaddr.name,sum(traffic),sum(flow_cnt),s... ^


    seems like the field ipaddr.name doesn't exist. Maybe just a typo in the query...
  • Hi,

    thanks for the details. Okay, the query is correct, but the database upgrade which takes place during backup restore creates the lookup tables with another field name. So, this only happens after installing a backup from a previous version of ACC and then using aggregated reporting.

    Two points for you. 

    We will supply a fix for everyone who already restored a backup from ACC V2/V1.9.

    Thanks,
    Henning
Reply
  • Hi,

    thanks for the details. Okay, the query is correct, but the database upgrade which takes place during backup restore creates the lookup tables with another field name. So, this only happens after installing a backup from a previous version of ACC and then using aggregated reporting.

    Two points for you. 

    We will supply a fix for everyone who already restored a backup from ACC V2/V1.9.

    Thanks,
    Henning
Children