pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <ringerc@ringerc.id.au>
To: Krishnamurthy Radhakrishnan <kradhak@cisco.com>
Cc: Craig James <craig_james@emolecules.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Dumping data using pg_dump after chrooting to a different partition
Date: Tue, 25 Oct 2011 11:45:39 +0800
Message-ID: <4EA630E3.6090606@ringerc.id.au> (raw)
In-Reply-To: <4EA6269A.7040803@cisco.com>
References: <4EA5E253.6020600@cisco.com>
	<4EA5EA8E.5090406@emolecules.com>
	<4EA6269A.7040803@cisco.com>

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



view thread (7+ messages)  latest in thread

Message-ID: <4EA630E3.6090606@ringerc.id.au>
Permalink:  ../4EA630E3.6090606@ringerc.id.au/
Also on:    postgresql.org/message-id/4EA630E3.6090606@ringerc.id.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: ringerc@ringerc.id.au, kradhak@cisco.com, craig_james@emolecules.com
  Subject: Re: Dumping data using pg_dump after chrooting to a different partition
  In-Reply-To: <4EA630E3.6090606@ringerc.id.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox