[pgpool-general: 4835] Re: Watchdog :DelegateIp concept

Kanak Upadhyay kupadhyay at xavient.com
Tue Aug 2 00:16:57 JST 2016


Hello,

No actually it is 10.5.2.87 only. Just a typo.
The configuration done so far is attached in the mail.

Do we have to give any information of delegate IP in /etc/hosts or hba.conf files?

The logs are:

pgpool[17535]: 2016-08-01 20:38:29: pid 17535: LOG:  watchdog escalation
pgpool[17535]: 2016-08-01 20:38:29: pid 17535: DETAIL:  escalating to master pgpool
pgpool[17535]: SIOCSIFADDR: Operation not permitted
pgpool[17535]: SIOCSIFFLAGS: Operation not permitted
pgpool[17535]: SIOCSIFNETMASK: Operation not permitted
pgpool[17535]: [6-1] 2016-08-01 20:38:29: pid 17535: WARNING:  watchdog failed to bring up delegate IP, 'ifconfig up' failed
pgpool[17535]: 2016-08-01 20:38:29: pid 17535: WARNING:  watchdog failed to bring up delegate IP, 'ifconfig up' failed
pgpool[17535]: [7-1] 2016-08-01 20:38:29: pid 17535: LOG:  watchdog started
pgpool[17535]: 2016-08-01 20:38:29: pid 17535: LOG:  watchdog started
pgpool[17535]: [8-1] 2016-08-01 20:38:29: pid 17535: LOG:  pgpool-II successfully started. version 3.4.3 (tataraboshi)
pgpool[17535]: 2016-08-01 20:38:29: pid 17535: LOG:  pgpool-II successfully started. version 3.4.3 (tataraboshi)
pgpool[17535]: [9-1] 2016-08-01 20:38:29: pid 17535: LOG:  find_primary_node: checking backend no 0
pgpool[17535]: [9-2]
pgpool[17535]: 2016-08-01 20:38:29: pid 17535: LOG:  find_primary_node: checking backend no 0
pgpool[17535]: #011
pgpool[17535]: [10-1] 2016-08-01 20:38:29: pid 17535: LOG:  find_primary_node: primary node id is 0
pgpool[17535]: 2016-08-01 20:38:29: pid 17535: LOG:  find_primary_node: primary node id is 0
pgpool[17553]: [8-1] 2016-08-01 20:38:30: pid 17553: LOG:  set SO_REUSEPORT option to the socket
pgpool[17552]: [8-1] 2016-08-01 20:38:30: pid 17552: LOG:  set SO_REUSEPORT option to the socket
pgpool[17535]: 2016-08-01 20:38:30: pid 17552: LOG:  set SO_REUSEPORT option to the socket
pgpool[17552]: [9-1] 2016-08-01 20:38:30: pid 17552: LOG:  creating watchdog heartbeat receive socket.
pgpool[17552]: [9-2] 2016-08-01 20:38:30: pid 17552: DETAIL:  set SO_REUSEPORT
pgpool[17535]: 2016-08-01 20:38:30: pid 17552: LOG:  creating watchdog heartbeat receive socket.
pgpool[17535]: 2016-08-01 20:38:30: pid 17552: DETAIL:  set SO_REUSEPORT
pgpool[17535]: 2016-08-01 20:38:30: pid 17553: LOG:  set SO_REUSEPORT option to the socket
pgpool[17553]: [9-1] 2016-08-01 20:38:30: pid 17553: LOG:  creating socket for sending heartbeat
pgpool[17553]: [9-2] 2016-08-01 20:38:30: pid 17553: DETAIL:  set SO_REUSEPORT
pgpool[17535]: 2016-08-01 20:38:30: pid 17553: LOG:  creating socket for sending heartbeat

Thanks and Regards,
Kanak Upadhyay
Xavient Information Systems

From: Muhammad Usama [mailto:m.usama at gmail.com]
Sent: Monday, August 01, 2016 8:28 PM
To: Kanak Upadhyay
Cc: pgpool-general at pgpool.net
Subject: Re: [pgpool-general: 4831] Watchdog :DelegateIp concept

The logs does not contains the part where watchdog acquires the VIP, So not sure. Can you share the complete log along with the pgpool.conf file.
When the delegate IP is brought up successfully you will be able to connect to pgpool-II using the delegate IP. I notice that you mentioned that your delegate IP is  10.5.3.87 while you are connecting to 10.5.2.87, so if its not a type then it might be a reason of connection failure.

Regards
Muhammad Usama


On Mon, Aug 1, 2016 at 7:49 PM, Kanak Upadhyay <kupadhyay at xavient.com<mailto:kupadhyay at xavient.com>> wrote:
Hi,
Thanks Usama
These are the logs from the master:
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16103: LOG:  set SO_REUSEPORT option to the socket
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16103: LOG:  creating watchdog heartbeat receiv
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16103: DETAIL:  set SO_REUSEPORT
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16103: LOG:  creating watchdog heartbeat receive socke
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16103: DETAIL:  set SO_REUSEPORT
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16104: LOG:  set SO_REUSEPORT option to the socket
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16104: LOG:  creating socket for sending heartb
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16104: DETAIL:  set SO_REUSEPORT
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16104: LOG:  creating socket for sending heartbeat
Aug 01 20:08:35 2016-08-01 20:08:35: pid 16104: DETAIL:  set SO_REUSEPORT

These are the logs from the slave:
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  Setting up socket for 0.0.0.0:9999<http://0.0.0.0:9999>
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  Setting up socket for :::9999
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  Setting up socket for :::9999
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  pgpool-II successfully started. vers
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  pgpool-II successfully started. version 3.
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  find_primary_node: checking backend
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  find_primary_node: checking backend no 0
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  find_primary_node: primary node id i
Aug 01 19:51:04 2016-08-01 19:51:04: pid 16678: LOG:  find_primary_node: primary node id is 0
Aug 01 20:05:54 Started pgpool-II.

Is it mean that watchodog functionality is working properly?
Though in pgAdmin I can see that


IP Address

Port (pgpool-II)

Port (Watchdog)

Status

local

10.5.3.84

9999

9000

MASTER

other 0

10.5.2.166

9999

9000

INIT



Virtual Ip: 10.5.3.87

The other thing I wanted to know is when I am connecting to the delegate IP to access the database.
I am getting this. If we have to put the delegate IP in the conf file then why is it not accepting the conncetions?

root at DB:/etc/pgpool2# psql -h 10.5.2.87 -p 9999
psql: could not connect to server: No route to host
        Is the server running on host "10.5.2.87" and accepting
        TCP/IP connections on port 9999?



Thanks and Regards,
Kanak Upadhyay
Xavient Information Systems

From: Muhammad Usama [mailto:m.usama at gmail.com<mailto:m.usama at gmail.com>]
Sent: Monday, August 01, 2016 8:00 PM
To: Kanak Upadhyay
Cc: pgpool-general at pgpool.net<mailto:pgpool-general at pgpool.net>
Subject: Re: [pgpool-general: 4831] Watchdog :DelegateIp concept



On Mon, Aug 1, 2016 at 6:01 PM, Kanak Upadhyay <kupadhyay at xavient.com<mailto:kupadhyay at xavient.com>> wrote:

Hi,
I have installed pgpool2 3.4 with postgresql 9.5 in Ubuntu.
Now I am proceeding with pgpool2 watchdog functionality.
It says that we have to put a delegate IP in the configuration file of Pgpool2. Do we have to hardcode the delegate IP in both the servers (MASTER-slave) by giving it in the /etc/network/interface file?
Or it should be only present in the conf file of both the servers.


You just need to put the delegate_ip in pgpool.conf file for all servers (Master and Slave), and pgpool-II will use the if_up_cmd, if_down_cmd, and arping_cmd ( also configured through the pgpool.conf file) to acquire and release the delegate IP at the time of watchdog escalation and  de-escalation


Thanks and Regards,
Kanak Upadhyay
Xavient Information Systems

***DISCLAIMER*** This communication & accompanying documents ("this e-mail") contains confidential and/or privileged information for exclusive use of the individual to whom it is addressed. If you are not the intended recipient, please immediately notify the company & delete this e-mail. Any unauthorized use or disclosure of this e-mail is strictly prohibited. Representations in this e-mail are subject to contract. As an e-mail user please be cautious of the technical & other vulnerabilities of the internet which may result in malicious and/or unauthorized access to / use / alteration of e-mails/e-mail IDs. Thank you.

_______________________________________________
pgpool-general mailing list
pgpool-general at pgpool.net<mailto:pgpool-general at pgpool.net>
http://www.pgpool.net/mailman/listinfo/pgpool-general

***DISCLAIMER*** This communication & accompanying documents ("this e-mail") contains confidential and/or privileged information for exclusive use of the individual to whom it is addressed. If you are not the intended recipient, please immediately notify the company & delete this e-mail. Any unauthorized use or disclosure of this e-mail is strictly prohibited. Representations in this e-mail are subject to contract. As an e-mail user please be cautious of the technical & other vulnerabilities of the internet which may result in malicious and/or unauthorized access to / use / alteration of e-mails/e-mail IDs. Thank you.

***DISCLAIMER*** This communication & accompanying documents ("this e-mail") contains confidential and/or privileged information for exclusive use of the individual to whom it is addressed. If you are not the intended recipient, please immediately notify the company & delete this e-mail. Any unauthorized use or disclosure of this e-mail is strictly prohibited. Representations in this e-mail are subject to contract. As an e-mail user please be cautious of the technical & other vulnerabilities of the internet which may result in malicious and/or unauthorized access to / use / alteration of e-mails/e-mail IDs. Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160801/7a06b49b/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgpool.zip
Type: application/x-zip-compressed
Size: 6738 bytes
Desc: pgpool.zip
URL: <http://www.sraoss.jp/pipermail/pgpool-general/attachments/20160801/7a06b49b/attachment-0001.bin>


More information about the pgpool-general mailing list