Openerp无法连接到postgresql数据库

时间:2014-07-14 04:47:56

标签: postgresql openerp openerp-7

我的服务器是Centos 6.4 64位,ip 192.168.7.4,安装了postgresql-server-8.4.20-1.el6_5.x86_64。

[root@backup soft]# netstat -tupln | grep 5432
tcp        0      0 0.0.0.0:5432                0.0.0.0:*                   LISTEN      27533/postmaster
tcp        0      0 :::5432                     :::*                        LISTEN      27533/postmaster

我通过运行“python setup.py install”安装了Openerp 7.0,在postgresql中创建了db“openerp”。 当我尝试通过Web浏览器访问openerp时:192.168.7.4:8069,它显示错误“”致命:对于用户\“openerp \”,Ident身份验证失败 我无法在postgresql中登录openerp db:

psql -d openerp -U openerp -W
Password for user openerp:
psql: FATAL:  Ident authentication failed for user "openerp"

我确信密码与/etc/openerp-server.conf

相同
[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = openerp
db_password = *********

这是我的/var/lib/pgsql/data/pg_hba.conf

local   all         all                               ident
host    all             all     127.0.0.1/32            ident
host    all         all         192.168.7.4/32          ident

还有一个问题,如何完全删除openerp?我想重新安装openerp。 感谢。

1 个答案:

答案 0 :(得分:0)

尝试按照以下说明重设openerp用户的密码:

library(httr)
library(RCurl)
library(digest)

coinbase_url <- "https://api.coinbase.com"
coinbase_reqPath <- "/v2/accounts/"
coinbase_fullPath <- paste(coinbase_url, coinbase_reqPath,sep = "")

coinbase_key <- "XXXXMYKEYXXX"
coinbase_secret <- "XXXXXMYSECRETKEYXXXX"

cb_timestamp <- format(as.numeric(Sys.time()), digits=10)
coinbase_message <- paste0(cb_timestamp,"GET", coinbase_reqPath)
coinbase_sig <- hmac(key = coinbase_secret, object = coinbase_message, algo = "sha256", raw = F)

coinbase_acct <- content(GET(coinbase_fullPath,
                        add_headers(
                        "CB-ACCESS-KEY" = coinbase_key, 
                        "CB-ACCESS-SIGN" = coinbase_sig,
                        "CB-ACCESS-TIMESTAMP" = cb_timestamp,
                        "Content-Type"="application/json")))

然后输入root用户的密码,然后输入sudo su - postgres 并编写此查询:

psql

,然后尝试使用新密码运行openerp。


对于执行openerp,我不确定您运行openerp的命令。 对我来说,我正在使用以下命令:

ALTER USER openerp WITH PASSWORD '<fill with wathever password you want>';