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 1eu352-00076L-Vj for pgsql-general@arkaria.postgresql.org; Thu, 08 Mar 2018 21:28:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eu351-0006Zi-O2 for pgsql-general@arkaria.postgresql.org; Thu, 08 Mar 2018 21:28:03 +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 1eu351-0006ZY-Fw for pgsql-general@lists.postgresql.org; Thu, 08 Mar 2018 21:28:03 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eu34z-000177-2k for pgsql-general@postgresql.org; Thu, 08 Mar 2018 21:28:03 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 9A66A20800; Thu, 8 Mar 2018 16:27:59 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Thu, 08 Mar 2018 16:27:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=zcpxYdIAexV2ZnO7tW2i59SSeK6t/ YNIXoM8e/Us2Ig=; b=Y5/kNKIoR02SP6OVtu1OXKtdzB7Nl34gpQSYHG65CD89j ogEi6uoi9wZylhnv3Hi6NfI50ct2FdECw8+5bjJn3GY01Iokyd0z/YHCWs/1sreb azophS6ow6kmYG31fKcSdcrM71+rU/E2JcSD0tsc/njmSWz/HVtqx1XVwthn8u1V sYVrCgUQwfh9Kl7nefGuGM5WGHDO+rRldPUNddn1zX/evp1+uVY22lZG8Qg+6ibv IeSGZzP08RMtEZEUyhtA3EIRMxkNFPg6gQDUr9mS4R/EJg27Wp5lo5e10DG9UHRT GxCQjJDkKt+Ncpr3fGe5R7XRYshqKcoNeqI8z76uw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=zcpxYd IAexV2ZnO7tW2i59SSeK6t/YNIXoM8e/Us2Ig=; b=mgvJVip/DLzPSIxK0ICNZx jYx2ybsMInRFZdq1hWUBP8AEBXNyRIDeXoslVbSDqeoNHKzY250tfWTK1gpHr6Fy KuRvjI8qYis3XdCrTGKAPpZShYB6Iy8LvG4CfS5VYjqOVLhjDX+Dp/yIip+ByZ+y Qub5wqm2sSTjAdXhvwHhZiDTAJSVuEPED6FDHU8nLnhQJUTjXmUPPDLHEne9e+Dv 4Apsjfxdq2IY+HUADDezRQqAVU7XPRSg+0Els7f8VOPvZJqw7ZPlzUoCly2P8OnF cpIZgqTZN+0Q42mLvj1mYTjxsOCbMTQ0ZpWEc/6nD9/BuN84HL7tcvDs+iCRU97g == X-ME-Sender: Received: from [192.168.1.2] (71-35-123-124.tukw.qwest.net [71.35.123.124]) by mail.messagingengine.com (Postfix) with ESMTPA id 17EFC7E4BB; Thu, 8 Mar 2018 16:27:58 -0500 (EST) Subject: Re: JDBC connectivity issue To: chris , Postgres General References: From: Adrian Klaver Message-ID: Date: Thu, 8 Mar 2018 13:27:58 -0800 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-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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. > > > // > > -- Adrian Klaver adrian.klaver@aklaver.com