I'm trying to create a Postgres-XL cluster on 4 servers. I've followed the recipe on https://ruihaijiang.wordpress.com/2015/09/17/postgres-xl-installation-example-on-linux/
(Note: update to pgxc_ctl.conf by adding tmpDir=/tmp
and localTmpDir=$tmpDir
)
I get to pgxc_ctl init all
and then the following error:
postgres@ls $ pgxc_ctl init all
/bin/bash
Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.
Installing pgxc_ctl_bash script as /home/postgres/pgxc_ctl/pgxc_ctl_bash.
Reading configuration using /home/postgres/pgxc_ctl/pgxc_ctl_bash --home /home/postgres/pgxc_ctl --configuration /home/postgres/pgxc_ctl/pgxc_ctl.conf
Finished reading configuration.
******** PGXC_CTL START ***************
Current directory: /home/postgres/pgxc_ctl
Initialize GTM master
bash: initgtm: command not found
bash: gtm: command not found
bash: gtm_ctl: command not found
Done.
Start GTM master
bash: gtm_ctl: command not found
Initialize all the coordinator masters.
Initialize coordinator master coord1.
bash: initdb: command not found
Done.
Starting coordinator master.
Starting coordinator master coord1
bash: pg_ctl: command not found
Done.
Initialize all the datanode masters.
Initialize the datanode master datanode1.
Initialize the datanode master datanode2.
bash: initdb: command not found
bash: initdb: command not found
Done.
Starting all the datanode masters.
Starting datanode master datanode1.
Starting datanode master datanode2.
bash: pg_ctl: command not found
bash: pg_ctl: command not found
Done.
psql: could not connect to server: Connection refused
Is the server running on host "197.242.148.228" and accepting
TCP/IP connections on port 6029?
Done.
Done.
There seems to be more than one issue (command not found
and Connection refused
)
Best Answer
Ok, the cause of the connection refused is a path issue. But it took me a long time and a lot of frustration.
On all servers
(GTM, Coord, Datanode1, Datanode2)
Edit
/etc/environment
(I got tired fighting with .bashrc) and add to the pathThen as postgres user/account run
pgxc_ctl init all