#1563  OneDev does not start if PostgreSQL JDBC connection string has two hosts (failover) but the first one is down
Released
jbauer opened 8 months ago

I am using PostgreSQL and their JDBC driver allows to specify multiple servers so the JDBC driver can automatically failover to the primary server in a primary + multiple secondaries DB cluster.

JDBC string with two servers (could be even more):

jdbc:postgresql://services-pg14-1:5432,services-pg14-2:5432/onedev?ApplicationName=OneDev&tcpKeepAlive=true&targetServerType=master&sslmode=require

OneDev now uses the DB host to detect the cluster IP, see https://code.onedev.io/onedev/server/~files/c0546d4c877acc58b5a857411cac605c90112fa9/server-core/src/main/java/io/onedev/server/ServerConfig.java?position=source-107.1-113.6-1

OneDev should continue to try additional hosts:port if the first one fails and multiple DB hosts have been configured.

Currently, OneDev fails to start if the first DB host is down for maintenance.

Robin Shen commented 8 months ago

Will be solved in next patch release. Thx!

OneDev changed state to 'Closed' 8 months ago
Previous Value Current Value
Open
Closed
OneDev commented 8 months ago

State changed as code fixing the issue is committed (c76fe983)

Referenced from commit 8 months ago
OneDev changed state to 'Released' 8 months ago
Previous Value Current Value
Closed
Released
OneDev commented 8 months ago

State changed as build #4097 is successful

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Affected Versions
9.1.5
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
onedev/server#1563
Please wait...
Page is in error, reload to recover