./node.sh Provides Error: bdr can only be loaded via shared_preload_libraries

Status
Not open for further replies.

ict2842

Member
Mar 2, 2021
140
11
18
Wichita, KS
Hey guys!
I am watching along the March 2019 Advanced Training. When I run the ./node.sh command, I run into the below error. Did I miss a step or did I do something wrong? Looking at my config file once more, it looks correct.

Code:
-----------------------------
 Summary
-----------------------------
Create Group: y
All Node IP Addresses: [removed] [removed]
This Nodes Address: [removed]
Replicate the FusionPBX Database: y
Replicate the FreeSWITCH Database: y
Add iptable rules: y

Is the information correct (y/n): y
./node.sh: 77: ./node.sh: iptables: not found
./node.sh: 78: ./node.sh: iptables: not found
./node.sh: 77: ./node.sh: iptables: not found
./node.sh: 78: ./node.sh: iptables: not found
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  netfilter-persistent
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
  iptables-persistent
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 43.0 kB disk space will be freed.
(Reading database ... 44063 files and directories currently installed.)
Removing iptables-persistent (1.0.11+deb10u1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  iptables-persistent
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/11.8 kB of archives.
After this operation, 43.0 kB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously unselected package iptables-persistent.
(Reading database ... 44057 files and directories currently installed.)
Preparing to unpack .../iptables-persistent_1.0.11+deb10u1_all.deb ...
Unpacking iptables-persistent (1.0.11+deb10u1) ...
Setting up iptables-persistent (1.0.11+deb10u1) ...
./node.sh: 84: ./node.sh: service: not found
./node.sh: 124: ./node.sh: service: not found
ERROR:  extension "btree_gist" already exists
ERROR:  bdr can only be loaded via shared_preload_libraries
ERROR:  extension "btree_gist" already exists
ERROR:  bdr can only be loaded via shared_preload_libraries
ERROR:  schema "bdr" does not exist
ERROR:  schema "bdr" does not exist
Completed
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
Sounds like you didn’t get the correct version of postgresql installed
 

ict2842

Member
Mar 2, 2021
140
11
18
Wichita, KS
Sounds like you didn’t get the correct version of postgresql installed
Going off of the guide, which is 2 years old now, here is what I have in the config:
Code:
database_repo=2ndquadrant       # PostgreSQL official, system, 2ndquadrant
database_version=9.4            # requires repo official

Should I be using a new version?
 

ict2842

Member
Mar 2, 2021
140
11
18
Wichita, KS
This seems odd...

Code:
./node.sh: 84: ./node.sh: service: not found
./node.sh: 124: ./node.sh: service: not found

Code:
root@pbx-dfw-01:/usr/src/fusionpbx-install.sh/debian/resources/postgresql# service postgresql status
bash: service: command not found
root@pbx-dfw-01:/usr/src/fusionpbx-install.sh/debian/resources/postgresql# systemctl  postgresql status
Unknown operation postgresql.
root@pbx-dfw-01:/usr/src/fusionpbx-install.sh/debian/resources/postgresql# systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
   Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)
   Active: active (exited) since Wed 2021-03-24 15:45:01 CDT; 6 days ago
Main PID: 22670 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 4697)
   Memory: 0B
   CGroup: /system.slice/postgresql.service

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@pbx-dfw-01:/usr/src/fusionpbx-install.sh/debian/resources/postgresql# service postgresql restart
bash: service: command not found
This seems problematic :D


I restarted it using systemctl restart postgresql and ran ./node.sh again.

Code:
Setting up iptables-persistent (1.0.11+deb10u1) ...
./node.sh: 84: ./node.sh: service: not found
./node.sh: 124: ./node.sh: service: not found
ERROR:  extension "btree_gist" already exists
CREATE EXTENSION
ERROR:  extension "btree_gist" already exists
CREATE EXTENSION
 bdr_group_create
------------------

(1 row)

 bdr_group_create
------------------

(1 row)

Completed
I think it worked?
 
Last edited:

ict2842

Member
Mar 2, 2021
140
11
18
Wichita, KS
But let me ask...Do I still need to use 9.4 or can I use 13.2? I know BDR is EOL so I am not sure if that will have an impact here. I am seeing multiple version in the docs above 9.
I am not understanding much and definitely don't have the technical know-how to modify anything, but reviewing resources/postgresql.sh, it needs 9.4 :(
At this point I am toying with things hoping to find something that works to have separate DB servers instead (my preference).
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
bdr only works on 9.4 unless you want to shell out thousands for the later versions.

They had always promised later versions would be open source then backtracked on it.
 

ict2842

Member
Mar 2, 2021
140
11
18
Wichita, KS
bdr only works on 9.4 unless you want to shell out thousands for the later versions.

They had always promised later versions would be open source then backtracked on it.
Ouch. Is BDR still the recommended way to go 2 years after that video I'm watching? I know he mentioned finding a different option to go with but I am not seeing anything more recent.
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
The latest continuing education has docs on alternative replication method that is supposed to work with later versions.
I have not tried the new way so can’t help you beyond pointing out the updated docs
 
  • Like
Reactions: ict2842

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
@ad5ou Interesting I haven't looked.

I have always used BDR and have NEVER had a single problem with it. My take on it is that though yes it is outdated and yes support will be pulled, we have docker and that should enable us to run it for a long time to come. That's my hope anyway.

I'll definitely try whatever new method comes along though.
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
The updated documentation uses Logical Replication so not quite as handy as BDR but could be useful for anyone what wants/needs features not available in 9.4

I suppose the link should be safe to post since you need to be a member to view it.
 

ict2842

Member
Mar 2, 2021
140
11
18
Wichita, KS
Going this route, could I still have separate VMs for the databases and then HAProxy on the VMs to send traffic to the DB servers? I just saw it isn't master-master. I would still be able to put NY in there too, right? NY is a fail-over from Dallas and hopefully would never actually be used.
 

ad5ou

Active Member
Jun 12, 2018
892
204
43
If you still plan to operate in a primary/backup setup regardless of where the DB is stored, it should not matter which replication method is used.
 

ict2842

Member
Mar 2, 2021
140
11
18
Wichita, KS
I've been toying with two servers to be used for the DB when I have the time. I had some firewall issues on Debian 10. I quite honestly don't even know what is being used right now, but running the command to connect server 2 to server 1 is now giving an error other than "could not connect to publisher....is the server running on host...."

I am now getting the error: "ERROR: relation "public.v_access_control_nodes" does not exist". For the command being used, see the docs you referenced, under "node 2" and the last statement for a new cluster.

Back on node 1:
Code:
fusionpbx=# select * from "v_access_control_nodes";
       access_control_node_uuid       |         access_control_uuid          | node_type |    node_cidr     |  node_domain  | node_description
--------------------------------------+--------------------------------------+-----------+------------------+---------------+------------------
 13d9e552-ed75-4350-be98-af5b97680105 | 0d07875e-bbcf-4e27-b937-c99d4521e02b | allow     | 192.168.42.42/32 |               |
 3437e792-ac3b-4048-af2f-5673aa790bb0 | 01838a67-4796-42b7-ad30-4ce1964318c9 | allow     |                  | node1 ip addr |
(2 rows)

Any input on firewalls other than iptables and anything for the error would be appreciated. I'm still sifting through Google results and haven't spent much time working on Fusion since I made this progress of a new error.
 
Status
Not open for further replies.