|
From: Koichi S. <ko...@in...> - 2012-09-19 01:29:02
|
Did you do any cleanup for gtm resources? Sorry I wrote a bit late. The message suggests that coordinator/datade attempted to register itself to GTM which has alrady been registered. If you have similar problem, please try to cleanup register.node file at gtm work directory. This should not bring any problem if you stop gtm (and all other nodes) when you cleanup. Regards; --- Koichi Suzuki On Tue, 18 Sep 2012 18:12:34 -0700 Shavais Zarathustra <sh...@gm...> wrote: > Hello, > > I've been using a computer on which gmail was already logged in. I > mistakenly assumed it was logged into my account. Sorry about that. > > The pgxc_node_name setting was set to 'coord1' and 'datanode1' in > data_coord1/postgresql.conf and data_datanode1/postgersql.conf, > respectively. > > I reinitialized the install, as you suggested (except I just shut > everything down, blew away the data_* folders in /usr/local/pgsql, and > reused those instead of using $HOME/pgsql/data_*), and, so far, that seems > to have fixed the problem. (I guess probably those data_* folders should > be under /var somewhere..) > > I'm not sure what the problem was. I think I recall having attempted to > issue a sql command to create a coordinator node, the previous time around. > I notice your steps don't include that step? I wonder if somehow that > affected things? > > The reason I had set the port in datanode1's postgresql.conf was because I > would like to use gtm_ctl and pg_ctl to start up and shutdown, using an > init.d script, (ala service postgresql-xc start / restart / stop) and I > haven't been able to get pg_ctl to pass the port parameter to postgres. > (pg_ctl ... -o -p 15432 doesn't work; apparently I'm misinterpreting the > usage docs). After putting that setting back in again, I'm using gtm_ctl > and pg_ctl to start and stop it all at this point, and it seems to working > fine. > > The pgbench utility wasn't installed, but I finally found it and installed > it. I notice that it somehow left a bunch of idle connection processes > behind after exiting. Would those get reused, or is that a problem with > pgbench? (I restarted postgres-xc and they went away, but. Just > wondering.) > > > Shavais > > On Tue, Sep 18, 2012 at 4:01 PM, Michael Paquier > <mic...@gm...>wrote: > > > Hi, > > > > You were not registered on the general mailing list, so I had to check the > > content of your message manually. > > This explains the delay of your message. > > > > By the way, regarding your message, please see comments below. > > > > On Wed, Sep 19, 2012 at 4:51 AM, Roger Mayes <rog...@gm...>wrote: > > > >> I'm using CentOS 6.3, I've used the "short version" installation to set > >> up a gtm, a single coordinator, and a single data node on my local host. > >> Here are the contents of my pgxc_node table: > >> > >> -bash-4.1$ psql -U postgres > >> psql (PGXC 1.0.1, based on PG 9.1.5) > >> Type "help" for help. > >> 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 > >> datanode1 | D | 15432 | localhost | t | t > >> | 888802358 > >> > > I assume that you used the short install document from here: > > http://postgres-xc.sourceforge.net/docs/1_0/install-short.html > > > > I also imagine that you ran "SELECT pgxc_pool_reload();" after setting the > > datanode on the Coordinator. > > This looks definitely correct. > > > > The problem I'm having is that after maybe 60 to 90 seconds or so after > >> starting, the coordinator dies with a log message like > >> > >> FATAL: Can not register Coordinator on GTM > >> > > This basically means that the Coordinator is trying to register to GTM > > with a node name that is already used by another node. > > What is the value of pgxc_node_name in each node's postgresql.conf? > > > > The gtm is definitely running, I can see it in the process list. The only > >> changes to the default postgresql.conf's I've made is to specify the port > >> of 15432 for datanode1, and (as part of an effort to fix this problem) > >> uncomment the host ('localhost') and port (6666) of the gtm in all 3 > >> postgresql.conf files. > >> > > For a really basic setting, changing the port number of datanode1 is > > enough, as well as specifying the port value with -p at startup. > > The value specified by option -p has higher priority than the value of > > port in postgresql.conf. > > > > > >> Another thing I did to try to fix this was: > >> > >> alter node datanode1 with (primary = true, preferred = true); > >> > > Primary nodes are the nodes used in priority for replicated writes. > > Preferred nodes are the nodes used in priority for replicated reads. So > > changing this setting won't solve anything in your case. > > > > > >> > >> As you can see, that has affected the pgxc_node contents. But that > >> didn't have any impact on this crashing behavior. > >> > >> I tried starting using the method presented in the short version install > >> to start everything, and I also tried starting up like this: > >> > >> gtm_ctl -Z gtm -D data_gtm -l gtm.log start > >> sleep 1 > >> pg_ctl -Z coordinator -D data_coord1 -l coord1.log start > >> sleep 1 > >> pg_ctl -Z datanode -D data_datanode1 -l datanode1.log start > >> > >> ..from the /usr/local/pgsql directory. (I also tried specifying absolute > >> paths.) > >> > > Absolute and non-absolute paths both work, like postgres. > > > > In your case, I suggest to check for the values of pgxc_node_name in > > postgresql.conf. Please be sure that they are set to the same values as > > node_name in pgxc_node. > > What you can also check is the data of the file called register.node in > > the data folder of GTM. The data of this file is binary, but you may be > > able to check the data folders of the nodes registered on GTM even by > > opening the file manually. > > > > Please also try the following thing if problem persists. This simple set > > of commands allows to start a cluster with 1 Coordinator and 1 Datanode: > > mkdir $HOME/pgsql/data_coord1 > > mkdir $HOME/pgsql/data_datanode1 > > mkdir $HOME/pgsql/data_gtm > > initdb -D $HOME/pgsql/data_coord1 --nodename coord1 > > initdb -D $HOME/pgsql/data_datanode1 --nodename datanode1 > > initgtm -D $HOME/pgsql/data_gtm -Z gtm > > gtm -D $HOME/pgsql/data_gtm & > > postgres -X -p 15432 -D $HOME/pgsql/data_datanode1 & > > postgres -C -D $HOME/pgsql/data_coord1 & > > psql -c "CREATE NODE datanode1 WITH (TYPE = 'datanode', PORT = 15432)" > > postgres > > psql -c "SELECT pgxc_pool_reload()" postgres > > createdb test > > psql test > > > > In my case, this works perfectly with XC 1.0.1, even with firewall and > > SELinux in my box. > > > > Then why not testing pgbench? > > pgbench -i test > > pgbench -c 24 -S test > > > > Regards, > > -- > > Michael Paquier > > http://michael.otacoo.com > > > > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > Postgres-xc-general mailing list > > Pos...@li... > > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > > > > |