apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.87k stars 4.63k forks source link

[Bug][Alert] ERROR: relation "t_ds_plugin_define" does not exist #5386

Closed chengshiwen closed 3 years ago

chengshiwen commented 3 years ago

To Reproduce Steps to reproduce the behavior, for example:

  1. Run docker-compose up -d
  2. Run docker logs -f dolphinscheduler-alert
  3. See error

Expected behavior Bug fixed

Screenshots Alert logs:

[INFO] 2021-04-26 00:27:39.678 org.apache.dolphinscheduler.alert.plugin.AlertPluginManager:[104] - Registering Alert Plugin 'DingTalk'
[INFO] 2021-04-26 00:27:39.681 org.apache.dolphinscheduler.alert.plugin.AlertPluginManager:[86] - -- Loaded Alert Plugin DingTalk --
[INFO] 2021-04-26 00:27:41.901 com.alibaba.druid.pool.DruidDataSource:[994] - {dataSource-1} inited
Exception in thread "main" java.lang.RuntimeException: load Alert Plugin Failed !
    at org.apache.dolphinscheduler.alert.AlertServer.initPlugin(AlertServer.java:104)
    at org.apache.dolphinscheduler.alert.AlertServer.start(AlertServer.java:145)
    at org.apache.dolphinscheduler.alert.AlertServer.main(AlertServer.java:161)
Caused by: org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation "t_ds_plugin_define" does not exist
  Position: 23
### The error may exist in org/apache/dolphinscheduler/dao/mapper/PluginDefineMapper.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: select *         from t_ds_plugin_define         where plugin_name = ? and plugin_type = ?
### Cause: org.postgresql.util.PSQLException: ERROR: relation "t_ds_plugin_define" does not exist
  Position: 23
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "t_ds_plugin_define" does not exist
  Position: 23
    at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:74)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:440)
    at com.sun.proxy.$Proxy11.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:223)
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.executeForMany(MybatisMapperMethod.java:158)
    at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:76)
    at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:61)
    at com.sun.proxy.$Proxy15.queryByNameAndType(Unknown Source)
    at org.apache.dolphinscheduler.dao.PluginDao.addOrUpdatePluginDefine(PluginDao.java:67)
    at org.apache.dolphinscheduler.alert.plugin.AlertPluginManager.installPlugin(AlertPluginManager.java:111)
    at org.apache.dolphinscheduler.common.plugin.DolphinPluginLoader.loadPlugin(DolphinPluginLoader.java:111)
    at org.apache.dolphinscheduler.common.plugin.DolphinPluginLoader.loadPlugin(DolphinPluginLoader.java:99)
    at org.apache.dolphinscheduler.common.plugin.DolphinPluginLoader.loadPlugins(DolphinPluginLoader.java:85)
    at org.apache.dolphinscheduler.alert.AlertServer.initPlugin(AlertServer.java:102)
    ... 2 more
Caused by: org.postgresql.util.PSQLException: ERROR: relation "t_ds_plugin_define" does not exist
  Position: 23
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2183)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:308)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365)
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:143)
    at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:132)
    at com.alibaba.druid.pool.DruidPooledPreparedStatement.execute(DruidPooledPreparedStatement.java:497)
    at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:64)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    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.$Proxy23.query(Unknown Source)
    at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doQuery(MybatisSimpleExecutor.java:67)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:324)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    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)
    ... 14 more
End start alert-server.
2021-04-26 00:27:43,637 INFO exited: alert (exit status 0; expected)

Which version of Dolphin Scheduler: -[dev]

Additional context Add any other context about the problem here.

Requirement or improvement

github-actions[bot] commented 3 years ago

Hi:

laodao commented 2 years ago

这么久了,这个bug依然存在。已测试docker-compose安装部署的3.0.0,3.1.0都有这个问题。

thredreams commented 1 year ago

3.0.2 同样

pitaWu commented 1 year ago

3.1.3版本集群重启master节点也出现ERROR: relation "t_ds_worker_group" does not exist,这个问题

we1she2 commented 1 year ago

3.1.7 pg 初始化仍然存在

biaoma-ty commented 1 year ago

+1

maxkubik commented 4 months ago

+1 :: DolphinScheduler alert server :: (v3.2.1)

    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048)
    at io.kubernetes.client.informer.cache.DeltaFIFO.pop(DeltaFIFO.java:318)
    at io.kubernetes.client.informer.cache.Controller.processLoop(Controller.java:162)
    at io.kubernetes.client.informer.cache.Controller.run(Controller.java:130)
    at java.lang.Thread.run(Thread.java:750)
[ERROR] 2024-07-10 07:52:41.689 +0800 io.kubernetes.client.informer.cache.ProcessorListener:[96] - processor interrupted: {}
java.lang.InterruptedException: null
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2014)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2048)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
    at io.kubernetes.client.informer.cache.ProcessorListener.run(ProcessorListener.java:58)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
[INFO] 2024-07-10 07:52:41.714 +0800 org.apache.dolphinscheduler.alert.AlertServer:[95] - Alert server is stopping, cause: alert server destroy

:: DolphinScheduler master server :: (v3.2.1)

[WI-0][TI-0] - [WARN] 2024-07-10 07:54:41.246 +0800 o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext:[591] - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'masterServer': Unsatisfied dependency expressed through field 'masterSchedulerBootstrap'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'masterSchedulerBootstrap': Unsatisfied dependency expressed through field 'workflowExecuteRunnableFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'workflowExecuteRunnableFactory': Unsatisfied dependency expressed through field 'workflowExecuteContextFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'workflowExecuteContextFactory': Unsatisfied dependency expressed through field 'masterSlotManager'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'masterSlotManager': Unsatisfied dependency expressed through field 'serverNodeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'serverNodeManager' defined in URL [jar:file:/opt/dolphinscheduler/libs/dolphinscheduler-master-3.2.1.jar!/org/apache/dolphinscheduler/server/master/registry/ServerNodeManager.class]: Invocation of init method failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation "t_ds_worker_group" does not exist
  Position: 23
### The error may exist in class path resource [org/apache/dolphinscheduler/dao/mapper/WorkerGroupMapper.xml]
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: select *         from t_ds_worker_group         order by update_time desc
### Cause: org.postgresql.util.PSQLException: ERROR: relation "t_ds_worker_group" does not exist
  Position: 23
; bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: relation "t_ds_worker_group" does not exist
  Position: 23
[WI-0][TI-0] - [INFO] 2024-07-10 07:54:41.254 +0800 o.a.d.s.m.r.MasterRegistryClient:[188] - Master node : dolphinscheduler-master-0.dolphinscheduler-master-headless:5678 unRegistry to register center.
[WI-0][TI-0] - [INFO] 2024-07-10 07:54:41.256 +0800 o.a.c.f.i.CuratorFrameworkImpl:[998] - backgroundOperationsLoop exiting
[WI-0][TI-0] - [INFO] 2024-07-10 07:54:41.370 +0800 o.a.z.ClientCnxn:[568] - EventThread shut down for session: 0x100000479980042

dolphinscheduler-postresql

2024-07-09 23:46:55.583 GMT [1] LOG:  database system is ready to accept connections
2024-07-09 23:49:09.007 GMT [323] ERROR:  relation "t_ds_worker_group" does not exist at character 23
2024-07-09 23:49:09.007 GMT [323] STATEMENT:  select *
            from t_ds_worker_group
            order by update_time desc