Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not able to connect postgresql with odoo

I configured odoo in aws ec2 and connecting Postgresql from rds when I run the command ./odoo-bin --config=/etc/odoo.conf and try to access from a browser, I'm getting the following error:

ERROR odoo_db odoo.modules.loading: Database odoo_db not initialized, you can force it with `-i base` 

File "/opt/odoo/odoo/odoo/modules/registry.py", line 176, in __getitem__
    return self.models[model_name]
KeyError: 'ir.http' - - -

and also I'm getting this error as well:

STATEMENT:  SELECT latest_version FROM ir_module_module WHERE name='base'
ERROR odoo_db odoo.sql_db: bad query: SELECT latest_version FROM ir_module_module WHERE name='base'
ERROR: relation "ir_module_module" does not exist
like image 873
coder Avatar asked Nov 23 '18 17:11

coder


1 Answers

In command line run:

 ./odoo-bin --addons-path=addons --database=odoo  --db_user=odoo --db_password=odoo  --db_host=localhost --db_port=5432 -i INIT

explicitly give db name, user and password, "-i INIT" option initialises the odoo database

like image 194
harsha Avatar answered Oct 02 '22 04:10

harsha