Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyectos
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

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

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
filestoreir.attachmentwebsitefrontendv9
6 Respuestas
29756 Vistas
Avatar
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
Avatar
Descartar
Damian Bere
Autor

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
Autor

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

Avatar
aldo
Mejor respuesta

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
Avatar
Descartar
Avatar
Sagar Pise
Mejor respuesta

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

0
Avatar
Descartar
Avatar
Damian Bere
Autor Mejor respuesta

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
Avatar
Descartar
Avatar
Roberto Maurizzi
Mejor respuesta

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
Avatar
Descartar
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Only certain user can see the portion of the website page
website odoo frontend
Avatar
Avatar
Avatar
2
ago 23
278
[V8] How to Implement Grouping Feature in the Odoo Front End Website?
website frontend odoo8.0
Avatar
Avatar
2
jun 16
4676
theme for website Odoo 9 ?
theme website v9
Avatar
Avatar
Avatar
2
ene 16
4027
Access to the homepage of the website Resuelto
website v9 odooV9
Avatar
Avatar
1
ene 16
3586
ir.attachment stopped working for website images
images ir.attachment website
Avatar
2
nov 15
6149
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y estar totalmente integrado.

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