|
From: 张紫宇 <zha...@gm...> - 2014-04-25 06:55:09
|
I installed pgxc 1.2.1 and I wanted to start gtm and gtm_proxy on the same sever, but gtm_proxy didn't work. I did it as such: sudo su mkdir /usr/local/pgsql/data_gtm mkdir /usr/local/pgsql/data_gtm_proxy chown l /usr/local/pgsql/data_gtm chown l /usr/local/pgsql/data_gtm_proxy su l initgtm -Z gtm -D /usr/local/pgsql/data_gtm initgtm -Z gtm_proxy -D /usr/local/pgsql/data_gtm_proxy gtm -D /usr/local/pgsql/data_gtm & gtm_proxy -D /usr/local/pgsql/data_gtm_proxy On the last step,it returns CST -FATAL: can not connect to GTM LOCATION: ConnectGTM, proxy_main.c:3344. I followed it in the gtm_proxy,I found errorno 111 which means Connection refused in function connectFailureMessage in GTMPQconnectPoll in connectGTMStart in PQconnectGTMStart in PQconnectGTM in ConnectGTM in RegisterProxy in BaseInit in main. My os is ubuntu 12.04 amd64 and I also tested it on centos 6.I also installed pgxc 1.2.1 on both of them. But they all get the same error.I found a mail "http://sourceforge.net/p/postgres-xc/mailman/message/30755193/", we are exactly the same. I followed and tried each every pages on net, but still can't solve it. Can you please tell me what I can do? Any help here would be really appreciated. gtm.conf and gtm_proxy.conf come as follow: gtm.conf: # ---------------------- # GTM configuration file # ---------------------- # # This file must be placed on gtm working directory # specified by -D command line option of gtm or gtm_ctl. The # configuration file name must be "gtm.conf" # # # This file consists of lines of the form # # name = value # # (The "=" is optional.) Whitespace may be used. Comments are # introduced with "#" anywhere on a line. The complete list of # parameter names and allowed values can be found in the # Postgres-XC documentation. # # The commented-out settings shown in this file represent the default # values. # # Re-commenting a setting is NOT sufficient to revert it to the default # value. # # You need to restart the server. #------------------------------------------------------------------------------ # GENERAL PARAMETERS #------------------------------------------------------------------------------ nodename = 'one' # Specifies the node name. # (changes requires restart) #listen_addresses = '*' # Listen addresses of this GTM. # (changes requires restart) port = 6666 # Port number of this GTM. # (changes requires restart) #startup = ACT # Start mode. ACT/STANDBY. #------------------------------------------------------------------------------ # GTM STANDBY PARAMETERS #------------------------------------------------------------------------------ #Those parameters are effective when GTM is activated as a standby server #active_host = '' # Listen address of active GTM. # (changes requires restart) #active_port = # Port number of active GTM. # (changes requires restart) #--------------------------------------- # OTHER OPTIONS #--------------------------------------- #keepalives_idle = 0 # Keepalives_idle parameter. #keepalives_interval = 0 # Keepalives_interval parameter. #keepalives_count = 0 # Keepalives_count internal parameter. #log_file = 'gtm.log' # Log file name #log_min_messages = WARNING # log_min_messages. Default WARNING. # Valid value: DEBUG, DEBUG5, DEBUG4, DEBUG3, # DEBUG2, DEBUG1, INFO, NOTICE, WARNING, # ERROR, LOG, FATAL, PANIC #synchronous_backup = off # If backup to standby is synchronous gtm_proxy.conf: #----------------------------- # GTM Proxy configuration file #----------------------------- # # This file must be placed on gtm working directory # specified by -D command line option of gtm_proxy or gtm_ctl. # The configuration file name must be "gtm_proxy.conf" # # # This file consists of lines of the form # # name = value # # (The "=" is optional.) Whitespace may be used. Comments are # introduced with "#" anywhere on a line. The complete list of # parameter names and allowed values can be found in the # Postgres-XC documentation. # # The commented-out settings shown in this file represent the default # values. # # Re-commenting a setting is NOT sufficient to revert it to the default # value. # # You need to restart the server. #------------------------------------------------------------------------------ # GENERAL PARAMETERS #------------------------------------------------------------------------------ nodename = 'one' # Specifies the node name. # (changes requires restart) #listen_addresses = '*' # Listen addresses of this GTM. # (changes requires restart) port = 6666 # Port number of this GTM. # (changes requires restart) #------------------------------------------------------------------------------ # GTM PROXY PARAMETERS #------------------------------------------------------------------------------ #worker_threads = 1 # Number of the worker thread of this # GTM proxy # (changes requires restart) #------------------------------------------------------------------------------ # GTM CONNECTION PARAMETERS #------------------------------------------------------------------------------ # Those parameters are used to connect to a GTM server gtm_host = 'localhost' # Listen address of the active GTM. # (changes requires restart) gtm_port = 6668 # Port number of the active GTM. # (changes requires restart) #------------------------------------------------------------------------------ # Behavior at GTM communication error #------------------------------------------------------------------------------ #gtm_connect_retry_interval = 0 # How long (in secs) to wait until the next # retry to connect to GTM. # # #------------------------------------------------------------------------------ # Other options #------------------------------------------------------------------------------ #keepalives_idle = 0 # Keepalives_idle parameter. #keepalives_interval = 0 # Keepalives_interval parameter. #keepalives_count = 0 # Keepalives_count internal parameter. #log_file = 'gtm_proxy.log' # Log file name #log_min_messages = WARNING # log_min_messages. Default WARNING. # Valid value: DEBUG, DEBUG5, DEBUG4, DEBUG3, # DEBUG2, DEBUG1, INFO, NOTICE, WARNING, # ERROR, LOG, FATAL, PANIC. --Ronian |