pipeline instance corrupted. Wont cancel

113 views
Skip to first unread message

Sifu Tian

unread,
May 9, 2022, 11:11:15 PM5/9/22
to go-cd
Hi Folks,

While one of our pipelines were triggered, it failed to connect to an agent.  GoCD reporting the error as the pipeline being hung.  While attempting to stop the job, and error came up.

### Error updating database. Cause: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "STATECHANGETIME"; SQL statement: INSERT INTO buildStateTransitions (currentState, stateChangeTime, buildId, stageId) VALUES (?, ?, ?, ?) [23502-200] ### The error may exist in com/thoughtworks/go/server/dao/maps/BuildStateTransition.xml ### The error may involve BuildStateTransition.insert-transition-param ### The error occurred while setting parameters ### SQL: INSERT INTO buildStateTransitions (currentState, stateChangeTime, buildId, stageId) VALUES (?, ?, ?, ?) ### Cause: org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "STATECHANGETIME"; SQL statement: INSERT INTO buildStateTransitions (currentState, stateChangeTime, buildId, stageId) VALUES (?, ?, ?, ?) [23502-200] ; SQL []; NULL not allowed for column "STATECHANGETIME"; SQL statement: INSERT INTO buildStateTransitions (currentState, stateChangeTime, buildId, stageId) VALUES (?, ?, ?, ?) [23502-200]; nested exception is org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: NULL not allowed for column "STATECHANGETIME"; SQL statement: INSERT INTO buildStateTransitions (currentState, stateChangeTime, buildId, stageId) VALUES (?, ?, ?, ?) [23502-200]

It will not let me cancel this instance being run and it just hangs. 
Has anyone seen this error before or know how to solve?

Any help would be greatly appreciated.

Thanks!Screen Shot 2022-05-09 at 11.10.37 PM.png

Sriram Narayanan

unread,
May 10, 2022, 1:00:49 AM5/10/22
to go...@googlegroups.com
Hi, which version of GoCD server and agent are you using?

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/22ae8275-39c3-4151-b6a1-4a6274b0e534n%40googlegroups.com.

Sifu Tian

unread,
May 10, 2022, 1:47:52 AM5/10/22
to go-cd
Go Server and agent 22.1.0

Chad Wilson

unread,
May 11, 2022, 11:03:21 AM5/11/22
to go...@googlegroups.com
Broadly speaking this looks like a bug or race condition, although I have never come across such an error before and can't see how it could happen from the code. Unless we can find a way to replicate it, it might be difficult to fix.

In terms of working around it - does it fix itself after a server restart?

-Chad

Sifu Tian

unread,
Jun 4, 2022, 12:49:22 AM6/4/22
to go-cd
Sorry for the late reply Chad.  No it didnt fix itself after a server restart.  I ended up restoring from a snapshot a few days earlier before the issue happened.  Not the best option but it worked.
Reply all
Reply to author
Forward
0 new messages