From: Juned K. <jkh...@gm...> - 2014-03-15 07:42:51
|
Hi koichi,zhangzl Thanks for your suggestions. So i have to connect my application to directly one of coordinator right. I thought i have to connect my application to GTM from where my application will use one of available coordinator. In this case if i connect my application to connect specific coordinator using port then what will happen if that coordinator goes down ? in the case of GTM when i execute simply Psql -dkoichi then it selects available coordinator automatically, this is not possible to setup with application? if i am able to connect my application to directly GTM and then it will select any of available coordinator. Please suggest. On Sat, Mar 15, 2014 at 4:59 AM, 张仲良 <zh...@li...> wrote: > Use h instead of H; > > Maybe you should check your pg_hba.conf file if you still cannot connect > to it. > > > > *发件人:* Juned Khan [mailto:jkh...@gm...] > *发送时间:* 2014年3月14日 20:11 > *收件人:* Postgres-XC mailing list > *主题:* [Postgres-xc-general] Where to connect to communicate pgxc with > Application > > > > Hi all, > > I have just setup postgre-xc with four servers for testing. > > with this four system from GTM server i am able to connect > > to database and it selects one of coordinator,. it just works fine. > > But now i want to integrate this with my application where application > > is on separate server. > > so in this case where to connect in pgxc ? > > which IP and port i should set in my application to communicate with it? > > From some documentation i came to know i should connect to coordinator > > but from other system i am not able connect to the database. i am getting > this > > > > [postgres@localhost ~]$ psql -H 192.168.1.73 -U postgres -d dbname -p > 20004 > psql: warning: extra command-line argument "192.168.1.73" ignored > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.20004"? > > > > > > But on this server seems socket port is open > > [root@localhost ~]# netstat -pan | grep postgre > tcp 0 0 0.0.0.0:20004 0.0.0.0:* > LISTEN 9454/postgres > tcp 0 0 0.0.0.0:20008 0.0.0.0:* > LISTEN 9522/postgres > tcp 0 0 192.168.1.73:20008 192.168.1.73:33950 > ESTABLISHED 10025/postgres > tcp 0 0 192.168.1.73:33950 192.168.1.73:20008 > ESTABLISHED 9459/postgres > tcp 0 0 192.168.1.73:35014 192.168.1.73:20001 > ESTABLISHED 9522/postgres > tcp 0 0 192.168.1.73:35006 192.168.1.73:20001 > ESTABLISHED 9454/postgres > tcp 0 0 192.168.1.73:57794 192.168.1.43:20009 > ESTABLISHED 9459/postgres > tcp 0 0 :::20004 > :::* LISTEN 9454/postgres > tcp 0 0 :::20008 > :::* LISTEN 9522/postgres > udp 0 0 ::1:60142 > ::1:60142 ESTABLISHED 9522/postgres > udp 0 0 ::1:59683 > ::1:59683 ESTABLISHED 9454/postgres > unix 2 [ ACC ] STREAM LISTENING 84606 > 9454/postgres /tmp/.s.PGSQL.20004 > unix 2 [ ACC ] STREAM LISTENING 84641 > 9459/postgres /tmp/.s.PGPOOL.20010 > unix 2 [ ACC ] STREAM LISTENING 85268 > 9522/postgres /tmp/.s.PGSQL.20008 > > > > am i doing correct ? > > Please suggest. > > > > -- > > Thanks, > Juned Khan > iNextrix Technologies Pvt Ltd. > www.inextrix.com > -- Thanks, Juned Khan iNextrix Technologies Pvt Ltd. www.inextrix.com |