Impacted versions: 10.0 (20161025)
Steps to reproduce:
Fresh install. Install postgresql and do initdb.
Install odoo from nightly 10.0 odoo.repo (RPM). Tested in Fedora 24 x86_64.
Create database and user. Tested with Spanish (Costa Rica).
Once installed, it will redirect to /web/
Current behavior:
All CSS and JS assets are HTTP 200 OK, however they are being served empty (0 bytes) and odoo-server.log displays several file not found issues while retrieving assets from the filestore.
Expected behavior:
Should display UI properly without CSS and JS issues.
odoo-server.log says:
2016-10-25 19:29:17,748 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web HTTP/1.1" 200 -
2016-10-25 19:29:17,787 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/2e/2ef882f84c89c3634d210d011ec61b9144cddc13
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/2e/2ef882f84c89c3634d210d011ec61b9144cddc13'
2016-10-25 19:29:17,788 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/c4/c40405cca600ab751730bedeeb712e8ec3898841
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/c4/c40405cca600ab751730bedeeb712e8ec3898841'
2016-10-25 19:29:17,790 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/246-f46eb1e/web.assets_common.0.css HTTP/1.1" 200 -
2016-10-25 19:29:17,792 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/247-2a04519/web.assets_backend.0.css HTTP/1.1" 200 -
2016-10-25 19:29:17,808 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/e8/e8bbedbbeb999d0bb82b1768aa2efc373e20f6cb
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/e8/e8bbedbbeb999d0bb82b1768aa2efc373e20f6cb'
2016-10-25 19:29:17,812 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/248-2a04519/web.assets_backend.1.css HTTP/1.1" 200 -
2016-10-25 19:29:17,812 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/e2/e2da5bb6e7a56dfa298847b18181af470e368ad8
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/e2/e2da5bb6e7a56dfa298847b18181af470e368ad8'
2016-10-25 19:29:17,814 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/63/636cbb02acab8c81faf536229fa201ecd7813e8c
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/63/636cbb02acab8c81faf536229fa201ecd7813e8c'
2016-10-25 19:29:17,816 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/37/37e8b0675e0d2722861b1bbbf31d1ca8f0816605
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/37/37e8b0675e0d2722861b1bbbf31d1ca8f0816605'
2016-10-25 19:29:17,816 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/251-f46eb1e/web.assets_common.js HTTP/1.1" 200 -
2016-10-25 19:29:17,820 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/250-9581b2d/web_editor.assets_editor.0.css HTTP/1.1" 200 -
2016-10-25 19:29:17,822 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/249-95054a4/web_editor.summernote.0.css HTTP/1.1" 200 -
2016-10-25 19:29:17,824 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/f5/f5b48b4b44fd3f9df0e0fb97330d84873c63355b
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/f5/f5b48b4b44fd3f9df0e0fb97330d84873c63355b'
2016-10-25 19:29:17,829 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/252-2a04519/web.assets_backend.js HTTP/1.1" 200 -
2016-10-25 19:29:17,831 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/e1/e1bf7b2e69460e68f9e6fb61fece8fa83f7bc96b
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/e1/e1bf7b2e69460e68f9e6fb61fece8fa83f7bc96b'
2016-10-25 19:29:17,833 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/253-95054a4/web_editor.summernote.js HTTP/1.1" 200 -
2016-10-25 19:29:17,835 13202 INFO odoo odoo.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/odoo/44/44ef20d54868e263050d8485dc18748ea179d84b
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/odoo/44/44ef20d54868e263050d8485dc18748ea179d84b'
2016-10-25 19:29:17,836 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/content/254-9581b2d/web_editor.assets_editor.js HTTP/1.1" 200 -
2016-10-25 19:29:17,856 13202 INFO odoo werkzeug: 127.0.0.1 - - [25/Oct/2016 19:29:17] "GET /web/binary/company_logo HTTP/1.1" 200 -
There are no SELinux alerts.
Closing as it looks as a duplicate of #13808
FYI: I started facing this issue when enabling Developer Mode with Assets.
In my case the problem was that I renamed the database so the cache files could not be found. Just by reading the logs I found these kind of lines:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/odoo/addons/base/ir/ir_attachment.py", line 100, in _file_read
r = base64.b64encode(open(full_path,'rb').read())
FileNotFoundError: [Errno 2] No such file or directory: '/home/odoo/.local/share/Odoo/filestore/your_odoo_db_name/4a/4a402975e7880e8e09a718d025ccc5e3a2142e03'
2018-02-02 10:23:46,692 3342 INFO your_odoo_db_name werkzeug: 83.213.240.167 - - [02/Feb/2018 10:23:46] "GET /web/image/res.company/1/logo?unique=16d122c HTTP/1.1" 200 -
The solution was to copy all cached files from /home/odoo/.local/share/Odoo/filestore/old_odoo_db_name to /home/odoo/.local/share/Odoo/filestore/your_odoo_db_name and chown it to user odoo, group odoo.
Most helpful comment
In my case the problem was that I renamed the database so the cache files could not be found. Just by reading the logs I found these kind of lines:
The solution was to copy all cached files from /home/odoo/.local/share/Odoo/filestore/old_odoo_db_name to /home/odoo/.local/share/Odoo/filestore/your_odoo_db_name and chown it to user odoo, group odoo.