From: West, W. <ww...@uc...> - 2013-08-16 23:42:45
|
Hi all, I have been trying for the last week to install postgresql-xc on 2 VMs I have. Based on what I have read, I am setting a a GTM, coordinator and datanode on one VM and a coordinator and datanode on the other VM. The instructions are pretty straight forward for a single node and I was successful at getting it up an running. Now with services running on both nodes I am receiving this error on each node: psql: FATAL: Coordinator cannot identify itself So, two questions. 1. Does anyone know what is causing the error? 2. I am guessing that in the many conf files that need to be configured, I have missed something. My reading of the documentation suggest that changes to the postgres.conf and pg_hba.conf should be enough to do the trick but I suspect this is wrong for more complicated layouts (clusters with 1+n nodes). Is there any more comprehensive documentation for all the required setting in the various conf files/directories for larger scale deployments? Thanks, Bill West |
From: Michael P. <mic...@gm...> - 2013-08-19 01:50:39
|
On Sat, Aug 17, 2013 at 8:42 AM, West, William <ww...@uc...> wrote: > Hi all, > > I have been trying for the last week to install postgresql-xc on 2 VMs I > have. Based on what I have read, I am setting a a GTM, coordinator and > datanode on one VM and a coordinator and datanode on the other VM. The > instructions are pretty straight forward for a single node and I was > successful at getting it up an running. Now with services running on both > nodes I am receiving this error on each node: > > psql: FATAL: Coordinator cannot identify itself > > So, two questions. 1. Does anyone know what is causing the error? 2. I am > guessing that in the many conf files that need to be configured, I have > missed something. My reading of the documentation suggest that changes to > the postgres.conf and pg_hba.conf should be enough to do the trick but I > suspect this is wrong for more complicated layouts (clusters with 1+n > nodes). Is there any more comprehensive documentation for all the required > setting in the various conf files/directories for larger scale deployments? Something incorrect with node_name perhaps? On the top of my mind, the error you are finding means that a given Coordinator is not able to find its own name defined by the GUC parameter in pgxc_node. The value name of this parameter is enforced by initdb. -- Michael |
From: West, W. <ww...@uc...> - 2013-08-20 00:17:55
|
Thanks Michael, That was the problem. One of the coordinators was misnamed in the conf file. This is fixed now and I am running a server on two different Vms. I am still having an issue where these servers are not communicating with one another. I am getting this error only when attempting to run CREATE TABLE DML statements: ERROR: Failed to get pooled connections Queries and CREATE NODE DML statements work fine. The configuration looks like this VM 1 = 1 GTM, 1 Coordinator, 1 DataNode (Primary, Preferred) - VM 2 = 1 Coordinator, 1 Datanode (Preferred). Does this error indicate any configuration setting that might be off? Thanks, Bill West On 8/18/13 6:50 PM, "Michael Paquier" <mic...@gm...> wrote: >On Sat, Aug 17, 2013 at 8:42 AM, West, William <ww...@uc...> wrote: >> Hi all, >> >> I have been trying for the last week to install postgresql-xc on 2 VMs I >> have. Based on what I have read, I am setting a a GTM, coordinator and >> datanode on one VM and a coordinator and datanode on the other VM. The >> instructions are pretty straight forward for a single node and I was >> successful at getting it up an running. Now with services running on >>both >> nodes I am receiving this error on each node: >> >> psql: FATAL: Coordinator cannot identify itself >> >> So, two questions. 1. Does anyone know what is causing the error? 2. I >>am >> guessing that in the many conf files that need to be configured, I have >> missed something. My reading of the documentation suggest that changes >>to >> the postgres.conf and pg_hba.conf should be enough to do the trick but I >> suspect this is wrong for more complicated layouts (clusters with 1+n >> nodes). Is there any more comprehensive documentation for all the >>required >> setting in the various conf files/directories for larger scale >>deployments? >Something incorrect with node_name perhaps? On the top of my mind, the >error you are finding means that a given Coordinator is not able to >find its own name defined by the GUC parameter in pgxc_node. The value >name of this parameter is enforced by initdb. >-- >Michael |
From: Michael P. <mic...@gm...> - 2013-08-20 01:29:01
|
On Tue, Aug 20, 2013 at 9:17 AM, West, William <ww...@uc...> wrote: > ERROR: Failed to get pooled connections > > Queries and CREATE NODE DML statements work fine. > > The configuration looks like this VM 1 = 1 GTM, 1 Coordinator, 1 DataNode > (Primary, Preferred) - VM 2 = 1 Coordinator, 1 Datanode (Preferred). > Does this error indicate any configuration setting that might be off? Check that the content on pgxc_node is correct on each Coordinator and be sure to have run SELECT pgxc_pool_reload() on each Coordinator. Regards, -- Michael |
From: West, W. <ww...@uc...> - 2013-08-20 17:09:57
|
Thanks Michael, The value for coord1 is: pgxc_node_name = 'coord1' and for coord2 it is: pgxc_node_name = 'coord2' When I run the function to reload the pool I get the following results on both nodes: postgres=# SELECT pgxc_pool_reload(); pgxc_pool_reload ------------------ t (1 row) Here are the nodes setup in each VM database: VM1: postgres=# select * from pgxc_node; node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -----------+-----------+-----------+--------------------+----------------+- -----------------+------------- coord1 | C | 5432 | localhost | f | f | 1885696643 coord2 | C | 5432 | bigonc-db.sdsc.edu | f | f | -1197102633 data1 | D | 15432 | localhost | t | t | -1008673296 data2 | D | 15432 | bigonc-db.sdsc.edu | f | t | -1370618993 (4 rows) VM2: node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferred | node_id -----------+-----------+-----------+-----------------+----------------+---- --------------+------------- coord2 | C | 5432 | localhost | f | f | -1197102633 coord1 | C | 5432 | bigonc.sdsc.edu | f | f | 1885696643 data2 | D | 15432 | localhost | f | t | -1370618993 data1 | D | 15432 | bigonc.sdsc.edu | t | t | -1008673296 (4 rows) However I still get the following error using the CREATE TABLE statement: ERROR: Failed to get pooled connections SQL state: 53000 Do you have any other ideas on which configuration might be incorrect? Is there any setting for pooled connections I might have missed (I didn't see this in the documentation but I am thinking there is something set incorrectly regarding this) Thanks again, Bill West On 8/19/13 6:28 PM, "Michael Paquier" <mic...@gm...> wrote: >On Tue, Aug 20, 2013 at 9:17 AM, West, William <ww...@uc...> wrote: >> ERROR: Failed to get pooled connections >> >> Queries and CREATE NODE DML statements work fine. >> >> The configuration looks like this VM 1 = 1 GTM, 1 Coordinator, 1 >>DataNode >> (Primary, Preferred) - VM 2 = 1 Coordinator, 1 Datanode (Preferred). >> Does this error indicate any configuration setting that might be off? >Check that the content on pgxc_node is correct on each Coordinator and >be sure to have run SELECT pgxc_pool_reload() on each Coordinator. > >Regards, >-- >Michael |
From: Michael P. <mic...@gm...> - 2013-08-20 23:24:09
|
On Wed, Aug 21, 2013 at 2:09 AM, West, William <ww...@uc...> wrote: > Thanks Michael, > > The value for coord1 is: pgxc_node_name = 'coord1' and for coord2 it is: > pgxc_node_name = 'coord2' > > When I run the function to reload the pool I get the following results on > both nodes: > > postgres=# SELECT pgxc_pool_reload(); > pgxc_pool_reload > ------------------ > t > (1 row) > > Here are the nodes setup in each VM database: > > > VM1: > > postgres=# select * from pgxc_node; > node_name | node_type | node_port | node_host | nodeis_primary | > nodeis_preferred | node_id > -----------+-----------+-----------+--------------------+----------------+- > -----------------+------------- > coord1 | C | 5432 | localhost | f | > f | 1885696643 > coord2 | C | 5432 | bigonc-db.sdsc.edu | f | > f | -1197102633 > data1 | D | 15432 | localhost | t | > t | -1008673296 > data2 | D | 15432 | bigonc-db.sdsc.edu | f | > t | -1370618993 > (4 rows) > > > > VM2: > > node_name | node_type | node_port | node_host | nodeis_primary | > nodeis_preferred | node_id > -----------+-----------+-----------+-----------------+----------------+---- > --------------+------------- > coord2 | C | 5432 | localhost | f | f > | -1197102633 > coord1 | C | 5432 | bigonc.sdsc.edu | f | f > | 1885696643 > data2 | D | 15432 | localhost | f | t > | -1370618993 > data1 | D | 15432 | bigonc.sdsc.edu | t | t > | -1008673296 > (4 rows) > > However I still get the following error using the CREATE TABLE statement: > > > ERROR: Failed to get pooled connections > SQL state: 53000 > > > > Do you have any other ideas on which configuration might be incorrect? Is > there any setting for pooled connections I might have missed (I didn't see > this in the documentation but I am thinking there is something set > incorrectly regarding this) OK. Can you run EXECUTE DIRECT when connecting on a Coordinator to a remote node? http://postgres-xc.sourceforge.net/docs/1_1/sql-executedirect.html (Take care grammar has changed a bit between 1.0 and 1.1 to fit with support of ALTER TABLE for data redistribution). With your problem you shouldn't be able to connect to them, so there are two possibilities: 1) Did you set up pg_hba.conf to allow connections from remote nodes? 2) Disable firewalls and retry, connections might be stopped because of that. Regards, -- Michael |
From: Michael P. <mic...@gm...> - 2013-08-21 00:10:03
|
On Wed, Aug 21, 2013 at 9:05 AM, West, William <ww...@uc...> wrote: > Michael, > > I ran the following query successfully on a remote node coord2 from node > coord1: > > postgres=# EXECUTE DIRECT on coord2 'select clock_timestamp()'; > clock_timestamp > ------------------------------- > 2013-08-20 16:42:16.647818-07 > (1 row) > > And the reverse works as well > > postgres=# EXECUTE DIRECT on coord2 'select clock_timestamp()'; > clock_timestamp > ------------------------------- > 2013-08-20 16:50:25.552218-07 > (1 row) > > > > So they are capable of communication. Does this give you an idea of why > can't I do DML statements across nodes? Did you try to the Datanodes? -- Michael |
From: Michael P. <mic...@gm...> - 2013-08-21 01:05:28
|
(Re-adding pgxc-hackers in cc...) On Wed, Aug 21, 2013 at 9:38 AM, West, William <ww...@uc...> wrote: > This is the result from datanode data1: > > postgres'# execute direct on data2 'select clock_timestamp()'; Datanodes are not able to connect between each other, please connect to a Coordinator and run the following: execute direct on data2 'select 1'; execute direct on data1 'select 1'; > > It returned no result. > > On datanode data2 this was the output: > > postgres=# execute direct on data1 'select clock_timestamp()'; > ERROR: Failed to get pooled connections This is the origin of your problem. You cannot connect to Datanode 1. -- Michael |