0

I am using Windows 10, PostgreSQL 12, Python 3.7.5 . I create username odoo, password odoo, create database mydb.

Source code is https://github.com/odoo/odoo/tree/aa0554d224337e1d966479a351a3ed059d297765

I run command

python odoo-bin -r odoo -w odoo --addons-path=addons --db-filter=mydb$

Error

E:\source_code\github.com\xxxxxxxx\odoo>python odoo-bin -r odoo -w odoo --addons-path=addons --db-filter=mydb$
2019-11-11 09:20:31,240 7372 INFO ? odoo: Odoo version 13.0
2019-11-11 09:20:31,240 7372 INFO ? odoo: addons paths: ['E:\\source_code\\github.com\\xxxxxxxx\\odoo\\odoo\\addons', 'c:\\users\\xxxxxxxx\\appdata\\local\\openerp s.a\\odoo\\addons\\13.0', 'e:\\source_code\\github.com\\xxxxxxxx\\odoo\\addons', 'e:\\source_code\\github.com\\xxxxxxxx\\odoo\\odoo\\addons']
2019-11-11 09:20:31,241 7372 INFO ? odoo: database: odoo@default:default
2019-11-11 09:20:31,397 7372 INFO ? odoo.addons.base.models.ir_actions_report: You need Wkhtmltopdf to print a pdf version of the reports.
2019-11-11 09:20:31,517 7372 INFO ? odoo.service.server: HTTP service (werkzeug) running on D1CMPS_VyDN.mptelecom.com:8069
2019-11-11 09:20:45,250 7372 INFO ? odoo.http: HTTP Configuring static files
2019-11-11 09:20:45,296 7372 INFO ? odoo.sql_db: Connection to the database failed
2019-11-11 09:20:45,299 7372 INFO ? werkzeug: 192.168.50.215 - - [11/Nov/2019 09:20:45] "GET / HTTP/1.1" 500 - 0 0.000 0.039
2019-11-11 09:20:45,333 7372 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\werkzeug\serving.py", line 270, in run_wsgi
    execute(self.server.app)
  File "C:\Program Files\Python37\lib\site-packages\werkzeug\serving.py", line 258, in execute
    application_iter = app(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\server.py", line 414, in app
    return self.app(e, s)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\wsgi_server.py", line 142, in application
    return application_unproxied(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\wsgi_server.py", line 117, in application_unproxied
    result = odoo.http.root(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1281, in __call__
    return self.dispatch(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1251, in __call__
    return self.app(environ, start_wrapped)
  File "C:\Program Files\Python37\lib\site-packages\werkzeug\wsgi.py", line 766, in __call__
    return self.app(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1415, in dispatch
    self.setup_db(httprequest)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1338, in setup_db
    httprequest.session.db = db_monodb(httprequest)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1499, in db_monodb
    dbs = db_list(True, httprequest)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1466, in db_list
    dbs = odoo.service.db.list_dbs(force)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\db.py", line 378, in list_dbs
    with closing(db.cursor()) as cr:
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 649, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 186, in __init__
    self._cnx = pool.borrow(dsn)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 532, in _locked
    return fun(self, *args, **kwargs)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 600, in borrow
    **connection_info)
  File "C:\Program Files\Python37\lib\site-packages\psycopg2\__init__.py", line 126, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  role "odoo" is not permitted to log in - - -
2019-11-11 09:20:45,442 7372 INFO ? odoo.sql_db: Connection to the database failed
2019-11-11 09:20:45,443 7372 INFO ? werkzeug: 192.168.50.215 - - [11/Nov/2019 09:20:45] "GET /favicon.ico HTTP/1.1" 500 - 0 0.000 0.057
2019-11-11 09:20:45,449 7372 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\werkzeug\serving.py", line 270, in run_wsgi
    execute(self.server.app)
  File "C:\Program Files\Python37\lib\site-packages\werkzeug\serving.py", line 258, in execute
    application_iter = app(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\server.py", line 414, in app
    return self.app(e, s)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\wsgi_server.py", line 142, in application
    return application_unproxied(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\wsgi_server.py", line 117, in application_unproxied
    result = odoo.http.root(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1281, in __call__
    return self.dispatch(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1251, in __call__
    return self.app(environ, start_wrapped)
  File "C:\Program Files\Python37\lib\site-packages\werkzeug\wsgi.py", line 766, in __call__
    return self.app(environ, start_response)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1415, in dispatch
    self.setup_db(httprequest)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1338, in setup_db
    httprequest.session.db = db_monodb(httprequest)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1499, in db_monodb
    dbs = db_list(True, httprequest)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\http.py", line 1466, in db_list
    dbs = odoo.service.db.list_dbs(force)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\service\db.py", line 378, in list_dbs
    with closing(db.cursor()) as cr:
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 649, in cursor
    return Cursor(self.__pool, self.dbname, self.dsn, serialized=serialized)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 186, in __init__
    self._cnx = pool.borrow(dsn)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 532, in _locked
    return fun(self, *args, **kwargs)
  File "E:\source_code\github.com\xxxxxxxx\odoo\odoo\sql_db.py", line 600, in borrow
    **connection_info)
  File "C:\Program Files\Python37\lib\site-packages\psycopg2\__init__.py", line 126, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: FATAL:  role "odoo" is not permitted to log in - - -

How to start Odoo 13 success from source code?

3 Answers 3

1

I think you need to configure the DB to trust your IP address:

make the following chages in pg_hba.conf:

# IPv4 local connections:
host all all 127.0.0.1/32   trust
host all all MY_IP/24 trust

see also this

1

To create a PostgreSQL user, follow these steps:

  1. Add PostgreSQL’s bin directory (by default: C:\Program Files\PostgreSQL\<version>\bin) to your PATH.
  2. Create a postgres user with a password using the pg admin gui:

    • Open pgAdminIII.
    • Double-click the server to create a connection.
    • Select Edit ‣ New Object ‣ New Login Role.
    • Enter the username in the Role Name field (e.g. odoo).
    • Open the Definition tab and enter the password (e.g. odoo), then click OK.

0

odoo 13 a default user name odoo that user with postgress it use a recently db created.

you can pass a database configuration on your config file

odoo 13 /debian/odoo.conf

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = False
db_port = False
db_user = odoo
db_password = False
;addons_path = /usr/lib/python3/dist-packages/odoo/addons

you can set db host port user password and use it

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.