<div>Hi,</div><div><br></div><div>I found out the problem. This patch should fix the problem.</div><div><br></div><div><a href="http://dev.opennebula.org/projects/opennebula/repository/revisions/6176e07bac684135cbfe1cd46f9213cc8b41a371/diff/src/acct/watch_helper.rb">http://dev.opennebula.org/projects/opennebula/repository/revisions/6176e07bac684135cbfe1cd46f9213cc8b41a371/diff/src/acct/watch_helper.rb</a></div>

<div><br></div><div>This patch is already included in 3.2-beta1 packages.</div><div><br></div><div>Kind regards</div><br><div class="gmail_quote">On 21 December 2011 11:02, Humberto N. Castejon Martinez <span dir="ltr"><<a href="mailto:humcasma@gmail.com">humcasma@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,<br></div><div><br></div><div>I am running Openenebula 3.0 and have enabled the Accounting and Statistics module, using MySql (and have applied the patch indicated in the documentation). I can see the graphs with monitoring information in Sunstone, but from time to time oneacctd crashes. This is the content of the /var/log/one/onecacctd.log:</div>


<div><br></div><div>Tue Dec 20 17:14:57 +0100 2011 OneWatch::VmMonitoring<br>Tue Dec 20 17:19:57 +0100 2011 OneWatch::VmMonitoring<br>Tue Dec 20 17:24:57 +0100 2011 OneWatch::VmMonitoring<br>Tue Dec 20 17:24:57 +0100 2011 OneWatch::HostMonitoring<br>


/usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/adapters/mysql.rb:167:in `query': Mysql::Error: Duplicate entry '1-0' for key 'PRIMARY' (Sequel::DatabaseError)<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/adapters/mysql.rb:167:in `_execute'<br>


 from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/database/logging.rb:28:in `log_yield'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/adapters/mysql.rb:167:in `_execute'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/adapters/shared/mysql_prepared_statements.rb:23:in `execute'<br>


 from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/connection_pool/threaded.rb:71:in `hold'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/database/connecting.rb:225:in `synchronize'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/adapters/shared/mysql_prepared_statements.rb:23:in `execute'<br>


 from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/database/query.rb:74:in `execute_dui'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/dataset/actions.rb:657:in `execute_dui'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/adapters/mysql.rb:346:in `execute_dui'<br>


 from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/adapters/mysql.rb:334:in `update'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/model/associations.rb:1279:in `_remove_all_samples'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/model/associations.rb:1465:in `send'<br>


 from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/model/associations.rb:1465:in `remove_all_associated_objects'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/model/associations.rb:1294:in `remove_all_samples'<br>


 from /usr/lib/one/ruby/acct/watch_helper.rb:279:in `fix_size'<br> from /usr/lib/one/ruby/acct/watch_helper.rb:449:in `flush'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/database/query.rb:259:in `_transaction'<br>


 from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/database/query.rb:228:in `transaction'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/connection_pool/threaded.rb:84:in `hold'<br> from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/database/connecting.rb:225:in `synchronize'<br>


 from /usr/lib/ruby/gems/1.8/gems/sequel-3.29.0/lib/sequel/database/query.rb:226:in `transaction'<br> from /usr/lib/one/ruby/acct/watch_helper.rb:446:in `flush'<br> from /usr/lib/one/ruby/acct/monitoring.rb:31:in `insert'<br>


 from /usr/lib/one/ruby/acct/acctd.rb:77:in `update'<br> from /usr/lib/one/ruby/acct/acctd.rb:59:in `each'<br> from /usr/lib/one/ruby/acct/acctd.rb:59:in `update'<br> from /usr/lib/one/ruby/acct/acctd.rb:57:in `each'<br>


 from /usr/lib/one/ruby/acct/acctd.rb:57:in `update'<br> from /usr/lib/one/ruby/acct/acctd.rb:129<br> from /usr/lib/one/ruby/acct/acctd.rb:124:in `loop'<br> from /usr/lib/one/ruby/acct/acctd.rb:124</div><div><br>

</div>
<div>I guess there must be some bug hidden somewhere, or I did something wrong during the installation. </div><div><br></div><div>Cheers,</div><div>Humberto</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opennebula.org">Users@lists.opennebula.org</a><br>
<a href="http://lists.opennebula.org/listinfo.cgi/users-opennebula.org" target="_blank">http://lists.opennebula.org/listinfo.cgi/users-opennebula.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Daniel Molina<br>Project Engineer<br>OpenNebula - The Open Source Toolkit for Data Center Virtualization<br><a href="http://www.OpenNebula.org" target="_blank">www.OpenNebula.org</a> | <a href="mailto:dmolina@opennebula.org" target="_blank">dmolina@opennebula.org</a> | @OpenNebula<br>