[pgpool-general: 1347] Re: [PgpoolI 3.2.1] Watchdog: delegate_IP not bind by pgpool.

Wolf Schwurack wolf at uen.org
Mon Jan 28 23:26:01 JST 2013


My setup I have 2 pgpool servers and master/slave postgres servers.  Are you running pgpool on the same server as postgres? You may want to try opening to all with the listen_addresses first and leave wd_hostname blank to see if that will work

Here's the info on my pgpool.conf

listen_addresses = '*'  --  open to all
 port = 9999

 pcp_port = 9898

 backend_hostname0 = 'pgtest'    -- postgres server
 backend_port0 = 5432
 backend_weight0 = 1
 backend_data_directory0 = '/data'
 backend_flag0 = 'ALLOW_TO_FAILOVER'
 backend_hostname1 = 'pgtest2'  -- postgres server
 backend_port1 = 5432
 backend_weight1 = 1
 backend_data_directory1 = '/data'
 backend_flag1 = 'ALLOW_TO_FAILOVER'

 connection_cache = on
 load_balance_mode = on

 use_watchdog = on
 trusted_servers = ''
 delegate_IP = '10.10.0.20'  -- watchdog ip
 wd_hostname = ' '
 wd_port = 9000
 wd_interval = 10

Wolf

-----Original Message-----
From: pgpool-general-bounces at pgpool.net [mailto:pgpool-general-bounces at pgpool.net] On Behalf Of Thomas Martin
Sent: Monday, January 28, 2013 6:16 AM
To: pgpool-general at pgpool.net
Subject: [pgpool-general: 1346] [PgpoolI 3.2.1] Watchdog: delegate_IP not bind by pgpool.

Hello everyone.

I guess I'm having an issue with watchdog.
Here is the thing: the delegate_IP configured is not bind by pgpool (but mount correctly by watchdog).

I read the documentation
(http://www.pgpool.net/docs/pgpool-II-3.2.1/pgpool-en.html#watchdog)
and the tutorial
(http://www.pgpool.net/pgpool-web/contrib_docs/watchdog/en.html) but I can't figure out what I'm missing.

I have two nodes: 10.59.10.65 and 10.59.10.66 (the delegate IP is 10.59.10.67).
Here is my configuration on the first node (10.59.10.65):
 listen_addresses = '10.59.10.65'
 port = 5432

 pcp_port = 9898

 backend_hostname0 = '10.59.10.65'
 backend_port0 = 15432
 backend_weight0 = 1
 backend_data_directory0 = '/data'
 backend_flag0 = 'ALLOW_TO_FAILOVER'
 backend_hostname1 = '10.59.10.66'
 backend_port1 = 15432
 backend_weight1 = 1
 backend_data_directory1 = '/data'
 backend_flag1 = 'ALLOW_TO_FAILOVER'

 connection_cache = on
 load_balance_mode = on

 use_watchdog = on
 trusted_servers = ''
 delegate_IP = '10.59.10.67'
 wd_hostname = '10.59.10.65'
 wd_port = 9000
 wd_interval = 10

And here is my logs when I start the pgpool:
root at pgpool2-1:/etc/itf-pgpool-ii# /usr/bin/itf/postgres/pgpool -n
2013-01-28 13:03:15 LOG:   pid 3608: wd_chk_sticky:
ifup[/sbin/ifconfig] doesn't have sticky bit
2013-01-28 13:03:15 LOG:   pid 3608: wd_create_send_socket: connect()
reports failure (Connection refused). You can safely ignore this while starting up.
2013-01-28 13:03:18 LOG:   pid 3608: wd_escalation: escalated to master pgpool
2013-01-28 13:03:18 LOG:   pid 3608: wd_create_send_socket: connect()
reports failure (Connection refused). You can safely ignore this while starting up.
2013-01-28 13:03:18 LOG:   pid 3608: wd_escalation:  escaleted to
delegate_IP holder
2013-01-28 13:03:18 LOG:   pid 3608: wd_init: start watchdog
2013-01-28 13:03:18 LOG:   pid 3608: pgpool-II successfully started.
version 3.2.1 (namameboshi)
2013-01-28 13:03:19 LOG:   pid 3625: connection received:
host=10.59.10.65 port=42060


The ip is correctly mounted:
root at pgpool2-1:~# ifconfig eth0:0
eth0:0    Link encap:Ethernet  HWaddr 00:16:3e:27:bd:89
          inet addr:10.59.10.67  Bcast:10.59.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:245


But nothing bind it:
root at pgpool2-1:~# netstat -lnp|grep -E "pgpool|watchdog|10.59.10.67"
tcp        0      0 10.59.10.65:5432        0.0.0.0:*
LISTEN      3608/pgpool
tcp        0      0 0.0.0.0:9000            0.0.0.0:*
LISTEN      3613/pgpool: watchd
tcp        0      0 0.0.0.0:9898            0.0.0.0:*
LISTEN      3608/pgpool
unix  2      [ ACC ]     STREAM     LISTENING     20995    3608/pgpool
        /tmp/.s.PGSQL.5432
unix  2      [ ACC ]     STREAM     LISTENING     21023    3608/pgpool
        /tmp/.s.PGSQL.9898


I guess I just misunderstood how watchdog works !?
How am I supposed to have the pgpool binding 10.59.10.67 ? Does I have to make an iptables rules ?


Thanks.
_______________________________________________
pgpool-general mailing list
pgpool-general at pgpool.net
http://www.pgpool.net/mailman/listinfo/pgpool-general


More information about the pgpool-general mailing list