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 1eu37p-0007Lk-2p for pgsql-general@arkaria.postgresql.org; Thu, 08 Mar 2018 21:30:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1eu37n-0005kc-CF for pgsql-general@arkaria.postgresql.org; Thu, 08 Mar 2018 21:30:55 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eu37n-0005kK-0K for pgsql-general@lists.postgresql.org; Thu, 08 Mar 2018 21:30:55 +0000 Received: from mail-ot0-x229.google.com ([2607:f8b0:4003:c0f::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1eu37k-0000Ge-DP for pgsql-general@postgresql.org; Thu, 08 Mar 2018 21:30:53 +0000 Received: by mail-ot0-x229.google.com with SMTP id y11so6850311otg.0 for ; Thu, 08 Mar 2018 13:30:52 -0800 (PST) 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=Pdju3kNxoFG0Z3bTU+8WXJjzwMasBUuLfp/ZMcyRV24=; b=m//JBEXNoiu6XW9lg4KgN829MFKbxRsZeE9cCZHLGyG+uOr2q6MSufUjEmxWZSm6oi tffWGGuJPFkb+PxZyXQl92DqN6PxaBNsERVgrL+54wNHs6iTn17Axhf2Vi5aAseIdo2Y TojghOqfeuGHPIFcrMpRV95KHH8Hf6QG4sk4BimedTC4cTrkVlugwcIzZ3C0gMKh30L9 6PAdVQI4hOBGyZG9CJDtTloIaLcuglA0JKC+VZYTjDac6X7cS9PctzNDhAIj8/Yl5FZv nW1yNSvRpbICOUYZgT6ankkeyMDrZKVUgtKfi3O4OTYbyg8I8ZMBazXJzOAgiSDWSnt8 fAfw== 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=Pdju3kNxoFG0Z3bTU+8WXJjzwMasBUuLfp/ZMcyRV24=; b=GEEwCh+oeKgzVUiXhu+0gaUBr5qKi3UX1tbkrjq0VKJdfOvzeTSkODsM7ALTCh7Eh8 Ly2ZGrABW+gJ01xDyHBcffl668TqQpsv0hkHNoBM4pPZluUZ3bbg0kKGefbaEq20Ta8r SA/DjPfKMNhe1uk4i1Tcn/Jmaox3gkaDgTF4fyL8lugHIPR85rlJNvY6do0jDq8k1Mpm lDTaM98q1ZIJPQjKZ0RjcW3xyc/UE+diNuzw7kQ/SociXJ4Zc1f8JuXftuS+YQVwV0Yv 1mqbx6yLt03zrFm96dPBZaSCR/XUVW3E6pyZhW4GrYjqP+48FnQX+NTJF2vdlTGErLQX m1lQ== X-Gm-Message-State: AElRT7EcfEm/KmAQQONJ3CEnqqqVsb8/aji6Bk/z2Qj/ySM/3ql7lsOk iQPi7L5l1H5f1zQoXKq053p4pXetY0I= X-Google-Smtp-Source: AG47ELvbr5FcZ5Guw75U+KSn39tPtXIxFHR2FHeLufV7n8mes1hUf0/PhP1A92k8x76sf0+Ym8uUGQ== X-Received: by 10.157.0.214 with SMTP id 22mr20436410otk.220.1520544651142; Thu, 08 Mar 2018 13:30:51 -0800 (PST) Received: from localhost.localdomain ([65.132.155.214]) by smtp.gmail.com with ESMTPSA id l15sm10587726otl.16.2018.03.08.13.30.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Mar 2018 13:30:50 -0800 (PST) Subject: Re: JDBC connectivity issue To: Adrian Klaver , Postgres General References: From: chris Message-ID: <0e087d67-6403-d0c8-c61e-68c674f992f1@pgsqlrocket.com> Date: Thu, 8 Mar 2018 14:30:49 -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: 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 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. >> >> >> // >> >> > >