Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewDJY-0000KX-2y for pgsql-general@arkaria.postgresql.org; Wed, 14 Mar 2018 20:48:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ewDJW-0004Dx-Vu for pgsql-general@arkaria.postgresql.org; Wed, 14 Mar 2018 20:47:58 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewDJW-0004Dn-Ga for pgsql-general@lists.postgresql.org; Wed, 14 Mar 2018 20:47:58 +0000 Received: from mail-oi0-x241.google.com ([2607:f8b0:4003:c06::241]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ewDJS-0006Z5-V2 for pgsql-general@postgresql.org; Wed, 14 Mar 2018 20:47:57 +0000 Received: by mail-oi0-x241.google.com with SMTP id j79so3860076oib.12 for ; Wed, 14 Mar 2018 13:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgsqlrocket-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=0OiDVfm/Gq1xlTcPm0jUs84HUpFj3gypNNRivFJsXb0=; b=eZCoHIO8sAf8WrU2NHlYzcubBTAjVa3xe/MCJrAycPGZSRvhJpPG50ZxvaN/uZvSo/ Zwtvm2TUm9FTNbbTMWtroLHDFlWNzzi2skFW6sgIXOPelbcE5AMcAInbAfPituNw5cpu sBBmRLtZBfbfmuA4GqfTWk6ArJBPTGjNqO5jASJtkAKMyINpt0IlG9lV4gfmIvgU/9p2 iQPgIbvs71JbEaC6AUyv+V0PWTgGxNVeqzmDTtt9FBdHhZSEPKyD0mI5UrCW9bdV7YjQ v2uh2u4ba9zkb5DGj9psPwJ6qhQXL7K91iXnuu9hG5X7nsaGaALAnqKPrBU/Lby1e+xy GdKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=0OiDVfm/Gq1xlTcPm0jUs84HUpFj3gypNNRivFJsXb0=; b=nmx+E4fJj64AZGkPCP27TRTeefPTaIxA1joxIEnjSctBGZuZONA9He/p5pNaQVpQWH NRx2RoEH1A2XlccxM9P4n32XzJJuduPCX+S3Xw65/tR7PtyOOeBsbyMPBZeuxBS1A17t x3kMCck3Qk4p1979eyE+FCZDtPaVgagYx+y2X4CKzWKjp8o9rv5R5x4Ht+9o5oowdJyL 3OEAhwyznP1EMq3WWJJXCj4oWv58ztJS9n8nWV2G6h4GgB1IQDVab8/9fbxX8UtGuFCm cgyjaezSYdO9MaiwIaykq1pCbY+4+zVf+Oz4v8CjkGdkOV3iG9HDdW71X1iLphEccC7D Sfsw== X-Gm-Message-State: AElRT7FvUrgdyfKICPNS9YIMqKLWxWQ9tmT4Wh6zmoBkgasxG8D0lneY VXBPhP/ZpkLiv8TOowUUUPP8eQ1nz7g= X-Google-Smtp-Source: AG47ELvZ/y6kvI/ALIQDD0sGM3uVchPqFBKQ+JOTOtqQb4aH+7K7XY50bGtmVLnVbQ1UKQld25v0ow== X-Received: by 10.202.10.214 with SMTP id k83mr2232556oiy.147.1521060472748; Wed, 14 Mar 2018 13:47:52 -0700 (PDT) Received: from localhost.localdomain ([65.132.155.214]) by smtp.gmail.com with ESMTPSA id l133sm1855038oia.2.2018.03.14.13.47.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Mar 2018 13:47:52 -0700 (PDT) Subject: Re: JDBC connectivity issue To: Adrian Klaver , Postgres General References: <0e087d67-6403-d0c8-c61e-68c674f992f1@pgsqlrocket.com> <1ba83003-3c02-dafe-1056-4e05d791fbc6@pgsqlrocket.com> <0b51cb72-bb1d-dfab-3a35-24c1f0f80b7e@aklaver.com> <09e943bd-47a5-1413-73a0-78cae26a0636@pgsqlrocket.com> From: chris Message-ID: <4d52b5cc-7381-5f86-58ce-8512d14b7e6a@pgsqlrocket.com> Date: Wed, 14 Mar 2018 14:47:50 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Oh sorry for getting the wrong information. How would I get the information on what driver is currently installed? On 03/14/2018 09:44 AM, Adrian Klaver wrote: > On 03/14/2018 07:51 AM, chris wrote: >> >> I believe its Postgresql-9.4.1208.jre7.jar > > Pretty sure solving this is going to require knowing exactly what > driver is in use. The failover syntax looks to be fairly recent, so > being off by a little on the driver version can make a big difference. > > Or you could do as this post suggests: > > https://www.postgresql.org/message-id/CADK3HHJgdio_TZ-fpk4rguWaA-wWZFNZrjBft_T4jLBK_E_c8w%40mail.gmail.com > > > That is install driver version 42.2.1. > >> On 03/13/2018 05:48 PM, Adrian Klaver wrote: >>> On 03/13/2018 04:46 PM, chris wrote: >>>> I'm sorry that took a few days but I am running; >>>> >>>> >>>> Postgresql-9.4 >>>> >>>> and >>>> >>>> jre7.jar >>> >>> What we are looking for is the JDBC driver you are using? >>> >>>> >>>> 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. >>>>>>> >>>>>>> >>>>>>> // >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>> >>> >> >> > >