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 1evtci-0007MG-US for pgsql-general@arkaria.postgresql.org; Tue, 13 Mar 2018 23:46:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1evtch-0001Nb-QM for pgsql-general@arkaria.postgresql.org; Tue, 13 Mar 2018 23:46:27 +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 1evtch-0001NR-DH for pgsql-general@lists.postgresql.org; Tue, 13 Mar 2018 23:46:27 +0000 Received: from mail-it0-x22d.google.com ([2607:f8b0:4001:c0b::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1evtce-0001eC-G2 for pgsql-general@postgresql.org; Tue, 13 Mar 2018 23:46:26 +0000 Received: by mail-it0-x22d.google.com with SMTP id z7-v6so1638026iti.1 for ; Tue, 13 Mar 2018 16:46:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgsqlrocket-com.20150623.gappssmtp.com; s=20150623; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=6wKFbBXTqdUqz+TYbGmOHZ5HQN4vVKOnBN/AwG4ZLMk=; b=Q0Ed79TZMcwRCv06EjN29BPa1X3m8SztszxRUlXOSS3qfMqB4DKDuJN/7o/Fsg1UxT OTo7LpPG+V05DAD2zYcWL2e/1J3sUHVCeVez/HdtViuBwlSFTpbe5qwYKN5p3XgNLksK hb13aFHTw131D4cglsNF9N9lK8DrukNhw89TfYjCBoMyTmHUXnzUK4MFb0WEe8UQF6cB lrBhSpAVRHuSawTg6oSfKp3DcSy628vNR5Yc152mNqUlnLgqfUNjRAeqsZP6LvnduATR GIH7reowbYwtHdLF7to16DNfX5gY/ZDvikLpJp3itS2mAve7vXGi1LYeYcYhWTsao/Rj rYPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=6wKFbBXTqdUqz+TYbGmOHZ5HQN4vVKOnBN/AwG4ZLMk=; b=JNB1MIDSABjv9rR4BQIJOa0yfS+R3fxYFz4K397G+VODAvhWsNIPc6DIVKVT74DZmi MTdzOvcMesLB8+6N91R1/anQhEwD2bp3kADmkFExFvDqtasOybmFURHtIqvGQw2XGHFE 9s6q88HAJ4K5yz2DyrQmhTXECK94pyxGuLZRXPP3DWWNY16lVE3GRqmwY8X4aEp3yzpD 0Xr2lcdVgO4M93oRpMM/x6rNwcIQC71U8Jf7WkYvOMwHv0BXkpEYXwhWP5AI29rX5UaB K+PTBxsIx8p3m999JkUnrU+BX6CVchNLz9di3nXv/dRPXLjhx7hOB2FxLo+y966paABS Ezwg== X-Gm-Message-State: AElRT7GrsU3/+bU9smvcF3oIYotA7PMsAK5TeIBylsk7gfBvE52qMES0 6CVVokmC2tKXhWnkbno0Dxc/HGxGK1s= X-Google-Smtp-Source: AG47ELv85DPZE/H3xX6a64sP9MpQn1TS8n8driz/DMLKAj/kSPnRZlGWeCUJcGC3/mG0JoEUWHOAyA== X-Received: by 10.36.80.79 with SMTP id m76mr2979518itb.81.1520984782359; Tue, 13 Mar 2018 16:46:22 -0700 (PDT) Received: from localhost.localdomain (75-171-185-233.hlrn.qwest.net. [75.171.185.233]) by smtp.gmail.com with ESMTPSA id d184-v6sm33936ite.4.2018.03.13.16.46.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Mar 2018 16:46:21 -0700 (PDT) Subject: Re: JDBC connectivity issue From: chris To: Adrian Klaver , Postgres General References: <0e087d67-6403-d0c8-c61e-68c674f992f1@pgsqlrocket.com> Message-ID: <1ba83003-3c02-dafe-1056-4e05d791fbc6@pgsqlrocket.com> Date: Tue, 13 Mar 2018 17:46:20 -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: <0e087d67-6403-d0c8-c61e-68c674f992f1@pgsqlrocket.com> 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 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. >>> >>> >>> // >>> >>> >> >> >