From: | Tim Cross <theophilusx(at)gmail(dot)com> |
---|---|
To: | chris <chrisk(at)pgsqlrocket(dot)com> |
Cc: | Postgres General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: JDBC connectivity issue |
Date: | 2018-03-08 21:26:58 |
Message-ID: | CAC=50j98E+iTreeYC1SYZj33XJHw+SRHUHzr_O4qJQuA9BXgbQ@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
My interpretation of that error is slightly different. I think what it is
saying is that for the first IP address, it thinks the port number is the
full string "5432,10.16.10.13:5432" and fails when it tries to convert that
into a port number. Are you positive the URL format you are trying to use
is supported by the JDBC driver your using?
On 9 March 2018 at 08:12, chris <chrisk(at)pgsqlrocket(dot)com> wrote:
> 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
> <http://10.16.10.12:5432>,10.16.10.13:5432/app_db
> <http://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 <http://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.
>
>
>
>
--
regards,
Tim
--
Tim Cross
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2018-03-08 21:27:58 | Re: JDBC connectivity issue |
Previous Message | Adrian Klaver | 2018-03-08 21:24:59 | Re: JDBC connectivity issue |