Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
4650 Lượt xem

Installed version 8 (IP 1) and postgres (IP 2) in two different VM which have ubuntu 18.4 OS. Both IP1/2 is not a static one.

  As suggested, did the below postgres related configurations in IP 2 

In file /etc/postgresql/10/main/pg_hba.conf added a new line 

IPV4 : host all all 192.168.1.0/24 trust 

then in /etc/postgresql/10/main/postgresql.conf 

listen_address= '*' 

after this save and restarted postgres service. 

Similarly in .openerp_serverrc conf file 

db_host = IP 2,  db_port = 5432

  for remaining options like db_user,db_password,db_name i have given False and db_filter=.* 

Earlier i tried with giving the details also for db_name,user,password. 

after restarting odoo server and when i refreshed the browser and selected any database getting error as "  Unable to login on database "dbname" 

It is a fresh db without any modules. Tried with another DB also. Both DB was created through command line by using query.

From front end if i  tried to create DB then getting some xml error related to PIL Image.

Ảnh đại diện
Huỷ bỏ

Please post the config file and the error from logs.

Tác giả

@Sudhir : I do not have log file. Because Odoo files / addons i have clone from our git repository. python dependencies and postgres alone have installed using pip / apt-get . So sharing config details

Odoo conf:

db_host = 192.168.1.233

db_maxconn = 64

db_name = False

db_password = False

db_port = 5432

db_user = False

dbfilter = .*

Please let me know if any other config details needed in specific.

Câu trả lời hay nhất

For database connection error.Please try to update your base module once again from terminal

./openerp-server -d "yourdbname" -u base

if the database created through query, sometimes base modules need to get updated again. Once i have faced the same and the above step solved it.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Read this  https://www.odoo.com/forum/help-1/question/how-to-connect-odoo-with-postgresql-146966

Ảnh đại diện
Huỷ bỏ