Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

[10.0] Database collapsed all of a sudden

Odoberať

Get notified when there's activity on this post

This question has been flagged
postgresqlquerysqlwebsiteodoo10
8 Replies
8199 Zobrazenia
Avatar
Jurre Claassen

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
1
Avatar
Zrušiť
Ermin Trevisan

Could you please be so kind and reformat your post?

Yenthe Van Ginneken (Mainframe Monkey)

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

Avatar
Rion Ahmed
Best Answer

Is anyone find the solution?

0
Avatar
Zrušiť
Avatar
Marina Boules
Best Answer

Because website user (user_id) is public user that created as user on users list. 

So if you removed public user from users list, website will be stopped and give this error.

0
Avatar
Zrušiť
Avatar
Paul Catinean
Best Answer

After quite a bit of investigation I've traced the issue to this line: https://github.com/odoo/odoo/blob/10.0/addons/website/models/ir_http.py#L65


Apparently the website object has a non-required field user_id which should point to the default Public User. For some undiscovered reason that field can set to an empty value and then the aforementioned line sets the uid on the request to False.

One would have to update the user_id value in the database with the daabase id of the portal user to restore normal function, in the meantime I will also make a PR to check the value of user_id on the website or make user_id required to avoid this in the future.

Hope this helps.


[LATER EDIT]

Here is the PR in question: https://github.com/odoo/odoo/pull/21997

0
Avatar
Zrušiť
Avatar
Nguyen Quoc Dat
Best Answer

Did anyone have a solution for this?

0
Avatar
Zrušiť
Avatar
Jurre Claassen
Autor Best Answer

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
Avatar
Zrušiť
Avatar
保定-粉刷匠
Best Answer

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

Try this.


0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
how to query from posgreSQL in odoo 10 website
postgresql query sql odoo10
Avatar
Avatar
1
feb 18
4989
SQL Query for many2many Solved
postgresql sql odoo odoo10
Avatar
Avatar
Avatar
Avatar
Avatar
13
júl 24
15370
How to get value manual ORDER BY from Query
postgresql query odoo odoo10
Avatar
Avatar
1
júl 19
6052
Check on value in multiple database columns
postgresql query
Avatar
Avatar
Avatar
2
máj 24
2178
How to migrate data from Odoo 10 enterprise with PostgreSQL 9.5 to PostgreSQL 12?
postgresql odoo10
Avatar
Avatar
1
nov 23
3242
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now