View Issue Details

IDProjectCategoryView StatusLast Update
0000621Pgpool-II[All Projects] Generalpublic2020-07-27 12:08
ReportergdedeogluAssigned Topengbo 
PrioritynormalSeverityblockReproducibilityalways
Status feedbackResolutionopen 
Product Version4.1.2 
Target VersionFixed in Version 
Summary0000621: pgpool does not start beacuse of "failed to create INET domain socket" error message
DescriptionWhen I try to start pgpool service using pgpool -x -d command. Firstly I faced the same error after "pool_discard_oid_maps: discarded memqcache oid maps" step. I solved this problem by changing the port value from 9999 to 10000. After that, I faced the following error message when I run that command in the second try.

Jun 19 15:05:12 pgpool[56609]: [30-1] 2020-06-19 15:05:12: pid 56609: FATAL: failed to create INET domain socket
Jun 19 15:05:12 pgpool[56609]: [30-2] 2020-06-19 15:05:12: pid 56609: DETAIL: bind on host:"0.0.0.0" server:"monkeycom" failed with error "Address already in use"

You could see the changed pgpool.conf parameters with their values and pgpool service logs on the additional information section.

Could you please help me with solving this problem?

Thanks in advance.
Additional Information----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
pgpool.conf parameters with their values
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
listen_addresses = '*'
port = 10000

sr_check_user = 'pgpool'
sr_check_password = ''

health_check_period = 5
health_check_timeout = 30
health_check_user = 'pgpool'
health_check_password = ''
health_check_max_retries = 3

backend_hostname0 = '192.168.x.y'
backend_port0 = 5432
backend_weight0 = 1
backend_data_directory0 = '/data'
backend_flag0 = 'ALLOW_TO_FAILOVER'

backend_hostname1 = '192.168.x.y+1'
backend_port1 = 5432
backend_weight1 = 1
backend_data_directory1 = '/data'
backend_flag1 = 'ALLOW_TO_FAILOVER'

failover_command = '/etc/pgpool-II/failover.sh %d %h %p %D %m %H %M %P %r %R %N %S'
follow_master_command = '/etc/pgpool-II/follow_master.sh %d %h %p %D %m %H %M %P %r %R'

log_destination = 'syslog'
syslog_facility = 'LOCAL1'

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Log Info
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Jun 19 15:05:12 pgpool[56608]: [1-1] 2020-06-19 15:05:12: pid 56608: DEBUG: initializing pool configuration
Jun 19 15:05:12 pgpool[56608]: [1-2] 2020-06-19 15:05:12: pid 56608: DETAIL: num_backends: 2 total_weight: 2.000000
Jun 19 15:05:12 pgpool[56608]: [2-1] 2020-06-19 15:05:12: pid 56608: DEBUG: initializing pool configuration
Jun 19 15:05:12 pgpool[56608]: [2-2] 2020-06-19 15:05:12: pid 56608: DETAIL: backend 0 weight: 1073741823.500000 flag: 0000
Jun 19 15:05:12 pgpool[56608]: [3-1] 2020-06-19 15:05:12: pid 56608: DEBUG: initializing pool configuration
Jun 19 15:05:12 pgpool[56608]: [3-2] 2020-06-19 15:05:12: pid 56608: DETAIL: backend 1 weight: 1073741823.500000 flag: 0000
Jun 19 15:05:12 pgpool[56609]: [4-1] 2020-06-19 15:05:12: pid 56609: DEBUG: pool_coninfo_size: num_init_children (32) * max_pool (4) * MAX_NUM_BACKENDS (128) * sizeof(ConnectionInfo) (136) = 2228224 bytes requested for shared memory
Jun 19 15:05:12 pgpool[56609]: [5-1] 2020-06-19 15:05:12: pid 56609: DEBUG: ProcessInfo: num_init_children (32) * sizeof(ProcessInfo) (32) = 1024 bytes requested for shared memory
Jun 19 15:05:12 pgpool[56609]: [6-1] 2020-06-19 15:05:12: pid 56609: DEBUG: Request info are: sizeof(POOL_REQUEST_INFO) 5264 bytes requested for shared memory
Jun 19 15:05:12 pgpool[56609]: [7-1] 2020-06-19 15:05:12: pid 56609: DEBUG: Recovery management area: sizeof(int) 4 bytes requested for shared memory
Jun 19 15:05:12 pgpool[56609]: [8-1] 2020-06-19 15:05:12: pid 56609: LOG: memory cache initialized
Jun 19 15:05:12 pgpool[56609]: [8-2] 2020-06-19 15:05:12: pid 56609: DETAIL: memcache blocks :64
Jun 19 15:05:12 pgpool[56609]: [9-1] 2020-06-19 15:05:12: pid 56609: DEBUG: memory cache request size : 67108864
Jun 19 15:05:12 pgpool[56609]: [10-1] 2020-06-19 15:05:12: pid 56609: LOG: pool_discard_oid_maps: discarded memqcache oid maps
Jun 19 15:05:12 pgpool[56609]: [11-1] 2020-06-19 15:05:12: pid 56609: LOG: Setting up socket for 0.0.0.0:10000
Jun 19 15:05:12 pgpool[56609]: [12-1] 2020-06-19 15:05:12: pid 56609: LOG: Setting up socket for :::10000
Jun 19 15:05:12 pgpool[56611]: [56611]: [13-1] 2020-06-19 15:05:12: pid 56611: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56613]: [56613]: [13-1] 2020-06-19 15:05:12: pid 56613: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56614]: [56614]: [13-1] 2020-06-19 15:05:12: pid 56614: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56616]: [56616]: [13-1] 2020-06-19 15:05:12: pid 56616: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56617]: [56617]: [13-1] 2020-06-19 15:05:12: pid 56617: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56612]: [56612]: [13-1] 2020-06-19 15:05:12: pid 56612: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56619]: [56619]: [13-1] 2020-06-19 15:05:12: pid 56619: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56620]: [56620]: [13-1] 2020-06-19 15:05:12: pid 56620: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56622]: [56622]: [13-1] 2020-06-19 15:05:12: pid 56622: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56623]: [56623]: [13-1] 2020-06-19 15:05:12: pid 56623: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56625]: [56625]: [13-1] 2020-06-19 15:05:12: pid 56625: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56626]: [56626]: [13-1] 2020-06-19 15:05:12: pid 56626: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56609]: [13-1] 2020-06-19 15:05:12: pid 56609: LOG: find_primary_node_repeatedly: waiting for finding a primary node
Jun 19 15:05:12 pgpool[56628]: [56628]: [13-1] 2020-06-19 15:05:12: pid 56628: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56615]: [56615]: [13-1] 2020-06-19 15:05:12: pid 56615: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56630]: [56630]: [13-1] 2020-06-19 15:05:12: pid 56630: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56618]: [56618]: [13-1] 2020-06-19 15:05:12: pid 56618: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56621]: [56621]: [13-1] 2020-06-19 15:05:12: pid 56621: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56624]: [56624]: [13-1] 2020-06-19 15:05:12: pid 56624: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56627]: [56627]: [13-1] 2020-06-19 15:05:12: pid 56627: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56631]: [56631]: [13-1] 2020-06-19 15:05:12: pid 56631: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56629]: [56629]: [13-1] 2020-06-19 15:05:12: pid 56629: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56632]: [56632]: [13-1] 2020-06-19 15:05:12: pid 56632: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56635]: [56635]: [13-1] 2020-06-19 15:05:12: pid 56635: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56638]: [56638]: [13-1] 2020-06-19 15:05:12: pid 56638: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56642]: [56642]: [13-1] 2020-06-19 15:05:12: pid 56642: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56634]: [56634]: [13-1] 2020-06-19 15:05:12: pid 56634: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56639]: [56639]: [13-1] 2020-06-19 15:05:12: pid 56639: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56633]: [56633]: [13-1] 2020-06-19 15:05:12: pid 56633: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56637]: [56637]: [13-1] 2020-06-19 15:05:12: pid 56637: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56636]: [56636]: [13-1] 2020-06-19 15:05:12: pid 56636: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56641]: [56641]: [13-1] 2020-06-19 15:05:12: pid 56641: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56640]: [56640]: [13-1] 2020-06-19 15:05:12: pid 56640: DEBUG: initializing backend status
Jun 19 15:05:12 pgpool[56609]: [14-1] 2020-06-19 15:05:12: pid 56609: DEBUG: authenticate kind = 5
Jun 19 15:05:12 pgpool[56609]: [15-1] 2020-06-19 15:05:12: pid 56609: DEBUG: authenticate backend: key data received
Jun 19 15:05:12 pgpool[56609]: [16-1] 2020-06-19 15:05:12: pid 56609: DEBUG: authenticate backend: transaction state: I
Jun 19 15:05:12 pgpool[56609]: [17-1] 2020-06-19 15:05:12: pid 56609: DEBUG: authenticate kind = 5
Jun 19 15:05:12 pgpool[56609]: [18-1] 2020-06-19 15:05:12: pid 56609: DEBUG: authenticate backend: key data received
Jun 19 15:05:12 pgpool[56609]: [19-1] 2020-06-19 15:05:12: pid 56609: DEBUG: authenticate backend: transaction state: I
Jun 19 15:05:12 pgpool[56609]: [20-1] 2020-06-19 15:05:12: pid 56609: DEBUG: do_query: extended:0 query:"SELECT pg_is_in_recovery()"
Jun 19 15:05:12 pgpool[56609]: [21-1] 2020-06-19 15:05:12: pid 56609: DEBUG: do_query: extended:0 query:"SELECT current_setting('server_version_num')"
Jun 19 15:05:12 pgpool[56609]: [22-1] 2020-06-19 15:05:12: pid 56609: DEBUG: get_server_version: backend 0 server version: 110005
Jun 19 15:05:12 pgpool[56609]: [23-1] 2020-06-19 15:05:12: pid 56609: DEBUG: do_query: extended:0 query:"SELECT pg_is_in_recovery()"
Jun 19 15:05:12 pgpool[56609]: [24-1] 2020-06-19 15:05:12: pid 56609: DEBUG: do_query: extended:0 query:"SELECT current_setting('server_version_num')"
Jun 19 15:05:12 pgpool[56609]: [25-1] 2020-06-19 15:05:12: pid 56609: DEBUG: get_server_version: backend 1 server version: 110005
Jun 19 15:05:12 pgpool[56609]: [26-1] 2020-06-19 15:05:12: pid 56609: DEBUG: verify_backend_node_status: multiple standbys: 1
Jun 19 15:05:12 pgpool[56609]: [27-1] 2020-06-19 15:05:12: pid 56609: DEBUG: verify_backend_node_status: detach_false_primary is off and no additional checking is performed
Jun 19 15:05:12 pgpool[56609]: [28-1] 2020-06-19 15:05:12: pid 56609: LOG: find_primary_node: primary node is 0
Jun 19 15:05:12 pgpool[56609]: [29-1] 2020-06-19 15:05:12: pid 56609: LOG: find_primary_node: standby node is 1
Jun 19 15:05:12 pgpool[56609]: [30-1] 2020-06-19 15:05:12: pid 56609: FATAL: failed to create INET domain socket
Jun 19 15:05:12 pgpool[56609]: [30-2] 2020-06-19 15:05:12: pid 56609: DETAIL: bind on host:"0.0.0.0" server:"monkeycom" failed with error "Address already in use"
TagsNo tags attached.

Activities

pengbo

2020-06-21 22:22

developer   ~0003407

> Jun 19 15:05:12 pgpool[56609]: [30-1] 2020-06-19 15:05:12: pid 56609: FATAL: failed to create INET domain socket
> Jun 19 15:05:12 pgpool[56609]: [30-2] 2020-06-19 15:05:12: pid 56609: DETAIL: bind on host:"0.0.0.0" server:"monkeycom" failed with error "Address already in use"

It seems that the pcp socket creation failed.
How did you configure "pcp_listen_addresses" and "pcp_port".

gdedeoglu

2020-06-21 22:51

reporter   ~0003408

Hello,

I haven't changed this parameter's values. Here are the values which I've configured.

pcp_listen_addresses = '*'
pcp_port = 9898

gdedeoglu

2020-06-21 22:54

reporter   ~0003409

Hello again,

As additional information, operating systems of the servers are CentOS 8.

4.18.0-147.el8.x86_64

pengbo

2020-07-27 12:07

developer   ~0003443

Have you resolved this issue?
Try to delete all the socket files and restart pgpool again.

Issue History

Date Modified Username Field Change
2020-06-19 21:26 gdedeoglu New Issue
2020-06-21 22:18 pengbo Assigned To => pengbo
2020-06-21 22:18 pengbo Status new => assigned
2020-06-21 22:22 pengbo Note Added: 0003407
2020-06-21 22:22 pengbo Status assigned => feedback
2020-06-21 22:51 gdedeoglu Note Added: 0003408
2020-06-21 22:51 gdedeoglu Status feedback => assigned
2020-06-21 22:54 gdedeoglu Note Added: 0003409
2020-07-27 12:07 pengbo Note Added: 0003443
2020-07-27 12:08 pengbo Status assigned => feedback