[Postgres-xl-bugs] met a question in cluster installation, Howcan I fix it?

郑晓红 zhengxiaohong at clinkworld.com
Wed Dec 24 00:23:02 PST 2014


Mason Sharp,
Thank you for your reply.
I have fixed it using pgxc_ctl, configure file content as following:


# pgxc_ctl.conf

# user and path
pgxcOwner=postgres
pgxcUser=$pgxcOwner
pgxcInstallDir=/usr/local/pgsql/

#gtm and gtmproxy
gtmMasterDir=/usr/local/pgsql/gtm
gtmMasterPort=6666
gtmMasterServer=master
gtmSlave=n

#gtm proxy
gtmProxyDir=/usr/local/pgsql/data/gtm_pxy
gtmProxy=y
gtmProxyNames=(gtm_pxy1 gtm_pxy2)
gtmProxyServers=(vm01 vm02)
gtmProxyPorts=(20001 20001)
gtmProxyDirs=($gtmProxyDir $gtmProxyDir)
gtmPxyExtraConfig=none
gtmPxySpecificExtraConfig=(none none)
#coordinator
coordMasterDir=/usr/local/pgsql/data
coordNames=(coord1 coord2)
coordPorts=(5432 5432)
poolerPorts=(20010 20010)
coordPgHbaEntries=(192.168.61.0/24)
coordMasterServers=(vm01 vm02)
coordMasterDirs=($coordMasterDir/coord1 $coordMasterDir/coord2)
coordMaxWALsender=0
coordMaxWALSenders=($coordMaxWALsender $coordMaxWALsender)
coordSlave=n
coordSpecificExtraConfig=(none none)
coordSpecificExtraPgHba=(none none)

#datanode
datanodeNames=(datanode1 datanode2)
datanodePorts=(15432 15432)
datanodePoolerPorts=(20012 20012)
datanodePgHbaEntries=(192.168.61.0/24)
datanodeMasterServers=(vm01 vm02)
datanodeMasterDir=/usr/local/pgsql/data
datanodeMasterDirs=($datanodeMasterDir/datanode1 $datanodeMasterDir/datanode2)
datanodeMaxWalSender=0
datanodeMaxWALSenders=($datanodeMaxWalSender $datanodeMaxWalSender)
datanodeSlave=n
primaryDatanode=datanode1


Thanks.

I have another question:    Can I use postgres-xl cluster in my production envoriment?


郑晓红,zhengxiaohong at clinkworld.com
2014/12/24 
----- Original Message ----- 
From: Mason Sharp 
To: 郑晓红 
Date: 2014-12-23, 22:48:13
Subject: Re: Re: [Postgres-xl-bugs] met a question in cluster installation,Howcan I fix it?


Going back to the root error message, it looks like GTM is not accessible. Do you have a firewall running blocking access to that port?


I recommend reconfiguring to use pgxc_ctl. It will be easier to start, stop, failover, and expand your cluster.


On Mon, Dec 22, 2014 at 10:43 PM, 郑晓红 <zhengxiaohong at clinkworld.com> wrote:

hello Mason and Jov:
 
But I have create all node:
 
 
I have only 2 datanode and 1 GTM:
* machine plan 
master (gtm) 
vm01 (gtm_proxy,coordinator,datanode) 
vm02 (gtm_proxy,coordinator,datanode) 

* IP、HostName configuration 
# vi /etc/hosts 
192.168.61.20 master 
192.168.61.21 vm01 
192.168.61.22 vm02 
 
And I have created all node in 2 datanode using following command: 
 
* execute registration 

vm01: 

psql -p 5432 -c "delete from pgxc_node"
psql -p 5432 -c "select * from pgxc_node"
psql -p 5432 -c "CREATE NODE coord1 WITH (TYPE='coordinator',HOST='vm01',PORT=5432)"
psql -p 5432 -c "CREATE NODE coord2 WITH (TYPE='coordinator',HOST='vm02',PORT=5432)"
psql -p 5432 -c "CREATE NODE datanode1 WITH (TYPE='datanode',HOST='vm01',PORT=15432)"
psql -p 5432 -c "CREATE NODE datanode2 WITH (TYPE='datanode',HOST='vm02',PORT=15432)"
psql -p 5432 -c "select pgxc_pool_reload()"




check:

[postgres at ... ~]$ psql -p 5432 -c "select * from pgxc_node" 
node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id 
-----------+-----------+-----------+-----------+----------------+------------------+------------- 
coord1 | C | 5432 | vm01 | f | f | 1885696643 
coord2 | C | 5432 | vm02 | f | f | -1197102633 
datanode1 | D | 15432 | vm01 | f | f | 888802358 
datanode2 | D | 15432 | vm02 | f | f | -905831925 
(4 rows) 

reload:

[postgres at ... ~]$ psql -p 5432 -c "select pgxc_pool_reload()" 
pgxc_pool_reload 
------------------ 
t 
(1 row) 




vm02:


psql -p 5432 -c "delete from pgxc_node"
psql -p 5432 -c "select * from pgxc_node"
psql -p 5432 -c "CREATE NODE coord1 WITH (TYPE='coordinator',HOST='vm01',PORT=5432)"
psql -p 5432 -c "CREATE NODE coord2 WITH (TYPE='coordinator',HOST='vm02',PORT=5432)"
psql -p 5432 -c "CREATE NODE datanode1 WITH (TYPE='datanode',HOST='vm01',PORT=15432)" 
psql -p 5432 -c "CREATE NODE datanode2 WITH (TYPE='datanode',HOST='vm02',PORT=15432)"
psql -p 5432 -c "select pgxc_pool_reload()"


check:

[postgres at ... ~]$ psql -p 5432 -c "select * from pgxc_node" 
node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id 
-----------+-----------+-----------+-----------+----------------+------------------+------------- 
coord2 | C | 5432 | vm02 | f | f | -1197102633 
coord1 | C | 5432 | vm01 | f | f | 1885696643 
datanode1 | D | 15432 | vm01   | f | f | 888802358 
datanode2 | D | 15432 | vm02   | f | f | -905831925 
(4 rows) 


reload: 

[postgres at ... ~]$ psql -p 5432 -c "select pgxc_pool_reload()" 
pgxc_pool_reload 
------------------ 
t 
(1 row) 
 
? ?
 
 
zghover,zhengxiaohong at clinkworld.com
2014/12/23 
----- Original Message ----- 
From: Mason Sharp 
To: Jov 
Date: 2014-12-23, 00:15:26
Subject: Re: [Postgres-xl-bugs] met a question in cluster installation, Howcan I fix it?






On Mon, Dec 22, 2014 at 5:48 AM, Jov <amutu at amutu.com> wrote:



2014-12-22 17:15 GMT+08:00 郑晓红 <zhengxiaohong at clinkworld.com>:

T


This error means there is no coord node info on datanodes. 
To fix it,you should run create node xx stmts on all datanode too.


I also recommend using the pgxc_ctl utility to configure your cluster, it will save yourself a lot of trouble. The utility is found in the contrib directory.


Regards,


Mason







-- 

Mason Sharp

TransLattice - http://www.translattice.com
Clustered and Distributed Database Solutions 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/private.cgi/postgres-xl-bugs-postgres-xl.org/attachments/20141224/64f511b0/attachment.htm>


More information about the postgres-xl-bugs mailing list