Christopher Browne cbbrowne
Wed May 31 08:30:34 PDT 2006
Matthew Whittaker-Williams wrote:
> On Wednesday 31 May 2006 17:03, St?phane P?trot wrote:
>   
>> Hi,
>>
>> the demon slon is running on my slave server, but it can't connect to
>> the master server. I got the log error :
>>
>> CEST ERROR  slon_connectdb: PQconnectdb("host=master dbname=my_db
>> user=postgres port=5432") failed - could not connect to server:
>>         Is the server running on host "master" and accepting
>>         TCP/IP connections on port 5432?
>>
>> It was well working before I change the IP of the slave (no more the
>> same network but a remote one). The firewall is OK to receive
>> connection on port 5432.
>> So what's happened?
>>
>> Thanks
>> St?phane
>> _______________________________________________
>> Slony1-general mailing list
>> Slony1-general at gborg.postgresql.org
>> http://gborg.postgresql.org/mailman/listinfo/slony1-general
>>     
>
>
> Is the new ip of the slave listed in the pg_hba.conf on the master?
> If not, change that and it should work again.
>
> Kind regards
>
> Matthew
>   
I don't think that's it...

If the problem was that pg_hba.conf was locking the connection out, the
error message would mention pg_hba.conf.

The problem is more likely that the host name is not being translated
properly.

When you run into problems like this, it's a good idea to drop down to
command line tools and try and get the problem to express itself as
simply as possible.

On the host where slon is running, the thing to do to test connectivity
is thus:
$ psql -h master -d my_db -U postgres -p 5432

That is equivalent to the libpq DSN shown.

That command should also NOT work; it should report the same error message.

I'll bet that the problem is that "master" isn't resolving to what it
should be.



More information about the Slony1-general mailing list