JDBC connectivity issue - Mailing list pgsql-general

From chris
Subject JDBC connectivity issue
Date
Msg-id fde5b685-6820-daa6-de4a-b94d16ba39c5@pgsqlrocket.com
Whole thread Raw
Responses Re: JDBC connectivity issue  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: JDBC connectivity issue  (Tim Cross <theophilusx@gmail.com>)
Re: JDBC connectivity issue  (Adrian Klaver <adrian.klaver@aklaver.com>)
Re: JDBC connectivity issue  (JCMS22 <jeanlavoie22@gmail.com>)
List pgsql-general

Hi,

I have a JDBC temping to connect to 2 postgres nodes in a hot standby configuration. Running postgres 9.4 on centos6.

What we are trying to accomplish is in an event of a failover, to first try to connect to the master. If that fails to then reach out to the standby.

I looked online and found the suggested way to do this, but it's not working.

This is the JDBC line we have:

jdbc.url=jdbc:postgresql://10.16.10.12:5432,10.16.10.13:5432/app_db

Here is the error we are getting:

2018-03-07 13:54:36, 994 ERROR:com.zaxxer.hikari.util.PropertyElf - failed to set properly port number on target class org.postgresql.ds.PGSimpleDataSource java.langNumberFormatException:for input string: "5432,10.16.10.13:5432"

It looks like the first IP address has disappeared or is not set right.

Thanks in advance for the help.



pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: What is the meaning of pg_restore output?
Next
From: Adrian Klaver
Date:
Subject: Re: JDBC connectivity issue