I am new to Citus. I want to know how to implement Citus across multiple nodes. I have already created three virtual machines using VirtualBox, but I don't have any idea how to connect these three.
I just want to know what I am doing wrong while connecting these three nodes. Here is the configuration files for one coordinator node and two worker nodes, along with their pg_hba.conf files:
Coordinator Node (pg_hba.conf):
# TYPE DATABASE USER ADDRESS
METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# Allow connections from the worker nodes
host all all 192.168.3.77/32 md5
host all all 192.168.3.187/32 md5
# IPv6 local connections:
host all all ::1/128 trust
Worker Node 1 (pg_hba.conf):
# TYPE DATABASE USER ADDRESS
METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# Allow connections from the coordinator node
host all all 192.168.3.71/32 md5
# IPv6 local connections:
host all all ::1/128 trust
Worker Node 2 (pg_hba.conf):
# TYPE DATABASE USER ADDRESS
METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# Allow connections from the coordinator node
host all all 192.168.3.71/32 md5
# IPv6 local connections:
host all all ::1/128 trust
(Would be a mess as a comment)
I am also new to Citus and after checking it in a docker container, I tried to set it up on virtual boxes. Here is what worked for me (following this Citus MultiNode documentation):
In configuration step, I did as what they suggested:
and it worked with this setup.
There they warn that this is too permissive and for increasing security they have this sample:
and also edits the pgpass file to have the connection information for each node:
In your case it seems like you need to use hostssl instead of host and also edit your pgpass file.