Jeff Frost jeff at frostconsultingllc.com
Wed Apr 2 22:16:51 PDT 2008
On Wed, 2 Apr 2008, Craig James wrote:

> I keep getting this error:
>
>  remoteListenThread_1: db_getLocalNodeId() returned 2 - wrong database?
>
> I suspect the slon daemon can't handle port numbers correctly.  In this case, 
> both the master and slave databases have the same name, AND the same host. 
> The only difference is the port number.
>
> When I start slon, it seems to try to figure out the node number from the 
> combination of dbname+host, but it seems to ignore the port number, so it 
> arbitrarily will get node 1 or node 2.
>
> (In case you're wondering, the second database is actually on a different 
> machine, accessed via an encrypted ssh(1) tunnel that maps port 5433 on the 
> local machine to port 5432 on the remote machine.  So the two databases are 
> accessed by the same name and same host, with only the port to distinguish 
> them.)
>
> Is my analysis correct?  How does the slon daemon figure out which node 
> number it is working on?  There doesn't seem to be any way to tell it.

It calls the getlocalnodeid(name) function on the DB specified in the conninfo 
when it's started.

How are you providing the conninfo to the slon daemons?

-- 
Jeff Frost, Owner 	<jeff at frostconsultingllc.com>
Frost Consulting, LLC 	http://www.frostconsultingllc.com/
Phone: 650-780-7908	FAX: 650-649-1954


More information about the Slony1-general mailing list