Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZH8kQ-0001nv-DP for pgsql-odbc@arkaria.postgresql.org; Mon, 20 Jul 2015 10:56:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZH8kP-0004p9-Vx for pgsql-odbc@arkaria.postgresql.org; Mon, 20 Jul 2015 10:56:38 +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.84) (envelope-from ) id 1ZH8kP-0004ob-Fs for pgsql-odbc@postgresql.org; Mon, 20 Jul 2015 10:56:37 +0000 Received: from mail.verishare.co.za ([217.29.208.2]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZH8kL-0003I6-0G for pgsql-odbc@postgresql.org; Mon, 20 Jul 2015 10:56:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.verishare.co.za (Postfix) with ESMTP id F303C422356 for ; Mon, 20 Jul 2015 12:56:27 +0200 (SAST) Received: from mail.verishare.co.za ([127.0.0.1]) by localhost (mail.verishare.co.za [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id b73Du4mVotTj; Mon, 20 Jul 2015 12:56:27 +0200 (SAST) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.verishare.co.za (Postfix) with ESMTP id 5EB5C422357; Mon, 20 Jul 2015 12:56:27 +0200 (SAST) X-Virus-Scanned: amavisd-new at verishare.co.za Received: from mail.verishare.co.za ([127.0.0.1]) by localhost (mail.verishare.co.za [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id A5Xo4DJP1-Se; Mon, 20 Jul 2015 12:56:27 +0200 (SAST) Received: from STEFANPC (unknown [172.16.1.76]) by mail.verishare.co.za (Postfix) with ESMTPSA id 47EBA422356 for ; Mon, 20 Jul 2015 12:56:27 +0200 (SAST) From: "Stefan Viljoen" To: References: <000b01d0c066$c58f3b80$50adb280$@verishare.co.za> <55A8BF02.4090001@lurcher.org> <002701d0c07f$bd09f3b0$371ddb10$@verishare.co.za> <55A8E0B8.3070107@lurcher.org> <002e01d0c088$c6b57390$54205ab0$@verishare.co.za> <55A8F948.9040407@lurcher.org> <002f01d0c090$da03cc50$8e0b64f0$@verishare.co.za> <55A905FA.2080701@aklaver.com> <003001d0c099$e21a7b60$a64f7220$@verishare.co.za> <55A90E6A.4030802@lurcher.org>, <003201d0c09f$b1ece5d0$15c6b170$@verishare.co.za> <55BAADA01D8C504993894EAEA7517CF8124630@003FCH1MPN2-002.003f.mgd2.msft.net> <000d01d0c2b8$a8f146e0$fad3d4a0$@verishare.co.za>, <004501d0c2d8$5a4cc710$0ee65530$@verishare.co.za> <55BAADA01D8C504993894EAEA7517CF81246C6@003FCH1MPN2-002.003f.mgd2.msft.net> In-Reply-To: <55BAADA01D8C504993894EAEA7517CF81246C6@003FCH1MPN2-002.003f.mgd2.msft.net> Subject: Re: Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with isql ODBC commandline client Date: Mon, 20 Jul 2015 12:59:40 +0200 Message-ID: <004601d0c2db$2d38ade0$87aa09a0$@verishare.co.za> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQIlJsTM6eABCGiGgETx/eeRTV0aKQD+sBlEAd+uLVACvS0eZwIDK6DSAbi5yQACNRVlIgKyOovEAwQzP6cC5YclzgJpmRobAc/BjzoBf0NcHwGnPLYpAkwTS5OcTMNREA== Content-Language: en-za X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org Hi Jeremy >I had thought perhaps psql was using unix domain socket(/tmp) and not localhost but as psql -h localhost ... >works for you that is NOT the problem. >Just one last thing to check if you run >grep localhost /etc/hosts >what do you get. In particular is the 127.0.0.1 line(IPv4) before the ::1 line(ipv6). This is the output: --- [root@jhbasterisk ~]# grep localhost /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [root@jhbasterisk ~]# --- One thing I did notice though. When I was initially setting up postgress, the last line of my pg_hba.conf was --- host all all ::1/128 trust --- And I could not get access with psql to the running postgres instance. Changing the last line to --- host all all ::1/128 ident --- also caused that I could not get access with psql to the running postgres instance (restarting postgres after changing pg_hba.conf each time, of course). Only when I put --- host all all ::1/128 md5 --- as the last line of pg_hba.conf and restarted postgres, could I get access with psql to the running postgres instance. This seems to indicate that I'm running postgres on IPV6 (unintentionally) instead of IPV4? I just want / need IPV4 functionality, IPV6 is unneccessary. HOWEVER Can this be why unixODBC is not working? E. g. it is string to connect to postgres but it is ignoring IPV4 requests? My current pg_hba.conf does allow IPV4: --- local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust --- I can drop the first two lines and nothing changes - psql still works and isql still does NOT work - but drop the very last line and psql AND isql don't work. Ergo... IPV6 is being used by postgres and IPV4 traffic is completely ignored? I have not tried to connect to the box in question from any host besides local. Thanks for the assistance. Kind regards Stefan -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc