dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] [Dolphinscheduler-master] null value in column "id" of relation "t_ds_listener_event" violates not-null constraint

Open wjcwin opened this issue 1 year ago • 5 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

execute a workflow, instance si running state ,but no instance log ,find this dolphinscheduler-master-server log:

[WI-25][TI-0] - [ERROR] 2024-12-25 13:59:55.713 +0800 o.a.d.s.m.r.WorkflowExecuteRunnable:[697] - Start workflow error
org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).
### The error may exist in org/apache/dolphinscheduler/dao/mapper/ListenerEventMapper.java (best guess)
### The error may involve org.apache.dolphinscheduler.dao.mapper.ListenerEventMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO t_ds_listener_event  ( content, sign, event_type, post_status,  create_time, update_time )  VALUES  ( ?, ?, ?, ?,  ?, ? )
### Cause: org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).
; ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:251)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
	at com.sun.proxy.$Proxy141.insert(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
	at com.sun.proxy.$Proxy183.insert(Unknown Source)
	at org.apache.dolphinscheduler.service.alert.ListenerEventAlertManager.saveNormalEvent(ListenerEventAlertManager.java:257)
	at org.apache.dolphinscheduler.service.alert.ListenerEventAlertManager.saveEvent(ListenerEventAlertManager.java:252)
	at org.apache.dolphinscheduler.service.alert.ListenerEventAlertManager.publishProcessStartListenerEvent(ListenerEventAlertManager.java:134)
	at org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.processStart(WorkflowExecuteRunnable.java:342)
	at org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.startWorkflow(WorkflowExecuteRunnable.java:690)
	at org.apache.dolphinscheduler.server.master.runner.IWorkflowExecuteRunnable.call(IWorkflowExecuteRunnable.java:27)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
	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)

What you expected to happen

stable service

How to reproduce

dolphinscheduler : 3.2.1 kubernetes: v1.28.4-r0-28.0.40 postgresql: PostgreSQL 14.12 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), 64-bit

Anything else

No response

Version

3.2.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

wjcwin avatar Dec 25 '24 06:12 wjcwin

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

execute a workflow, instance si running state ,but no instance log ,find this dolphinscheduler-master-server log:

[WI-25][TI-0] - [ERROR] 2024-12-25 13:59:55.713 +0800 o.a.d.s.m.r.WorkflowExecuteRunnable:[697] - Start workflow error
org.springframework.dao.DataIntegrityViolationException: 
### Error updating database.  Cause: org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).
### The error may exist in org/apache/dolphinscheduler/dao/mapper/ListenerEventMapper.java (best guess)
### The error may involve org.apache.dolphinscheduler.dao.mapper.ListenerEventMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO t_ds_listener_event  ( content, sign, event_type, post_status,  create_time, update_time )  VALUES  ( ?, ?, ?, ?,  ?, ? )
### Cause: org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).
; ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "id" of relation "t_ds_listener_event" violates not-null constraint
  Detail: Failing row contains (null, {"projectCode":16075595133568,"projectName":"数据仓库","owne..., 9f65adacfa5f6dd8e66efc27e5b51bf3a496f025a214097d8a10838e3c30b37c, 0, 4, null, 2024-12-25 13:59:55.711, 2024-12-25 13:59:55.711).
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:251)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:70)
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:91)
	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)
	at com.sun.proxy.$Proxy141.insert(Unknown Source)
	at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)
	at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:59)
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)
	at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)
	at com.sun.proxy.$Proxy183.insert(Unknown Source)
	at org.apache.dolphinscheduler.service.alert.ListenerEventAlertManager.saveNormalEvent(ListenerEventAlertManager.java:257)
	at org.apache.dolphinscheduler.service.alert.ListenerEventAlertManager.saveEvent(ListenerEventAlertManager.java:252)
	at org.apache.dolphinscheduler.service.alert.ListenerEventAlertManager.publishProcessStartListenerEvent(ListenerEventAlertManager.java:134)
	at org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.processStart(WorkflowExecuteRunnable.java:342)
	at org.apache.dolphinscheduler.server.master.runner.WorkflowExecuteRunnable.startWorkflow(WorkflowExecuteRunnable.java:690)
	at org.apache.dolphinscheduler.server.master.runner.IWorkflowExecuteRunnable.call(IWorkflowExecuteRunnable.java:27)
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1604)
	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)

What you expected to happen

stable service

How to reproduce

dolphinscheduler : 3.2.1 kubernetes: v1.28.4-r0-28.0.40 postgresql: PostgreSQL 14.12 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 11.4.1 20231218 (Red Hat 11.4.1-3), 64-bit

Anything else

No response

Version

3.2.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

github-actions[bot] avatar Dec 25 '24 06:12 github-actions[bot]

Fixed in dev.

SbloodyS avatar Dec 25 '24 06:12 SbloodyS

which commit

wjcwin avatar Dec 25 '24 06:12 wjcwin

Fixed in dev. 3.2.2 same issue when after set alarm

HelloJack0 avatar Jul 03 '25 00:07 HelloJack0

I'm seeing this issue in a new installation of 3.2.2 in October of 2025.

I did attempt to use the alarm capability. Is that corrupting the database? Will re-creating the database fix this issue?

Is this being being worked on?

tbullers avatar Oct 23 '25 18:10 tbullers