Go Server startup failure

51 views
Skip to first unread message

Jai Byron

unread,
Feb 24, 2017, 11:42:48 AM2/24/17
to go-cd
Hi,

Have inherited a Go Server setup running on Mac OS X (El Capitan) 10.11.6

Recently I've been unable to get the server to start.

The error log suggests as DB error but am struggling to make sense of it. 

Here's a snippet from the go-server.log after a server restart.

2017-02-24 16:38:34,554 ERROR [main] H2EventListener:38 - Exception thrown from database on sql statement:                   SELECT         pipelines.id as pipelineId, pipelines.name as pipelineName, buildCauseType, label, buildCauseMessage,         pipelines.counter as pipelineCounter, pipelines.label as pipelineLabel, pipelines.naturalOrder as naturalOrder,         pipelines.comment as pipelineComment, stages.name as stageName,stages.counter as stageCounter, stages.id as stageId, stages.approvedBy as approvedBy,         stages.approvalType as approvalType, stages.result as stageResult, stages.latestRun, stages.rerunOfCounter,         builds.id as buildId, builds.name as buildName, builds.state as buildState, builds.result as buildResult,         builds.scheduledDate as scheduledDate, stages.orderId as orderId         FROM pipelines         INNER JOIN stages ON stages.pipelineId = pipelines.id AND                  stages.latestRun = true              INNER JOIN builds ON builds.stageId = stages.id AND builds.ignored != true              INNER JOIN (             SELECT stages.pipelineId AS id             FROM stages             WHERE stages.state = 'Building' AND latestRun = true         UNION             SELECT max(pipelines.id) AS id                 FROM pipelines                 GROUP BY pipelines.name         ) pipelines_to_show ON pipelines.id = pipelines_to_show.id         ORDER BY pipelines.id DESC, stages.orderId ASC     
org.h2.jdbc.JdbcSQLException: General error: "java.lang.ClassCastException: org.h2.index.PageBtreeLeaf cannot be cast to org.h2.index.PageBtreeNode"; SQL statement:
                  SELECT         pipelines.id as pipelineId, pipelines.name as pipelineName, buildCauseType, label, buildCauseMessage,         pipelines.counter as pipelineCounter, pipelines.label as pipelineLabel, pipelines.naturalOrder as naturalOrder,         pipelines.comment as pipelineComment, stages.name as stageName,stages.counter as stageCounter, stages.id as stageId, stages.approvedBy as approvedBy,         stages.approvalType as approvalType, stages.result as stageResult, stages.latestRun, stages.rerunOfCounter,         builds.id as buildId, builds.name as buildName, builds.state as buildState, builds.result as buildResult,         builds.scheduledDate as scheduledDate, stages.orderId as orderId         FROM pipelines         INNER JOIN stages ON stages.pipelineId = pipelines.id AND                  stages.latestRun = true              INNER JOIN builds ON builds.stageId = stages.id AND builds.ignored != true              INNER JOIN (             SELECT stages.pipelineId AS id             FROM stages             WHERE stages.state = 'Building' AND latestRun = true         UNION             SELECT max(pipelines.id) AS id                 FROM pipelines                 GROUP BY pipelines.name         ) pipelines_to_show ON pipelines.id = pipelines_to_show.id         ORDER BY pipelines.id DESC, stages.orderId ASC      [50000-168]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)


Any ideas or suggestions would be most welcomed.

Have also attached the full log.


Regards,

Jai
go-server.log

padma mullagiri

unread,
Feb 28, 2017, 4:30:58 AM2/28/17
to go-cd
Hi Jai,

Looks like the h2db database is corrupted.

Do you have a backup? Can you try replacing the database with the backup database and try to start the server. Ensure to stop the server before replacing the database. 

For more information on the backup and restoring the backup you can check this document here https://docs.gocd.io/current/advanced_usage/one_click_backup.html

Let me know if this helped.

Thanks,
Padma

Jai Byron

unread,
Feb 28, 2017, 6:00:45 AM2/28/17
to go...@googlegroups.com, se...@mosquitodogital.co.uk
Hi Padma,

Unfortunately we don't have a recent one as far as I'm aware.

Do we have any other options?



--
You received this message because you are subscribed to a topic in the Google Groups "go-cd" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/go-cd/PA_P_4PFJ_g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to go-cd+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages