Re: JDBC connectivity issue

From: chris <chrisk(at)pgsqlrocket(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: JDBC connectivity issue
Date: 2018-03-13 23:46:20
Message-ID: 1ba83003-3c02-dafe-1056-4e05d791fbc6@pgsqlrocket.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm sorry that took a few days but I am running;

Postgresql-9.4

and

jre7.jar

Thanks in advance.

On 03/08/2018 02:30 PM, chris wrote:
> Given that the syntax looks correct for the url, how would we go about
> debugging that it's not seeing the comma?
>
>
> On 03/08/2018 02:27 PM, Adrian Klaver wrote:
>> On 03/08/2018 01:12 PM, chris 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,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"/
>>
>> Lets try that again:
>>
>> To me it looks like whatever code you are using is trying to use
>> "5432,10.16.10.13:5432" as the port number for 10.16.10.12. In other
>> words it is not seeing the ',' as a separator for the two IP's'.
>>
>> Time to clean the glasses:)
>>
>>>
>>> It looks like the first IP address has disappeared or is not set
>>> right./
>>> /
>>>
>>> Thanks in advance for the help.
>>>
>>>
>>> //
>>>
>>>
>>
>>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2018-03-13 23:47:37 Re: Reindex doesn't eliminate bloat
Previous Message Joe Conway 2018-03-13 23:10:18 Re: Reindex doesn't eliminate bloat