Skip to Content
Menu
This question has been flagged
2 Replies
6269 Views

Dear all,

For configuration Saas, we need to enable db_filter "--db-filter = ^%h$". But when I use this parameter in config file ex. /etc/odoodev.conf or use command like this: /opt/dev01/odoo-bin --config /etc/odoodev.conf --db-filter=^%h$ --logfile /var/log/dev01/odoo-server.log &. My odoo cannot list the existed database in while logfile appear errror "Logged into database 'odoo 01.local', but dbfilter rejects it; logging session out"

Do you have any advice for this issue?


Thanks

Stillpham

Avatar
Discard
Best Answer

I had the same problem on a production server that was working for long time. Suddenly I started to get the logout issue and after trying every solution I found in the forums, nothing worked. Then I decided to check the logs and I found this:

2018-06-13 20:48:52,798 13774 ERROR ? werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 205, in run_wsgi
    execute(self.server.app)
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 193, in execute
    application_iter = app(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/odoo/service/server.py", line 244, in app
    return self.app(e, s)
  File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 186, in application
    return application_unproxied(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 172, in application_unproxied
    result = handler(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1325, in __call__
    self.load_addons()
  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1346, in load_addons
    m = __import__('odoo.addons.' + module)
  File "/usr/lib/python2.7/dist-packages/odoo/modules/module.py", line 81, in load_module
    execfile(modfile, new_mod.__dict__)
  File "/usr/lib/python2.7/dist-packages/odoo/addons_extra/target_achievement_invoice/__init__.py", line 22, in <module>
    import models
  File "/usr/lib/python2.7/dist-packages/odoo/addons_extra/target_achievement_invoice/models/__init__.py", line 22, in <module>
    import find_user_target
File "/usr/lib/python2.7/dist-packages/odoo/addons_extra/target_achievement_invoice/models/find_user_target.py", line 119
    'percent': round( ((target>0)? (target_bal / target) : 0) * 100, 1),

This addon was not installed on any of my instances but the code was returning the error !. I just moved that addon from the addons folder, restarted odoo and it worked again.

Hope that helps

Avatar
Discard
Best Answer

try :
"--db-filter = ^%h"
.without $, and name your database acordingly:.

domain1.com   -> db -> domain1-com

domain2.org -> db -> domain2-org

if more than one bd should be visible on any doomain, then apply any suffikx to distinct them...

Avatar
Discard