[pgpool-general: 9347] Re: pgpool connection
Tatsuo Ishii
ishii at postgresql.org
Tue Feb 11 15:27:40 JST 2025
> This is the result of what I executed
> [root at localhost pgpool_log]# netstat -a|grep 9999
> unix 2 [ ACC ] STREAM LISTENING 2060230
> /var/run/postgresql/.s.PGSQL.9999
Strange... no tcp connections appear.
BTW you said:
> > and I pgpool.conf connections
> > listen_addresses = '*'
> > port = 9999
> > unix_socket_directories = '/tmp'
But from the result of netstat it appears that unix_socket_directories
is /var/run/postgresql, not /tmp/. So I suspect pgpool.conf you shared
is not the one you currently use. Can you share whole pgpool.conf?
(you can hide senstive information like password).
> this my pgpool_log
> 2025-02-11 11:16:30.193: main pid 392670: LOG:
> health_check_stats_shared_memory_size: requested size: 12288
> 2025-02-11 11:16:30.193: main pid 392670: LOG: memory cache initialized
> 2025-02-11 11:16:30.193: main pid 392670: DETAIL: memcache blocks :64
> 2025-02-11 11:16:30.193: main pid 392670: LOG: allocating (136981824)
> bytes of shared memory segment
> 2025-02-11 11:16:30.194: main pid 392670: LOG: allocating shared memory
> segment of size: 136981824
> 2025-02-11 11:16:30.983: main pid 392670: LOG:
> health_check_stats_shared_memory_size: requested size: 12288
> 2025-02-11 11:16:30.983: main pid 392670: LOG:
> health_check_stats_shared_memory_size: requested size: 12288
> 2025-02-11 11:16:30.984: main pid 392670: LOG: memory cache initialized
> 2025-02-11 11:16:30.984: main pid 392670: DETAIL: memcache blocks :64
> 2025-02-11 11:16:31.001: main pid 392670: LOG: pool_discard_oid_maps:
> discarded memqcache oid maps
> 2025-02-11 11:16:31.041: main pid 392670: LOG: create socket files[0]:
> /var/run/postgresql/.s.PGSQL.9999
> 2025-02-11 11:16:31.042: main pid 392670: LOG: listen address[0]: localhost
> 2025-02-11 11:16:31.043: main pid 392670: LOG: Setting up socket for
> ::1:9999
> 2025-02-11 11:16:31.043: main pid 392670: LOG: Setting up socket for
> 127.0.0.1:9999
> 2025-02-11 11:16:31.087: main pid 392670: LOG:
> find_primary_node_repeatedly: all of the backends are down. Giving up
> finding primary node
> 2025-02-11 11:16:31.087: main pid 392670: LOG: create socket files[0]:
> /var/run/postgresql/.s.PGSQL.9898
> 2025-02-11 11:16:31.087: main pid 392670: LOG: listen address[0]: localhost
> 2025-02-11 11:16:31.088: main pid 392670: LOG: Setting up socket for
> ::1:9898
> 2025-02-11 11:16:31.088: main pid 392670: LOG: Setting up socket for
> 127.0.0.1:9898
> 2025-02-11 11:16:31.091: pcp_main pid 392705: LOG: PCP process: 392705
> started
> 2025-02-11 11:16:31.092: sr_check_worker pid 392706: LOG: process started
> 2025-02-11 11:16:31.092: main pid 392670: LOG: pgpool-II successfully
> started. version 4.5.0 (hotooriboshi)
>
> and this my Backend Connection Settings
> backend_hostname0 = 'localhost'
> backend_port0 = 5432
> backend_weight0 = 1
> backend_data_directory0 = '/home/postgres/pgdata'
> backend_flag0 = 'ALLOW_TO_FAILOVER'
> backend_application_name0 = 'server0'
>
> I didn't set up the PCP. Will this cause any issues?
> Is there any other important information?
>
> Tatsuo Ishii <ishii at postgresql.org> 於 2025年2月11日 週二 上午8:38寫道:
>
>> > environment->
>> > linux os:rel8
>> > postgresql : postgresql 15.9
>> > pgpool : pgpool-II-4.5.0
>> >
>> > After installing pgpool, I encountered a problem when trying to start
>> > pgpool. When I use the command #pgpool, there is no error. However, when
>> I
>> > check with # ps aux | grep pgpool, the following information appears.
>> >
>> > root 219469 51.0 1.7 209876 137340 ? Ss 16:02 0:01
>> pgpool
>> > root 219470 0.0 0.0 76104 1348 ? S 16:02 0:00
>> pgpool:
>> > PgpoolLogger
>> > root 219472 0.0 0.0 209876 2860 ? S 16:02 0:00
>> pgpool:
>> > wait for connection request
>> [snip]
>> > root 219507 0.0 0.0 221948 1144 pts/0 S+ 16:02 0:00 grep
>> > --color=auto pgpool
>> >
>> > When I use the following command,
>> > # psql -p 9999 -Upostgres -h <local_ip> test
>> >
>> > the following result appears.
>> > psql: error: connection to server at "<local_ip>", port 9999 failed:
>> 連線被拒絕
>> > Is the server running on that host and accepting TCP/IP
>> connections?
>> >
>> > I added the following to my pool_hba.conf.
>> > host all all 0/0 md5
>> >
>> > and I pgpool.conf connections
>> > listen_addresses = '*'
>> > port = 9999
>> > unix_socket_directories = '/tmp'
>> >
>> > I have also set up the connection parameters for my psql, but I still
>> > can't connect. What areas should I check?
>>
>> netstat -a|grep 9999
>>
>> will show how pgpool is accepting connections.
>>
>> Also you want check one of followings work for you.
>>
>> psql -p 9999 -Upostgres test
>> psql -p 9999 -Upostgres -h localhost test
>> psql -p 9999 -Upostgres -h 127.0.0.1 test
>>
>> Can you share the pgpool.log at the pgpool start up? There is info
>> regarding which port pgpool is accepting.
>>
>> Best reagards,
>> --
>> Tatsuo Ishii
>> SRA OSS K.K.
>> English: http://www.sraoss.co.jp/index_en/
>> Japanese:http://www.sraoss.co.jp
>>
More information about the pgpool-general
mailing list