Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 71B83B5DBE3 for ; Tue, 25 Oct 2011 13:32:17 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 03972-05 for ; Tue, 25 Oct 2011 16:32:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mtv-iport-3.cisco.com (mtv-iport-3.cisco.com [173.36.130.14]) by mail.postgresql.org (Postfix) with ESMTP id 342A5B5DBE1 for ; Tue, 25 Oct 2011 13:32:11 -0300 (ADT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=kradhak@cisco.com; l=1290; q=dns/txt; s=iport; t=1319560331; x=1320769931; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to:content-transfer-encoding; bh=gtXuXSaikdj1+3oKeJxgpj3xMBGMV+ekjWENLfmhWb8=; b=ftH1+ymptzXhYzekSA9tNXwkOmTE4RUwurmHCjixffwv7v1rz8UfJJ43 Owrzw1o41AiURhCRkVzqLCPD6FNatlykA98HoBXFu7ETL5ONjnOePArZS XquPddxcWs6ZIUx7T1D4eouj2ny/9yXPT+/4J5uh0fajBPss3Oq/nqy/K s=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EALHjpk6rRDoI/2dsb2JhbABDqRiBBYFuAQEBAQMSASVAARALGAkWDwkDAgECAUUGDQEHAQEenWIBnmmIQwSIBowDhSwJgzWJEg X-IronPort-AV: E=Sophos;i="4.69,404,1315180800"; d="scan'208";a="10181970" Received: from mtv-core-3.cisco.com ([171.68.58.8]) by mtv-iport-3.cisco.com with ESMTP; 25 Oct 2011 16:32:09 +0000 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by mtv-core-3.cisco.com (8.14.3/8.14.3) with ESMTP id p9PGW9IV025081; Tue, 25 Oct 2011 16:32:09 GMT Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 25 Oct 2011 09:32:09 -0700 Received: from [192.168.1.105] ([10.89.13.85]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 25 Oct 2011 09:32:08 -0700 Message-ID: <4EA6E485.1030907@cisco.com> Date: Tue, 25 Oct 2011 10:32:05 -0600 From: Krishnamurthy Radhakrishnan User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: Craig Ringer CC: Craig James , pgsql-admin@postgresql.org Subject: Re: Dumping data using pg_dump after chrooting to a different partition References: <4EA5E253.6020600@cisco.com> <4EA5EA8E.5090406@emolecules.com> <4EA6269A.7040803@cisco.com> <4EA630E3.6090606@ringerc.id.au> In-Reply-To: <4EA630E3.6090606@ringerc.id.au> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Oct 2011 16:32:08.0518 (UTC) FILETIME=[A3A77E60:01CC9333] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/119 X-Sequence-Number: 38571 Thanks. Using localhost instead of the actual host FQDN helped to fix the problem. Thank you all for your help. Radha On 10/24/11 9:45 PM, Craig Ringer wrote: > On 25/10/11 11:01, Krishnamurthy Radhakrishnan wrote: >> Thanks Craig. >> >> After configuring to accept TCP connections on port 5432, I tried to >> specify the hostname as shown below and that didn't help. Is there >> anything else that needs to be configured? >> pg_dump -h bldr-ccm36.cisco.com -p 5432 -a -U postgres >> pg_dump: [archiver (db)] connection to database "postgres" failed: could >> not connect to server: Connection refused >> Is the server running on host "bldr-ccm36.cisco.com" and accepting >> TCP/IP connections on port 5432? > Use "localhost" or "127.0.0.1" if it's on the same machine to simplify > things. If you try to connect to your host's public IP but > postgresql.conf has listen_addresses='127.0.0.1' or > listen_addresses='localhost' then you won't be able to connect because > Pg isn't listening on your public IP, only your loopback IP. A chroot > won't affect tcp/ip, so it's still localhost when you're chrooted into > another FS. > > Also, you may have firewall rules in place that prevent the connection, > check for that. > > -- > Craig Ringer