Article ID: 117465, created on Sep 24, 2013, last review on Dec 4, 2014

  • Applies to:
  • Odin Business Automation Standard 4.5

Symptoms

Task "Generate Revenue Report" is shown with error status:

Top > Configuration Director > Logging and Errors > Action Log > Tasks Queue
---8<---
Generate Revenue Report     Error
--->8---

I enabled DEBUG log level in PBA-S (Top > Configuration Director > Logging and Errors > Log Settings) and re-run the task:

Top > Configuration Director > Logging and Errors > Action Log > Tasks Queue > Generate Revenue Report > Redo task

The following error is shown in the log:

/var/log/hspc/hspc.log
---8<---
[2013/09/24 09:55:59] [DEBUG] [5766] [HSPC::Taskman::Comm::backend_execute_task] TRACE [01]: -> HSPC::MT::RevenueReport::Report->generate_and_sent_report (time => 2013-08-01 00:00:00) =>  [sw_die: rep2013-09-24_09-55-59 => DBD::mysql::st execute failed: Duplicate entry '2013-08-01 00:00:00' for key 2 at /usr/lib/perl5/site_perl/5.8.8/HSPC/WebDB.pm line 238.
INSERT INTO `revenue_report` (`sent_date`,`status`,`date`,`content`,`report_id`) VALUES ('2013-09-24 07:55:59','2','2013-08-01 00:00:00','<Revenue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:prr="http://sp.parallels.com/pba/report/revenue/revenue-1.0">
  <GeneralInfo>
...
--->8---

Here is duplicate record:

mysql> select id, date, status, sent_date from revenue_report where date like '2013-08-01%';
+----+---------------------+--------+---------------------+
| id | date                | status | sent_date           |
+----+---------------------+--------+---------------------+
|  4 | 2013-08-01 00:00:00 |      2 | 2013-08-31 21:17:06 |
+----+---------------------+--------+---------------------+
1 row in set (0.00 sec)

mysql>

Resolution

Dump the table (just in case) and delet the record:

# mysqldump aspc --extended-insert=false --tables revenue_report > revenue_report.dump.`date +%F.%s`.sql
#

mysql> delete from revenue_report where date like '2013-08-01%';
Query OK, 1 row affected (0.00 sec)

mysql>

Search Words

revenue report error

Duplicate entry

400e18f6ede9f8be5575a475d2d6b0a6 caea8340e2d186a540518d08602aa065 70a5401e8b9354cd1d64d0346f2c4a3e 624ca542e40215e6f1d39170d8e7ec75

Email subscription for changes to this article
Save as PDF