[pgpool-general: 9120] Re: Problems with automatic authentication of pcp command

Tatsuo Ishii ishii at sraoss.co.jp
Sat Jun 8 11:25:40 JST 2024


> Hello,
> 
> I am trying to run pcp command without having to type the user's password
> manually, but I have not been successful.
> 
> *I use this script:*
> 
> server_node_list=(0 1 2 3)
> for server_node in ${server_node_list[@]}
> do
>     source $HOME/.bash_profile
>     export PCPPASSFILE=/var/lib/pgsql/.pcppass
>     node_status=$(pcp_node_info -p 9898 -h localhost -U postgres -n
> $server_node -w | cut -d ' ' -f 3);
> 
>     if [[ $node_status == 3 ]]
>     then
>         pcp_attach_node -h localhost -n $server_node -U postgres -p 9898 -w
> -v
>     else
>         pcp_attach_node -h localhost -n $server_node -U postgres -p 9898 -w
> -v
>     fi
> done
> 
> *.pcppass*
> 
> localhost:9898:postgres:my_password
> 
> *When I run this script it gives me the following error:*
> 
> FATAL:  authentication failed for user "postgres"
> DETAIL:  username and/or password does not match

Are you sure that /var/lib/pgsql/.pcppass is owned by user "postgres"
and the permission is 600? i.e. not access from others or group is
permitted.

Best reagards,
--
Tatsuo Ishii
SRA OSS LLC
English: http://www.sraoss.co.jp/index_en/
Japanese:http://www.sraoss.co.jp




More information about the pgpool-general mailing list