Postgres 9.4 BDR replication error....

Status
Not open for further replies.

mannyg

New Member
Apr 6, 2022
25
2
3
60
Any help will be appreciated...

I am trying to replicate two fusionpbx using postgres 9.4...
I have did not get any error when creating node 1

When I try to create node 2 and join to node 1, I get the following error..

fusionpbx=#
fusionpbx=# select bdr.bdr_group_join (local_node_name := 'node2', node_external_dsn := 'host=10.1.10.205 user=bdrsync dbname=fusionpbx password=12345#', join_using_dsn := 'host=10.1.10.206 user=bdrsync dbname=fusionpbx password=12345#');

FATAL: could not connect to the server in non-replication mode: FATAL: no pg_hba.conf entry for host "10.1.10.205", user "bdrsync", database "fusionpbx", SSL on
FATAL: no pg_hba.conf entry for host "10.1.10.205", user "bdrsync", database "fusionpbx", SSL off

DETAIL: dsn was: connect_timeout=30 keepalives=1 keepalives_idle=20 keepalives_interval=20 keepalives_count=5 host=10.1.10.206 user=bdrsync dbname=fusionpbx password=12345# fallback_application_name='bdr (7097285019416402266,1,16384,):bdrnodeinfo'

CONTEXT: SQL statement "SELECT * FROM bdr_get_remote_nodeinfo(remote_dsn)"
PL/pgSQL function internal_begin_join(text,text,text,text) line 72 at SQL statement
SQL statement "SELECT bdr.internal_begin_join(
'bdr_group_join',
local_node_name,
CASE WHEN node_local_dsn IS NULL THEN node_external_dsn ELSE node_local_dsn END,
join_using_dsn)"
PL/pgSQL function bdr_group_join(text,text,text,text,integer,text[]) line 21 at PERFORM
server closed the connection unexpectedly
This probably means the server terminated abnormally before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
fusionpbx=#


Some details...
## node1 = 10.1.10.206
## node2 = 10.1.10.205
both nodes also have public IP address....

pg_hba.conf file
# Database administrative login by Unix domain socket
local all postgres peer

# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer

# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 10.1.10.205/32 md5

# IPv6 local connections:
host all all ::1/128 md5

# Allow replication connections from localhost, by a user with the
# replication privilege.

#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5

host replication postgres 10.1.10.206/32 trust
host replication postgres 10.1.10.205/32 trust
host replication bdrsync 10.1.10.206/32 password
host replication bdrsync 10.1.10.205/32 password

if you need any other details, just ask...

thanks in advance....
 

mannyg

New Member
Apr 6, 2022
25
2
3
60
update....
if I create node2, looks OK no error


fusionpbx=#
fusionpbx=# SELECT bdr.bdr_group_create (local_node_name := 'node2', node_external_dsn := 'host=10.1.10.205 user=bdrsync dbname=fusionpbx password=12345#');
bdr_group_create
------------------
(1 row)

fusionpbx=#
fusionpbx=# select * from bdr.bdr_nodes;
node_sysid | node_timeline | node_dboid | node_status | node_name | node_local_dsn | node_init_from_dsn | node_read_only | node_seq_id
---------------------+---------------+------------+-------------+-----------+----------------------------------------------------------------+--------------------+----------------+-------------
7097285019416402266 | 1 | 16384 | r | node2 | host=10.1.10.205 user=bdrsync dbname=fusionpbx password=12345# | | f |
(1 row)


When I try to join the nodes..


fusionpbx=# select bdr.bdr_group_join (local_node_name := 'node2', join_using_dsn := 'host=10.1.10.206 user=bdrsync dbname=fusionpbx password=12345#');
ERROR: function bdr.bdr_group_join(local_node_name := unknown, join_using_dsn := unknown) does not exist
LINE 1: select bdr.bdr_group_join (local_node_name := 'node2', join_...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
fusionpbx=#
 
Status
Not open for further replies.