Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

[10.0] Database collapsed all of a sudden

By
Jurre Claassen
on 10/28/16, 5:56 AM 219 views

Yesterday all of a sudden my database collapsed. At first I thought it was a caching issue when switching between databases, but it turned out to be another problem.


I backed up the database and moved it to a localhost to be SURE it wasn't a caching issue, but still no result. Excerpt of the error from odoo.log and postgres.log are below.

I've tried setting the state of website to uninstalled through the database, in hopes of fixing it, but no result whatshowever.  Also, tried changing locale, but it seems to go wrong in building the query. It expects a boolean where it returns an integer. 

Please help me on this issue, I've been breaking my head on it for about 1.5 days now, I'm sure its a minor issue I've overlooked somewhere.

Odoo.log


2016-10-28 09:50:44,295 2715 INFO fixme werkzeug: 192.168.10.181 - - [28/Oct/2016 09:50:44] "GET /web?db=fixme HTTP/1.1" 303 -2016-10-28 09:50:44,311 2715 INFO fixme odoo.sql_db: bad query: SELECT MAX(CASE WHEN perm_read THEN 1 ELSE 0 END)                              FROM ir_model_access a                              JOIN ir_model m ON (m.id = a.model_id)                              JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)                             WHERE m.model = 'website'                               AND gu.uid = false                               AND a.active IS TRUE2016-10-28 09:50:44,322 2715 INFO fixme werkzeug: 192.168.10.181 - - [28/Oct/2016 09:50:44] "GET /web/login HTTP/1.1" 500 -2016-10-28 09:50:44,347 2715 ERROR fixme werkzeug: Error on request:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 177, in run_wsgi    execute(self.server.app)  File "/usr/lib/python2.7/dist-packages/werkzeug/serving.py", line 165, in execute    application_iter = app(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/service/server.py", line 246, in app    return self.app(e, s)  File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 184, in application    return application_unproxied(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/service/wsgi_server.py", line 170, in application_unproxied    result = handler(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1306, in __call__    return self.dispatch(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1280, in __call__    return self.app(environ, start_wrapped)  File "/usr/lib/python2.7/dist-packages/werkzeug/wsgi.py", line 579, in __call__    return self.app(environ, start_response)  File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 1471, in dispatch    result = ir_http._dispatch()  File "/usr/lib/python2.7/dist-packages/odoo/addons/website_sale/models/ir_http.py", line 15, in _dispatch    return super(IrHttp, cls)._dispatch()  File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/ir_http.py", line 166, in _dispatch    langs = [lg[0] for lg in request.website.get_languages()]  File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/website.py", line 349, in get_languages    return self._get_languages()  File "<string>", line 2, in _get_languages
  File "/usr/lib/python2.7/dist-packages/odoo/tools/cache.py", line 87, in lookup    value = d[key] = self.method(*args, **kwargs)  File "/usr/lib/python2.7/dist-packages/odoo/addons/website/models/website.py", line 353, in _get_languages    return [(lg.code, lg.name) for lg in self.language_ids]  File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 860, in __get__    self.determine_value(record)  File "/usr/lib/python2.7/dist-packages/odoo/fields.py", line 962, in determine_value    record._prefetch_field(self)  File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 3051, in _prefetch_field    result = records.read([f.name for f in fs], load='_classic_write')  File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 2972, in read    self.check_access_rights('read')  File "/usr/lib/python2.7/dist-packages/odoo/models.py", line 3270, in check_access_rights    return self.env['ir.model.access'].check(self._name, operation, raise_exception)  File "<string>", line 2, in check
  File "/usr/lib/python2.7/dist-packages/odoo/tools/cache.py", line 87, in lookup    value = d[key] = self.method(*args, **kwargs)  File "/usr/lib/python2.7/dist-packages/odoo/addons/base/ir/ir_model.py", line 840, in check    (model_name, self._uid,))  File "/usr/lib/python2.7/dist-packages/odoo/sql_db.py", line 141, in wrapper    return f(self, *args, **kwargs)  File "/usr/lib/python2.7/dist-packages/odoo/sql_db.py", line 218, in execute    res = self._obj.execute(query, params)ProgrammingError: operator does not exist: integer = booleanLINE 6:                                AND gu.uid = false                                                  ^HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.


Postgres.log


2016-10-28 11:50:37 CEST STATEMENT:  SELECT MAX(CASE WHEN perm_read THEN 1 ELSE 0 END)	                              FROM ir_model_access a	                              JOIN ir_model m ON (m.id = a.model_id)	                              JOIN res_groups_users_rel gu ON (gu.gid = a.group_id)	                             WHERE m.model = 'website'	                               AND gu.uid = false	                               AND a.active IS TRUE2016-10-28 11:50:44 CEST ERROR:  operator does not exist: integer = boolean at character 354

Could you please be so kind and reformat your post?

Ermin Trevisan
on 10/28/16, 6:05 AM

Yeah, just tried that. but for some reason I keep getting a 403 error when submitting the reformatted post.

So pasted at codesnippet http://paste.ofcode.org/3a7pvjtsDJRsgWMbNjQaJus

Jurre Claassen
on 10/28/16, 6:14 AM
0
Jurre Claassen
On 10/28/16, 9:58 AM

Just tried repairing the database with the -d parameter, still same error. Thanks for the suggestion.

Can't reply to answers yet due to lack of karma

0
保定-粉刷匠
On 10/28/16, 9:28 AM

You can update you database,using parameter '-D YourDatabaseName -U all‘ when you start odoo.

Try this.


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/28/16, 5:56 AM
Seen: 219 times
Last updated: 10/28/16, 12:22 PM