BDR error while adding 3rd node to cluster

Started by Amit Bondwalover 10 years ago6 messagesgeneral
Jump to latest
#1Amit Bondwal
bondwal.amit@gmail.com

Hi Everyone,

I am trying to setup three node bdr cluster, I am following the quick start
guide,
It is working well between first and 2nd node, but When I try to add 3rd
node, it give the below error.

hakuna=# SELECT bdr.bdr_group_join(
local_node_name := 'node3',
node_external_dsn := 'host=pg3 port=5432 dbname=hakuna',
join_using_dsn := 'host=pg1 port=5432 dbname=hakuna'
);
ERROR: node identity for node_external_dsn does not match current node
when connecting back via remote
DETAIL: The dsn '' connects to a node with identity
(6229651217067355961,1,17161) but the local node is
(6229649404569370556,1,19247)
HINT: The 'node_external_dsn' parameter must refer to the node you're
running this function from, from the perspective of the node pointed to by
join_using_dsn

I tried to delete database on 3rd node and recreate it but same error. I
also tried to connect to 2nd node as external dsn but same error.
I am able to access all three nodes to each other using psql.

--
Regards
Amit Bondwal

#2Craig Ringer
craig@2ndquadrant.com
In reply to: Amit Bondwal (#1)
Re: BDR error while adding 3rd node to cluster

On 21 December 2015 at 22:57, Amit Bondwal <bondwal.amit@gmail.com> wrote:

Hi Everyone,

I am trying to setup three node bdr cluster, I am following the quick
start guide,
It is working well between first and 2nd node, but When I try to add 3rd
node, it give the below error.

hakuna=# SELECT bdr.bdr_group_join(
local_node_name := 'node3',
node_external_dsn := 'host=pg3 port=5432 dbname=hakuna',
join_using_dsn := 'host=pg1 port=5432 dbname=hakuna'
);
ERROR: node identity for node_external_dsn does not match current node
when connecting back via remote
DETAIL: The dsn '' connects to a node with identity
(6229651217067355961,1,17161) but the local node is
(6229649404569370556,1,19247)

Huh. That's interesting. The dsn '<empty string>'.

How'd we get there?

Can you show the output of

select * from bdr.bdr_nodes;

select * from bdr.bdr_connections;

on the new node you're trying to join?

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

#3Amit Bondwal
bondwal.amit@gmail.com
In reply to: Craig Ringer (#2)
Re: BDR error while adding 3rd node to cluster

On Tue, Dec 22, 2015 at 10:05 AM, Craig Ringer <craig@2ndquadrant.com>
wrote:

select * from bdr.bdr_connections;

Hi Craig, Thanks for your reply, These commands shows nothing on 3rd node.

*on node3:-*hakuna=# select * from bdr.bdr_nodes;
node_sysid | node_timeline | node_dboid | node_status | node_name |
node_local_dsn | node_init_from_dsn
------------+---------------+------------+-------------+-----------+----------------+--------------------
(0 rows)

conn_sysid | conn_timeline | conn_dboid | conn_origin_sysid |
conn_origin_timeline | conn_origin_dboid | conn_is_unidirectional |
conn_dsn | conn_apply_delay | conn_replication_sets
------------+---------------+------------+-------------------+----------------------+-------------------+------------------------+----------+------------------+-----------------------
(0 rows)

*on node1:-*

hakuna=# select * from bdr.bdr_nodes;
node_sysid | node_timeline | node_dboid | node_status | node_name
| node_local_dsn | node_init_from_dsn
---------------------+---------------+------------+-------------+-----------+----------------------------------+----------------------------------
6229651184159874988 | 1 | 18719 | r | node1
| host=pg1 port=5432 dbname=hakuna |
6229651217067355961 | 1 | 17161 | r | node2
| host=pg2 port=5432 dbname=hakuna | host=pg1 port=5432 dbname=hakuna
(2 rows)

It is conflicting with ID of node 2 as it shows output of above command on
node 1.

My OS is debian Jessie and I installed it from bdr repo. Current version of
bdr is 0.9.3

#4Amit Bondwal
bondwal.amit@gmail.com
In reply to: Amit Bondwal (#3)
Re: BDR error while adding 3rd node to cluster

Hi Craig,

I remove all the bdr packages and reinstall it and setup again the BDR
cluster, still facing the same issue on 3rd node.

On Tue, Dec 22, 2015 at 10:58 AM, Amit Bondwal <bondwal.amit@gmail.com>
wrote:

Show quoted text

On Tue, Dec 22, 2015 at 10:05 AM, Craig Ringer <craig@2ndquadrant.com>
wrote:

select * from bdr.bdr_connections;

Hi Craig, Thanks for your reply, These commands shows nothing on 3rd node.

*on node3:-*hakuna=# select * from bdr.bdr_nodes;
node_sysid | node_timeline | node_dboid | node_status | node_name |
node_local_dsn | node_init_from_dsn

------------+---------------+------------+-------------+-----------+----------------+--------------------
(0 rows)

conn_sysid | conn_timeline | conn_dboid | conn_origin_sysid |
conn_origin_timeline | conn_origin_dboid | conn_is_unidirectional |
conn_dsn | conn_apply_delay | conn_replication_sets

------------+---------------+------------+-------------------+----------------------+-------------------+------------------------+----------+------------------+-----------------------
(0 rows)

*on node1:-*

hakuna=# select * from bdr.bdr_nodes;
node_sysid | node_timeline | node_dboid | node_status |
node_name | node_local_dsn |
node_init_from_dsn

---------------------+---------------+------------+-------------+-----------+----------------------------------+----------------------------------
6229651184159874988 | 1 | 18719 | r |
node1 | host=pg1 port=5432 dbname=hakuna |
6229651217067355961 | 1 | 17161 | r |
node2 | host=pg2 port=5432 dbname=hakuna | host=pg1 port=5432
dbname=hakuna
(2 rows)

It is conflicting with ID of node 2 as it shows output of above command on
node 1.

My OS is debian Jessie and I installed it from bdr repo. Current version
of bdr is 0.9.3

#5Craig Ringer
craig@2ndquadrant.com
In reply to: Amit Bondwal (#4)
Re: BDR error while adding 3rd node to cluster

On 22 December 2015 at 17:00, Amit Bondwal <bondwal.amit@gmail.com> wrote:

I remove all the bdr packages and reinstall it and setup again the BDR
cluster, still facing the same issue on 3rd node.

At this point I'd really need to see the steps taken, in detail, to get to
that point from a clean initial state.

If I had to guess right now I'd say that the host pg3 isn't actually the
node node3 that you are connected to when you're joining the node, i.e. the
error message is correctly telling you that you've given the wrong external
DSN.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

#6Amit Bondwal
bondwal.amit@gmail.com
In reply to: Craig Ringer (#5)
Re: BDR error while adding 3rd node to cluster

Thanks you very much Craig for this help. This is the error due to dns
entry I pointed pg3 on two different IP.
I regret for wasting your precious time that I could not pick such a small
thing.

thanks again.

On Thu, Dec 24, 2015 at 3:55 PM, Craig Ringer <craig@2ndquadrant.com> wrote:

Show quoted text

On 22 December 2015 at 17:00, Amit Bondwal <bondwal.amit@gmail.com> wrote:

I remove all the bdr packages and reinstall it and setup again the BDR
cluster, still facing the same issue on 3rd node.

At this point I'd really need to see the steps taken, in detail, to get to
that point from a clean initial state.

If I had to guess right now I'd say that the host pg3 isn't actually the
node node3 that you are connected to when you're joining the node, i.e. the
error message is correctly telling you that you've given the wrong external
DSN.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services