Respondo entre lineas. On 19 August 2011 11:52, Miguel Angel Hernandez Moreno < miguel.hdz....@gmail.com> wrote:
> > Dudas > > backend_hostname0 = 'nodo1' > nodo1= tu ip o localhost, o servidor principal > > Nodo 1 es el localhost donde esta instalado el pgpool en mi /etc/hosts tengo 127.0.0.1 nodo1 > psql -h nodo1 -p 9999 -U postgres -d postgres > comentas que estas entrando por psql, Cuando entras a nodo1 asi que te > marca el log de pgpool cuando haces un select > a cualquier tabla > Esto lo hago desde el nodo2 o cualquier otra maquina y este es el log. pgpool: 2011-08-19 11:55:18 LOG: pid 11308: statement: RESET ALL pgpool: 2011-08-19 11:55:18 LOG: pid 11308: statement: SET SESSION AUTHORIZATION DEFAULT pgpool: 2011-08-19 12:00:49 LOG: pid 11311: statement: SELECT * from pg_catalog.pg_database ; > Como estas levantando pgpool, > /etc/init.d/pgpool start > para un poco mas de informes leventa el proceso asi y dime que te arroja > cuando aplicas el > ejecrcicio pasado > pgpool -c -n -d > > 2011-08-19 12:05:57 DEBUG: pid 11441: key: listen_addresses 2011-08-19 12:05:57 DEBUG: pid 11441: value: '*' kind: 4 2011-08-19 12:05:57 DEBUG: pid 11441: key: port 2011-08-19 12:05:57 DEBUG: pid 11441: value: 9999 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: pcp_port 2011-08-19 12:05:57 DEBUG: pid 11441: value: 9898 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: socket_dir 2011-08-19 12:05:57 DEBUG: pid 11441: value: '/var/run/postgresql/' kind: 4 2011-08-19 12:05:57 DEBUG: pid 11441: key: pcp_socket_dir 2011-08-19 12:05:57 DEBUG: pid 11441: value: '/var/run/postgresql/' kind: 4 2011-08-19 12:05:57 DEBUG: pid 11441: key: backend_socket_dir 2011-08-19 12:05:57 DEBUG: pid 11441: value: '/var/run/postgresql/' kind: 4 2011-08-19 12:05:57 DEBUG: pid 11441: key: pcp_timeout 2011-08-19 12:05:57 DEBUG: pid 11441: value: 10 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: num_init_children 2011-08-19 12:05:57 DEBUG: pid 11441: value: 32 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: max_pool 2011-08-19 12:05:57 DEBUG: pid 11441: value: 4 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: child_life_time 2011-08-19 12:05:57 DEBUG: pid 11441: value: 300 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: connection_life_time 2011-08-19 12:05:57 DEBUG: pid 11441: value: 0 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: child_max_connections 2011-08-19 12:05:57 DEBUG: pid 11441: value: 0 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: client_idle_limit 2011-08-19 12:05:57 DEBUG: pid 11441: value: 0 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: authentication_timeout 2011-08-19 12:05:57 DEBUG: pid 11441: value: 60 kind: 2 2011-08-19 12:05:57 DEBUG: pid 11441: key: logdir 2011-08-19 12:05:57 DEBUG: pid 11441: value: '/var/run/postgresql/' kind: 4 2011-08-19 12:05:57 DEBUG: pid 11441: key: pid_file_name 2011-08-19 12:05:57 DEBUG: pid 11441: value: '/var/run/postgresql/pgpool.pid' kind: 4 2011-08-19 12:05:57 DEBUG: pid 11441: key: replication_mode 2011-08-19 12:05:57 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:57 DEBUG: pid 11441: key: load_balance_mode 2011-08-19 12:05:57 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:57 DEBUG: pid 11441: key: replication_stop_on_mismatch 2011-08-19 12:05:57 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:57 DEBUG: pid 11441: replication_stop_on_mismatch: 1 2011-08-19 12:05:57 DEBUG: pid 11441: key: replicate_select 2011-08-19 12:05:57 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: replicate_select: 0 2011-08-19 12:05:58 DEBUG: pid 11441: key: reset_query_list 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: extract_string_tokens: token: ABORT 2011-08-19 12:05:58 DEBUG: pid 11441: extract_string_tokens: token: RESET ALL 2011-08-19 12:05:58 DEBUG: pid 11441: extract_string_tokens: token: SET SESSION AUTHORIZATION DEFAULT 2011-08-19 12:05:58 DEBUG: pid 11441: key: print_timestamp 2011-08-19 12:05:58 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: master_slave_mode 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: connection_cache 2011-08-19 12:05:58 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: health_check_timeout 2011-08-19 12:05:58 DEBUG: pid 11441: value: 20 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: health_check_period 2011-08-19 12:05:58 DEBUG: pid 11441: value: 60 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: health_check_user 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'postgres' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: failover_command 2011-08-19 12:05:58 DEBUG: pid 11441: value: '' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: failback_command 2011-08-19 12:05:58 DEBUG: pid 11441: value: '' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: fail_over_on_backend_error 2011-08-19 12:05:58 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: insert_lock 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: ignore_leading_white_space 2011-08-19 12:05:58 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: log_statement 2011-08-19 12:05:58 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: log_per_node_statement 2011-08-19 12:05:58 DEBUG: pid 11441: value: true kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: log_connections 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: log_hostname 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: parallel_mode 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: enable_query_cache 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: pgpool_hostname 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'nodo1' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: system_db_hostname 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'nodo1' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: system_db_port 2011-08-19 12:05:58 DEBUG: pid 11441: value: 5432 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: system_db_dbname 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'pgpool' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: system_db_schema 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'pgpool_catalog' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: system_db_user 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'pgpool' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: system_db_password 2011-08-19 12:05:58 DEBUG: pid 11441: value: '' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_hostname0 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'nodo1' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_port0 2011-08-19 12:05:58 DEBUG: pid 11441: value: 5432 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_weight0 2011-08-19 12:05:58 DEBUG: pid 11441: value: 1 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_data_directory0 2011-08-19 12:05:58 DEBUG: pid 11441: value: '/var/lib/postgresql/8.4/main' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_hostname1 2011-08-19 12:05:58 DEBUG: pid 11441: value: '192.168.4.162' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_port1 2011-08-19 12:05:58 DEBUG: pid 11441: value: 5432 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_weight1 2011-08-19 12:05:58 DEBUG: pid 11441: value: 1 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: backend_data_directory1 2011-08-19 12:05:58 DEBUG: pid 11441: value: '/var/lib/postgresql/8.4/main' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: enable_pool_hba 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: key: recovery_user 2011-08-19 12:05:58 DEBUG: pid 11441: value: 'postgres' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: recovery_password 2011-08-19 12:05:58 DEBUG: pid 11441: value: '' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: recovery_1st_stage_command 2011-08-19 12:05:58 DEBUG: pid 11441: value: '' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: recovery_2nd_stage_command 2011-08-19 12:05:58 DEBUG: pid 11441: value: '' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: recovery_timeout 2011-08-19 12:05:58 DEBUG: pid 11441: value: 90 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: client_idle_limit_in_recovery 2011-08-19 12:05:58 DEBUG: pid 11441: value: 0 kind: 2 2011-08-19 12:05:58 DEBUG: pid 11441: key: lobj_lock_table 2011-08-19 12:05:58 DEBUG: pid 11441: value: '' kind: 4 2011-08-19 12:05:58 DEBUG: pid 11441: key: ssl 2011-08-19 12:05:58 DEBUG: pid 11441: value: false kind: 1 2011-08-19 12:05:58 DEBUG: pid 11441: weight: 1073741823 > Para pruebas y solo para pruebas (ya de rato configuras, sino alvaro me va > a regañar por dar esta sugerencia) el servidor > backend1 con ip 192.168.4.162 en su pg_hba.conf configura en metodo de > autentificacion como trust para la ip del servidor nodo1 > host all all ip_nodo1 trust > > Ok. > repite el ejercico y comenta que resultados te da > > Sigue presentando el mismo log ERROR: pid 8801: connect_unix_domain_socket: connect() failed: No such file or directory ERROR: pid 8801: health check failed. secondary at port 0 is down > > > > 2011/8/19 Jose David Verbel Tous <jver...@solati.com.co> > >> Saludos, >> >> El entorno que estoy configurando es Ubuntu 10.04, pgpool 3.41-2 de los >> repositorios de Ubuntu, PostgreSQL 8.4.8 >> >> >> listen_addresses = '*' >> port = 9999 >> pcp_port = 9898 >> socket_dir = '/var/run/postgresql/' >> pcp_socket_dir = '/var/run/postgresql/' >> backend_socket_dir = '/var/run/postgresql/' >> pcp_timeout = 10 >> num_init_children = 32 >> max_pool = 4 >> child_life_time = 300 >> connection_life_time = 0 >> child_max_connections = 0 >> client_idle_limit = 0 >> authentication_timeout = 60 >> >> logdir = '/var/run/postgresql/' >> >> pid_file_name = '/var/run/postgresql/pgpool.pid' >> >> replication_mode = true >> >> load_balance_mode = true >> >> replication_stop_on_mismatch = true >> >> replicate_select = false >> >> reset_query_list = 'ABORT; RESET ALL; SET SESSION AUTHORIZATION DEFAULT' >> >> print_timestamp = true >> >> master_slave_mode = false >> connection_cache = true >> health_check_timeout = 20 >> >> health_check_period = 60 >> >> health_check_user = 'postgres' >> >> failover_command = '' >> >> failback_command = '' >> >> fail_over_on_backend_error = true >> >> insert_lock = false >> >> ignore_leading_white_space = true >> >> log_statement = true >> >> log_per_node_statement = true >> >> log_connections = false >> >> log_hostname = false >> >> # if non 0, run in parallel query mode >> parallel_mode = false >> >> # if non 0, use query cache >> enable_query_cache = false >> >> #set pgpool2 hostname >> pgpool_hostname = 'nodo1' >> >> # system DB info >> system_db_hostname = 'nodo1' >> system_db_port = 5432 >> system_db_dbname = 'pgpool' >> system_db_schema = 'pgpool_catalog' >> system_db_user = 'pgpool' >> system_db_password = '' >> >> # backend_hostname, backend_port, backend_weight >> >> backend_hostname0 = 'nodo1' >> backend_port0 = 5432 >> backend_weight0 = 1 >> backend_data_directory0 = '/var/lib/postgresql/8.4/main' >> >> backend_hostname1 = '192.168.4.162' >> backend_port1 = 5432 >> backend_weight1 = 1 >> backend_data_directory1 = '/var/lib/postgresql/8.4/main' >> >> enable_pool_hba = false >> recovery_user = 'postgres' >> recovery_password = '' >> recovery_1st_stage_command = '' >> recovery_2nd_stage_command = '' >> recovery_timeout = 90 >> client_idle_limit_in_recovery = 0 >> lobj_lock_table = '' >> ssl = false >> >> >>> 2011/8/19 Jose David Verbel Tous <jver...@solati.com.co> >>> >>>> Saludos, >>>> >>>> >>>> Estoy en proceso de configurar pgpool para replicacion y aunque el >>>> servicio levanta y me puedo conectar usando: psql -hnodo1 -p 9999 -U >>>> postgres -d postgres, el log me muestra esto y no me esta replicando. >>>> >>>> LOG: pid 8801: pgpool successfully started >>>> LOG: pid 8801: starting health checking >>>> ERROR: pid 8801: connect_unix_domain_socket: connect() failed: No such >>>> file or directory >>>> ERROR: pid 8801: health check failed. secondary at port 0 is down >>>> LOG: pid 8801: starting degeneration. shutdown secondary host (0) >>>> LOG: pid 8801: degeneration done. shutdown secondary host (0) >>>> >>>> >>>> Alguna idea de que puede estar mal ? >>>> >>>> >>>> -- >>>> >>>> *Jose David* >>>> >>> >>> >>> >>> -- >>> ISC Miguel Angel Hernandez Moreno >>> >>> >> >> >> -- >> >> *Jose David Verbel Tous* >> > > > > -- > ISC Miguel Angel Hernandez Moreno > > -- *Jose David Verbel Tous* Ingeniero de Desarrollo**** Sol@ti Ltda**** *jver...@solati.com.co <cor...@solati.com.co>* * *+57 4* *2687551**** * *+57 1* *6373721**** Carrera 43 A # 1 sur 220 Of 708, Medellín**** Autopista Norte # 114 - 78 Of 501, Bogotá**** http://www.solati.com.co