Wednesday, September 1, 2010

[TroubleShooting] Can't connect to pgpool port 9999

When you setting Pgpool with PostgreSQL and had following error message

psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.9999"?

Please check pgpool config.

$ vi /usr/local/etc/pgpool.conf

You can do some modify to fix it.

Change default setting

socket_dir = '/tmp'
pcp_socket_dir = '/tmp'
backend_socket_dir = '/tmp'


socket_dir = '/var/run/postgresql'
pcp_socket_dir = '/var/run/postgresql'
backend_socket_dir = '/var/run/postgresql'

Save then restart pgpool.

$ pgpool -n -d > /tmp/pgpool.log 2>&1 &
$ pgpool stop

Check Result

$ psql -p 9999


BTW, You can use following command check pgpool listening socket.

$ netstat -lp | grep pgpool

result like this

tcp 0 0 *:9999 *:* LISTEN 21476/pgpool
tcp 0 0 *:9898 *:* LISTEN 21476/pgpool
unix 2 [ ACC ] STREAM LISTENING 55074 21476/pgpool /var/run/postgresql/.s.PGSQL.9999
unix 2 [ ACC ] STREAM LISTENING 55082 21476/pgpool /var/run/postgresql/.s.PGSQL.9898


  1. I bought this replica moncler shoes and bags and clothes from this store.replica moncler jackets The quality is very good. I have bought it many times and recommended it to my friends. replica moncler jacket men They all praise the quality of shoes and bags, and the service attitude of the store is good.

  2. Tips for buying a copy here. People spend a lot of time searching on the Internet, replica iwc watches uk where there are many replicas of famous designer brands on sale, and we can be sure that they are of high quality and quality. This is the first time I bought a copy watch. This watch is very surprising to me. replica iwc ingenieur watches The color is very low-key and the quality is very good. Good value for money


Related Posts Plugin for WordPress, Blogger...