vishesh92 commented on PR #11573:
URL: https://github.com/apache/cloudstack/pull/11573#issuecomment-3290604630
@weizhouapache I created two schedules like below on a single VM, I am still
seeing the DB Exception in the logs.
```
2025-09-15 06:00:35,388 ERROR [o.a.c.v.s.d.VMScheduledJobDaoImpl]
(VMSchedulerPollTask:[ctx-1d917c1b]) (logid:44f16569) DB Exception on:
HikariProxyPreparedStatement@135121997 wrapping
com.mysql.cj.jdbc.ServerPreparedStatement[368]: INSERT INTO vm_scheduled_job
(vm_scheduled_job.uuid, vm_scheduled_job.vm_id,
vm_scheduled_job.vm_schedule_id, vm_scheduled_job.async_job_id,
vm_scheduled_job.action, vm_scheduled_job.scheduled_timestamp) VALUES
(x'30333531303530382d616433642d346362342d626632352d633463666538303538653063',
3, 1, NULL, 'START', '2025-09-15 06:02:00')
java.sql.SQLIntegrityConstraintViolationException: Duplicate entry
'1-2025-09-15 06:02:00' for key 'vm_scheduled_job.vm_schedule_id'
at
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:118)
at
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
at
com.mysql.cj.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:555)
at
com.mysql.cj.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:339)
at
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
at
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1009)
at
com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1320)
at
com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:994)
at
com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
at
com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
at
com.cloud.utils.db.GenericDaoBase.persist(GenericDaoBase.java:1625)
at jdk.internal.reflect.GeneratedMethodAccessor12.invoke(Unknown
Source)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:569)
at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
at jdk.proxy3/jdk.proxy3.$Proxy374.persist(Unknown Source)
at
org.apache.cloudstack.vm.schedule.VMSchedulerImpl.scheduleNextJob(VMSchedulerImpl.java:173)
at
org.apache.cloudstack.vm.schedule.VMSchedulerImpl.scheduleNextJobs(VMSchedulerImpl.java:259)
at
org.apache.cloudstack.vm.schedule.VMSchedulerImpl.poll(VMSchedulerImpl.java:227)
at
org.apache.cloudstack.vm.schedule.VMSchedulerImpl$1.runInContext(VMSchedulerImpl.java:205)
at
org.apache.cloudstack.managed.context.ManagedContextTimerTask$1.runInContext(ManagedContextTimerTask.java:30)
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
org.apache.cloudstack.managed.context.ManagedContextTimerTask.run(ManagedContextTimerTask.java:32)
at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
at java.base/java.util.TimerThread.run(Timer.java:516)
```
<img width="949" height="268" alt="image"
src="https://github.com/user-attachments/assets/62cdf737-5f0f-4fda-b836-e96e33ba1e66"
/>
--
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]