View Issue Details

IDProjectCategoryView StatusLast Update
0000748Pgpool-IIBugpublic2022-06-28 10:56
Reporterhob007 Assigned Topengbo  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
PlatformLinuxx86 
Product Version4.1.1 
Summary0000748: pgpool udp heartbeat with another randomly port.
DescriptionI am using pgpool with master-slave mode and set the heartbeat port to 25311. But I find there are two heartbeat ports by netstat.
I am confused why there was another randomly port listened by pgpool heartbeat? Why not the port with specficted 25311?


my env with two pgpool node, master-slave mode.

pgpool.conf setting as follow:

---
master_slave_mode = on
master_slave_sub_mode = 'stream'
wd_lifecheck_method = 'heartbeat'
wd_heartbeat_port = 25311
wd_heartbeat_keepalive = 2
wd_heartbeat_deadtime = 30
heartbeat_destination0 = 'my_ip_address'
heartbeat_destination_port0 = 25311
heartbeat_device0 = 'eth0'
Steps To Reproduce1: install pgpool in two nodes (master-slave mode)
2: configue pgpool.conf with heartbeat port and destination port with 25311.
3: "netstat -tunlp |grep pgpool" and find two udp ports listening. one is 25311 and another randomly port
TagsNo tags attached.

Activities

hob007

2022-03-23 18:38

reporter  

netstat.PNG (12,345 bytes)   
netstat.PNG (12,345 bytes)   

pengbo

2022-03-24 11:20

developer   ~0004006

> 3: "netstat -tunlp |grep pgpool" and find two udp ports listening. one is 25311 and another randomly port

It is the correct behavior.
The random port is used by "heartbeat sender" process.

hob007

2022-03-24 17:28

reporter   ~0004007

Got it, Thank you very much!!
It seems that pgpool select a randomly port as socket server port for heartbeat.
By the way, What should I do to specify a port for heartbeat sender to use? Because I want to clarify the ports what be used into network communicate matrix.

pengbo

2022-03-28 14:24

developer   ~0004011

> It seems that pgpool select a randomly port as socket server port for heartbeat.
> By the way, What should I do to specify a port for heartbeat sender to use? Because I want to clarify the ports what be used into network > communicate matrix.

I think it depends on your OS settings.
OS will choose a dynamic port for outgoing requests (ephemeral ports).

You can use "net.ipv4.ip_local_port_range" kernel parameter to change the port range.

administrator

2022-06-02 13:52

administrator   ~0004054

Have you resolved this issue?
May I close this issue?

pengbo

2022-06-28 10:56

developer   ~0004067

No response over two weeks.
Close issue.

Issue History

Date Modified Username Field Change
2022-03-23 18:38 hob007 New Issue
2022-03-23 18:38 hob007 File Added: netstat.PNG
2022-03-24 11:20 pengbo Note Added: 0004006
2022-03-24 11:20 pengbo Assigned To => pengbo
2022-03-24 11:20 pengbo Status new => feedback
2022-03-24 17:28 hob007 Note Added: 0004007
2022-03-24 17:28 hob007 Status feedback => assigned
2022-03-28 14:24 pengbo Note Added: 0004011
2022-03-28 14:24 pengbo Status assigned => feedback
2022-06-02 13:52 administrator Note Added: 0004054
2022-06-28 10:56 pengbo Note Added: 0004067
2022-06-28 10:56 pengbo Status feedback => closed