Hossein4185 opened a new issue, #7822:
URL: https://github.com/apache/cloudstack/issues/7822

   
   
   ##### ISSUE TYPE
   question
   ##### COMPONENT NAME
   cloudstack-usage
   ##### CLOUDSTACK VERSION
   4.14.1
   
   
   
   ##### OS / ENVIRONMENT
   CentOs 7
   
   
   ##### SUMMARY
   I have an error on the cloudstack-usage 
   
   2023-08-06 09:12:45,581 DEBUG [db.Transaction.Transaction] 
(Usage-Job-1:null) (logid:) Rolling back the transaction: Time = 16315 Name =  
-UsageManagerImpl.parse:621-UsageManagerImpl.runInContextInternal:395-UsageManagerImpl$1.runInContext:337-ManagedContextRunnable$1.run:49-DefaultManagedContext$1.call:56-DefaultManagedContext.callWithContext:103-DefaultManagedContext.runWithContext:53-ManagedContextRunnable.run:46-UsageManagerImpl.run:339-Executors$RunnableAdapter.call:515-FutureTask.run:264-ScheduledThreadPoolExecutor$ScheduledFutureTask.run:304;
 called by 
-TransactionLegacy.rollback:888-TransactionLegacy.removeUpTo:831-TransactionLegacy.close:655-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:130-UsageManagerImpl.createIPHelperEvent:1412-UsageManagerImpl.createHelperRecord:977-UsageManagerImpl.parse:639-UsageManagerImpl.runInContextInternal:395-UsageManagerImpl$1.runInContext:337-ManagedContextRunnable$1.run:
 49-DefaultManagedContext$1.call:56
   2023-08-06 09:12:45,623 ERROR [cloud.usage.UsageManagerImpl] 
(Usage-Job-1:null) (logid:) Exception in usage manager
   javax.persistence.EntityExistsException: Entity already exists: 
           at 
com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1454)
           at 
com.cloud.usage.dao.UsageIPAddressDaoImpl_EnhancerByCloudStack_8bb728dc.CGLIB$persist$18(<generated>)
           at 
com.cloud.usage.dao.UsageIPAddressDaoImpl_EnhancerByCloudStack_8bb728dc_FastClassByCloudStack_3d1a438d.invoke(<generated>)
           at net.sf.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
           at 
com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:122)
           at 
com.cloud.usage.dao.UsageIPAddressDaoImpl_EnhancerByCloudStack_8bb728dc.persist(<generated>)
           at 
com.cloud.usage.UsageManagerImpl.createIPHelperEvent(UsageManagerImpl.java:1412)
           at 
com.cloud.usage.UsageManagerImpl.createHelperRecord(UsageManagerImpl.java:977)
           at com.cloud.usage.UsageManagerImpl.parse(UsageManagerImpl.java:639)
           at 
com.cloud.usage.UsageManagerImpl.runInContextInternal(UsageManagerImpl.java:395)
           at 
com.cloud.usage.UsageManagerImpl$1.runInContext(UsageManagerImpl.java:337)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
           at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
           at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
           at com.cloud.usage.UsageManagerImpl.run(UsageManagerImpl.java:339)
           at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
           at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
           at 
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at java.base/java.lang.Thread.run(Thread.java:834)
   Caused by: java.sql.SQLIntegrityConstraintViolationException: Duplicate 
entry '1477-2023-07-30 10:05:17' for key 'id'
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:117)
           at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
           at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
           at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
           at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1092)
           at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1040)
           at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1347)
           at 
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1025)
           at 
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
           at 
org.apache.commons.dbcp2.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:136)
           at 
com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1415)
           ... 22 more
   2023-08-06 09:12:45,708 WARN  [db.Transaction.Transaction] 
(Usage-Job-1:null) (logid:) txn: Commit called when it is not a transaction: 
-UsageManagerImpl.parse:848-UsageManagerImpl.runInContextInternal:395-UsageManagerImpl$1.runInContext:337-ManagedContextRunnable$1.run:49-DefaultManagedContext$1.call:56-DefaultManagedContext.callWithContext:103-DefaultManagedContext.runWithContext:53-ManagedContextRunnable.run:46-UsageManagerImpl.run:339-Executors$RunnableAdapter.call:515-FutureTask.run:264-ScheduledThreadPoolExecutor$ScheduledFutureTask.run:304
   
   
   
   Which table has a Duplicate entry problem?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to