master节点一直重复报错
错误如下
[ERROR] 2024-09-09 14:37:45.736 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService:[178] - master scheduler thread error
org.springframework.dao.DuplicateKeyException:
### Error updating database. Cause: java.sql.SQLIntegrityConstraintViolationException: #23000
### The error may exist in org/apache/dolphinscheduler/dao/mapper/ErrorCommandMapper.java (best guess)
### The error may involve org.apache.dolphinscheduler.dao.mapper.ErrorCommandMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO t_ds_error_command ( id, schedule_time, warning_type, command_type, dry_run, environment_code, executor_id, update_time, warning_group_id, task_depend_type, message, process_definition_code, failure_strategy, start_time, process_instance_priority ) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
### Cause: java.sql.SQLIntegrityConstraintViolationException: #23000
; #23000; nested exception is java.sql.SQLIntegrityConstraintViolationException: #23000
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:247)
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
at com.sun.proxy.$Proxy83.insert(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:271)
at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:58)
at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)
at com.sun.proxy.$Proxy96.insert(Unknown Source)
at org.apache.dolphinscheduler.service.process.ProcessService.moveToErrorCommand(ProcessService.java:239)
at org.apache.dolphinscheduler.service.process.ProcessService$$FastClassBySpringCGLIB$$ed138739.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:689)
at org.apache.dolphinscheduler.service.process.ProcessService$$EnhancerBySpringCGLIB$$1d9f1812.moveToErrorCommand(<generated>)
at org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService.scheduleProcess(MasterSchedulerService.java:222)
at org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService.run(MasterSchedulerService.java:176)
Caused by: java.sql.SQLIntegrityConstraintViolationException: #23000
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.execute(ClientPreparedStatement.java:370)
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44)
at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.execute(HikariProxyPreparedStatement.java)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.update(PreparedStatementHandler.java:47)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.update(RoutingStatementHandler.java:74)
at sun.reflect.GeneratedMethodAccessor99.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:63)
at com.sun.proxy.$Proxy112.update(Unknown Source)
at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:54)
at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:197)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:184)
at sun.reflect.GeneratedMethodAccessor97.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426)
... 12 common frames omitted
[INFO] 2024-09-09 14:37:45.737 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService:[251] - find command 61706, slot:0 :
[INFO] 2024-09-09 14:37:45.737 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService:[192] - find one command: id: 61706, type: SCHEDULER
[ERROR] 2024-09-09 14:37:45.737 org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils:[350] - String index out of range: 9
java.lang.StringIndexOutOfBoundsException: String index out of range: 9
at java.lang.String.charAt(String.java:658)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.calcMinutes(TimePlaceholderUtils.java:524)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.calcTimeExpression(TimePlaceholderUtils.java:378)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.calculateTime(TimePlaceholderUtils.java:346)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.getPlaceHolderTime(TimePlaceholderUtils.java:321)
at org.apache.dolphinscheduler.common.utils.ParameterUtils.dateTemplateParse(ParameterUtils.java:178)
at org.apache.dolphinscheduler.common.utils.ParameterUtils.convertParameterPlaceholders(ParameterUtils.java:75)
at org.apache.dolphinscheduler.common.utils.ParameterUtils.curingGlobalParams(ParameterUtils.java:117)
at org.apache.dolphinscheduler.service.process.ProcessService.generateNewProcessInstance(ProcessService.java:606)
at org.apache.dolphinscheduler.service.process.ProcessService.constructProcessInstance(ProcessService.java:735)
at org.apache.dolphinscheduler.service.process.ProcessService.handleCommand(ProcessService.java:216)
at org.apache.dolphinscheduler.service.process.ProcessService$$FastClassBySpringCGLIB$$ed138739.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
at org.apache.dolphinscheduler.service.process.ProcessService$$EnhancerBySpringCGLIB$$1d9f1812.handleCommand(<generated>)
at org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService.scheduleProcess(MasterSchedulerService.java:194)
at org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService.run(MasterSchedulerService.java:176)
[ERROR] 2024-09-09 14:37:45.738 org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService:[221] - scan command error
java.lang.StringIndexOutOfBoundsException: String index out of range: 9
at java.lang.String.charAt(String.java:658)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.calcMinutes(TimePlaceholderUtils.java:524)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.calcTimeExpression(TimePlaceholderUtils.java:378)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.calculateTime(TimePlaceholderUtils.java:346)
at org.apache.dolphinscheduler.common.utils.placeholder.TimePlaceholderUtils.getPlaceHolderTime(TimePlaceholderUtils.java:321)
at org.apache.dolphinscheduler.common.utils.ParameterUtils.dateTemplateParse(ParameterUtils.java:178)
at org.apache.dolphinscheduler.common.utils.ParameterUtils.convertParameterPlaceholders(ParameterUtils.java:75)
at org.apache.dolphinscheduler.common.utils.ParameterUtils.curingGlobalParams(ParameterUtils.java:117)
at org.apache.dolphinscheduler.service.process.ProcessService.generateNewProcessInstance(ProcessService.java:606)
at org.apache.dolphinscheduler.service.process.ProcessService.constructProcessInstance(ProcessService.java:735)
at org.apache.dolphinscheduler.service.process.ProcessService.handleCommand(ProcessService.java:216)
at org.apache.dolphinscheduler.service.process.ProcessService$$FastClassBySpringCGLIB$$ed138739.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:783)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:753)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:698)
at org.apache.dolphinscheduler.service.process.ProcessService$$EnhancerBySpringCGLIB$$1d9f1812.handleCommand(<generated>)
at org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService.scheduleProcess(MasterSchedulerService.java:194)
at org.apache.dolphinscheduler.server.master.runner.MasterSchedulerService.run(MasterSchedulerService.java:176)
没有找到具体是那个字段异常
目前的解决方法是把t_ds_error_command 数据备份,清空,就可以了