PGPool 配置错误定位 s_do_auth: expecting R got E

自从按照教程 http://www.pgpool.net/docs/latest/pgpool-zh_cn.html#hba
配置好PGPool以后,每次启动 pgpool -c -n -D


都报 s_do_auth: expecting R got E
2011-02-26 23:01:22 ERROR: pid 10365: s_do_auth: expecting R got E 2011-02-26 23:01:22 ERROR: pid 10365: make_persistent_db_connection: s_do_auth failed 2011-02-26 23:01:22 ERROR: pid 10365: check_replication_time_lag: DB node is valid but no persistent connection

经过查找网络,终于定位到了问题,是 health_check_password 没有设置,设置了相应密码后,错误消除。

另外:查看pgpool 工作进程命令
ps aux | grep pgpool

root 36664 0.0 0.0 23060 1884 pts/0 T 15:38 0:00 vi pgpool.conf
root 38797 0.0 0.3 97264 6376 pts/0 S+ 18:09 0:00 pgpool -n -D
root 38798 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38799 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38800 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38801 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38802 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38803 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38804 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38805 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request
root 38806 0.0 0.0 95164 1448 pts/0 S+ 18:09 0:00 pgpool: wait for connection request

 

在连接到主机的9999 端口时,报 md5 模式在 master slave, replication 模式不支持,请修改pg_hba.conf的错误。

第一步:在pgpool.conf 里 enable_pool_hba =on, 且密码文件 pool_passwd ='pool_passwd'

第二,pool_passwd 应该用如下的格式(注意,密码里以md5开头,且用户是postgres)

postgers:md58f2fae75e1816d3d19e648e1bea21140

具体可参阅:  

    http://www.pgpool.net/pipermail/pgpool-general/2013-May/001773.html

节选关键段落:
[root at n3170 etc]# pg_md5 -p -m -u postgers password:

[root at n3170 etc]# more /usr/local/etc/pool_passwd

postgers:md58f2fae75e1816d3d19e648e1bea21140

posted on 2013-11-05 19:27  Shadow Zhang  阅读(1206)  评论(0编辑  收藏  举报