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 1evtfF-0007R5-Vd for pgsql-general@arkaria.postgresql.org; Tue, 13 Mar 2018 23:49:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1evtfF-0001gl-0m for pgsql-general@arkaria.postgresql.org; Tue, 13 Mar 2018 23:49:05 +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 1evtfE-0001gb-JD for pgsql-general@lists.postgresql.org; Tue, 13 Mar 2018 23:49:04 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1evtfB-0001gL-F4 for pgsql-general@postgresql.org; Tue, 13 Mar 2018 23:49:04 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 01E2121196; Tue, 13 Mar 2018 19:49:00 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute6.internal (MEProxy); Tue, 13 Mar 2018 19:49:00 -0400 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=bFw6ibrfj8UIx+AyI9m9P8cgtbw5f oJc3eCiS/Tec94=; b=Aq3FvmfvIk2r5qZ0SIK1z3RAp9GUWTYgPSmdHqaEa2euO ay21BTdud/xoCqZ/fBrMPO6zGPuRrnNZ/ULk7f1MMacT03zZRD2CFpKzeq/j+HPM cDrEdmyJ+ZivNd16UfgdT4RcY2xyObO4iZOsPcP79HjgxsDVKBpSZObXaj4YQoaj 9ifXw7VyqNIdiTBdQZXQlj3ALGXL/gotxLqv4S++/nOE4R8q71SUpadf6cufFFFB SAtTDAYv4DBlSt8wjdBITt0886cOauiQstjANdN2s1zODZa1PwmHAWbUspWtc9+L YhNE6aE+swU2XEuRs1a+m8GUWG9wHgi4mscgcC7cQ== 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=bFw6ib rfj8UIx+AyI9m9P8cgtbw5foJc3eCiS/Tec94=; b=RZAbzV+tQYiCM06ZHPr2Le v8n79eKryqXMEZT/V4dMq2T55q1EEB6eLIGhp6VgL9bA6YNKXXFAZYeWJPWpuDGA WC9wcIuFRavGhgQftfeXrPbTy7aqaojP+ymBO72upM3gmWox2YJ5J1JmmsFfQ9fc CyYQRIJ8dtKuXZTnMqWXLtilD/13u1AOeqC+gmmUtSF3cR4OxxKUv8D6EGSt3Tq1 YpfO6EpBDosrMj1ZXBr3cOv7CnmsguDFN93eEjoH6pCzXhammHHRHP7CvIgaH0j8 RgZa1Yp+KvzAl+HBt+s0m/BdTwXieoV7ewvcp1T2bdPktc43SijkzKvhi0bzBc1Q == 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 632717E0D6; Tue, 13 Mar 2018 19:48:59 -0400 (EDT) Subject: Re: JDBC connectivity issue To: chris , Postgres General References: <0e087d67-6403-d0c8-c61e-68c674f992f1@pgsqlrocket.com> <1ba83003-3c02-dafe-1056-4e05d791fbc6@pgsqlrocket.com> From: Adrian Klaver Message-ID: <0b51cb72-bb1d-dfab-3a35-24c1f0f80b7e@aklaver.com> Date: Tue, 13 Mar 2018 16:48:58 -0700 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: <1ba83003-3c02-dafe-1056-4e05d791fbc6@pgsqlrocket.com> 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/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. >>>> >>>> >>>> // >>>> >>>> >>> >>> >> > > -- Adrian Klaver adrian.klaver@aklaver.com