0

I am working on installing PgPoolAdmin on my local ubuntu system for installing it on server later. Currently, I am able to login but I keep getting an error Could not read .pcppass fileFile not found. I have tried this and many other resources, but no luck. Where is it looking for this file? The username and passowrd in pcp.conf is same as here, just its in plain text in .pcppass and md5 in pcp.conf. Is that correct?

pcp.conf I have on 2 location /var/www/html and /var/www/html/admin-tool/

Its contents :

#insert:hostname:port:username:password

 *:*:akshay:PASSWORD
 *:*:postgres:PASSWORD

Thank you.

We are Borg
  • 5,117
  • 17
  • 102
  • 225

2 Answers2

1

.pcppass needs to accessible by the user that runs your web server. For example, if you are serving pgpoolAdmin through apache2 with default paths and users. The following should solve the issue.

cp ~/.pcpass /var/www/.pcppass
chown www-data:www-data /var/www/.pcppass
chmod 600 /var/www/.pcppass
Alex K.
  • 220
  • 3
  • 10
0

By default a .pcppass file should be located in the user's $HOME directory. If you have created it elsewhere, then initialize the $PCPPASSFILE environment variable with the filepath. Make sure the file is in this format:hostname:port:username:password. Then you should be able to access the database. Note: You cannot use wildcards in the password files, as it will give error sometimes. It is better to use exact host/port values for better security.

Lohit Gupta
  • 1,045
  • 6
  • 11
  • It is in my home directory from which I am logged in. Can you tell me if the file contents are correct? What should I use for localhost instead of *'s. Thank you – We are Borg Jul 10 '17 at 10:51
  • Use the server ip and port of the server which you will connect via pgpool. You can refer [this](http://www.pgpool.net/pgpool-web/contrib_docs/watchdog_master_slave_3.3/en.html) page for more info on how to setup pgpooladmin. – Lohit Gupta Jul 10 '17 at 12:20