跳至内容
Odoo 菜单
  • 登录
  • 免费试用
  • 应用程序
    财务
    • 会计
    • 发票
    • 费用
    • 电子表格 (BI)
    • 文档
    • 电子签名
    销售
    • 客户关系管理
    • 销售
    • POS 销售点管理-零售
    • POS 销售点管理 - 餐厅
    • 订阅
    • 租赁
    网站
    • 网站设计
    • 电子商务
    • 博客
    • 论坛
    • 在线客服
    • 在线学习
    供应链
    • 库存
    • 制造
    • 产品生命周期
    • 采购
    • 维护保养
    • 品控
    人力资源
    • 员工
    • 招聘
    • 休假
    • 评价
    • 内部推荐
    • 车队
    营销
    • 社媒营销
    • 电邮营销
    • 短信营销
    • 近期活动
    • 营销自动化
    • 网上调查
    服务
    • 项目管理
    • 工时单
    • 现场服务
    • 服务台
    • 排期
    • 预约
    生产力
    • 讨论
    • 批核
    • IoT物联网
    • VoIP
    • 知识库
    • WhatsApp
    第三方应用软件 Odoo 定制 Odoo云端平台
  • 行业
    零售
    • 书店
    • 服装店
    • 家具店
    • 食品杂货店
    • 五金店
    • 玩具店
    餐饮与酒店服务
    • 酒吧及酒馆
    • 餐厅
    • 快餐
    • 民宿
    • 饮品分销商
    • 酒店
    房地产
    • 房地产代理
    • 建筑师事务所
    • 建造业
    • 地产管理
    • 园艺
    • 业主协会
    咨询
    • 会计师事务所
    • Odoo合作伙伴
    • 市场推广公司
    • 律师事务所
    • 人才招聘
    • 审核 & 认证
    制造
    • 纺织
    • 金属
    • 家具
    • 食品
    • 啤酒厂
    • 企业礼品
    保健与健身
    • 体育俱乐部
    • 眼镜店
    • 健身中心
    • 健康从业者
    • 药房
    • 发型屋
    商贸服务
    • 维修人员
    • IT 硬件及支持
    • 太阳能系统
    • 鞋匠
    • 清洁服务
    • 暖通空调服务
    其他
    • 非营利组织
    • 环境机构
    • 广告牌租赁
    • 摄影服务
    • 自行车租赁
    • 软件经销商
    浏览所有行业
  • 社区
    学习
    • 教学视频
    • 文档
    • 认证
    • 培训
    • 博客
    • 播客
    赋能教育
    • 教育计划
    • Scale Up! 商业游戏
    • 参观Odoo
    获取软件
    • 下载
    • 版本对比
    • 发布
    合作
    • Github
    • 论坛
    • 近期活动
    • 翻译
    • 成为合作伙伴
    • 合作伙伴服务
    • 注册您的会计事务所
    获取服务
    • 寻找合作伙伴
    • 查找会计服务
    • 预约顾问咨询
    • 安装及推行服务
    • 客户参考
    • 支持
    • 升级
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    获取演示
  • 定价
  • 技术支持

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

  • 客户关系管理
  • e-Commerce
  • 会计
  • 库存
  • PoS
  • 项目
  • MRP
All apps
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
帮助

UPDATED: How do I prevent website common asset files from constantly not being found? IOError: [Errno 2] No such file or directory

订阅

此帖文有活动时,接收通知

此问题已终结
filestoreir.attachmentwebsitefrontendv9
6 回复
29727 查看
形象
Damian Bere

Context:

Fresh Install of Odoo 9 using Official Docker Hub image and a standard Postgres Docker Image. We have this sitting behind an Nginx docker container, but otherwise as per the standard odoo docker image guidelines.

Problem:

We keep having rendered files disappear from the filestore that are crucial to the website functioning (odoo common assets scripts).  The logs show this:

2015-10-30 15:28:28,266 1 INFO db-test werkzeug: 172.17.0.25 - - [30/Oct/2015 15:28:28] "GET /web/content/407-17599c5/website.assets_frontend.js HTTP/1.0" 200 -
2015-10-30 15:28:28,281 1 INFO db-test openerp.addons.base.ir.ir_attachment: _read_file reading /var/lib/odoo/filestore/db-test/e6/e69e06808b908fc0d85ebfea58fbc7df3788e72e
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/openerp/addons/base/ir/ir_attachment.py", line 151, in _file_read
r = open(full_path,'rb').read().encode('base64')
IOError: [Errno 2] No such file or directory: u'/var/lib/odoo/filestore/db-test/e6/e69e06808b908fc0d85ebfea58fbc7df3788e72e'

This happens with various filenames (generated hash values), but all of them are for the same actual file content which is related to script assets for the website.  The content changes slightly as Apps are installed, which forces a change of the filename.

This happens frequently, e.g. within an hour of installation. 

I've found a number of log entries for ir.attachments records being deleted, I assume as part of a housekeeping task that occurs at the end of a user action. 

2015-10-31 13:34:07,916 1 INFO db-test openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [284]
2015-10-31 13:34:09,034 1 INFO db-test openerp.models.unlink: User #1 deleted ir.attachment records with IDs: [285]

This is not initiated by a user (i.e. me) specifically, but happens regularly even when no missing file issue occurs.  However it does happen near the time of the missing file (coincidental or not), so thought it worth mentioning.  

The result of this is that the website and entire app becomes unusable - on the front end, the page will show from a specific url, but no menus will activate, on the backend, obviously nothing works, as the menu and content are brought back via XHR.  This obviously renders Odoo completely unusable unless this file is restored.

So Far...

  1. We tried this with a fresh install (no configuration), just apps installed.

  2. We've eliminated a DB issue - this is a fresh install from the official postgres docker image, set-up as per odoo instructions, and has worked fine for v8.

  3. We've eliminated any backup, restore and migrate jobs we had set-up, as these have not been used on this fresh install

  4. We doubt it is to do with the EBS backed AWS EC2 Instance or CentOS or Docker on LVM, simply because it is the same file (although with different file names) each time, even when re-installed on a completely different server and disk and docker storage configuration.

  5. Checked the automated jobs, but none seem to affect this type of thing, and running some of them manually didn't effect the file in this way

  6. It only happens when the website builder is installed.

  7. It only happens when the website is publicly accessible - when firewalled off just to me, this DOES NOT happen.

  8. This strongly suggests that a request of some sort is triggering something in Odoo that triggers the deletion of the file, or the update/refresh of the file, which doesn't work / complete properly.

HELP NEEDED:  Not being intimately familiar with Odoo architecture or codebase, or being a python developer, I would appreciate pointers to how the resource request pipeline in odoo actually works (so I can trace the code path) and what related functionality could possibly do this.

Any Ideas would be greatly appreciated - we are almost at the point of giving up on Odoo, as it is just not stable enough to run a business on given this issue.

1
形象
丢弃
Damian Bere
编写者

So far I've not been able to replicate the problem, when the website is not public facing, or is on a domain that has never been used before (and therefore is never accessed by anything else). Could it be that something like the google bot is requesting an old page (I've seen a number of 404s and 304s in the logs), that this triggers some kind of housekeeping that inadvertently results in deleting this file?

Damian Bere
编写者

If anyone has any ideas on this it would be greatly appreciated.

形象
aldo
最佳答案

In the database run the command delete , the number in like show in the log error, delete all cod error

e69e06808b908fc0d85ebfea58fbc7df3788e72e

delete

FROM

"public"."ir_attachment"

WHERE

"public"."ir_attachment"."store_fname" LIKE '%9739bf1f391e10051ed840fef5b341f9351d0536%'



this record load with data demostration, not load if is possible.


UPDATE:

odoo needs create the "odoo" system user, the calls for file temp redirects to: /opt/odoo  in your log

have :

/var/lib/odoo/

 the files existing in /opt/odoo not in /var/lib/ , run the process with user "odoo"



6
形象
丢弃
形象
Sagar Pise
最佳答案

Today I download fresh copy odoo9 community, but still same error.

0
形象
丢弃
形象
Damian Bere
编写者 最佳答案

This has now been fixed in the latest build for 9.0 (community and enterprise), and retrofitted to 8.0 as well: https://github.com/odoo/odoo/issues/9495

0
形象
丢弃
形象
Roberto Maurizzi
最佳答案

I don't know if the OP was having the same issue, but I'm testing a Docker install of Odoo and had the same problem after I had to remove my container: all rendered files are cached inside the container instead of in the db (that being the main purpose of caching them :-) ) so I'd say this is to be expected. Truncating the ir_attachment table as @Aldo said fixed the problem for me (the cached assets are recreated)

I guess that to avoid this a *different* host file system directory should be mapped on var/lib/odoo/filestore/odoo/ for each different Odoo instance that we want to run on the server.


UPDATE:

from https://hub.docker.com/_/odoo/ :

By default, Odoo 8.0 uses a filestore (located at /var/lib/odoo/filestore/) for attachments. You should restore this filestore in your new Odoo instance by running

$ docker run --volumes-from old-odoo -p 8070:8069 --name new-odoo --link db:db -t odoo

You can also simply prevent Odoo from using the filestore by setting the system parameterir_attachment.location to db-storage in Settings->Parameters->System Parameters (requires technical features).

0
形象
丢弃
喜欢讨论吗?不要只阅读,加入进来!

立即创建账户,享受专属功能,与我们的精彩社区互动!

注册
相关帖文 回复 查看 活动
Only certain user can see the portion of the website page
website odoo frontend
形象
形象
形象
2
8月 23
278
[V8] How to Implement Grouping Feature in the Odoo Front End Website?
website frontend odoo8.0
形象
形象
2
6月 16
4673
theme for website Odoo 9 ?
theme website v9
形象
形象
形象
2
1月 16
4025
Access to the homepage of the website 已解决
website v9 odooV9
形象
形象
1
1月 16
3579
ir.attachment stopped working for website images
images ir.attachment website
形象
2
11月 15
6132
社区
  • 教学视频
  • 文档
  • 论坛
开源
  • 下载
  • Github
  • Runbot
  • 翻译
服务
  • Odoo.sh 托管
  • 支持
  • 升级
  • 自定义开发服务
  • 教育
  • 查找会计服务
  • 寻找合作伙伴
  • 成为合作伙伴
关于我们
  • 我们的公司
  • 品牌资产
  • 联系我们
  • 招聘
  • 近期活动
  • 播客
  • 博客
  • 客户
  • 法律 • 隐私
  • 安全
الْعَرَبيّة 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致力于为企业管理提供高效智能的开源解决方案,是全球业内高速成长的软件服务商之一,逾七百五十万用户选择Odoo进行数字化升级。通过一系列全业务链覆盖、高度集成、简单易用的商业应用,助力企业实现信息化改革、降本增效并释放公司增长潜力。

Odoo独特的价值在于是一款非常容易使用又完全集成的应用。

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