[v8] --workers OSError: [Errno 2] Aucun fichier ou dossier de ce type

Bug #1317269 reported by Maxime Chambreuil (http://www.savoirfairelinux.com)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenERP buildout recipe
Fix Released
Critical
Unassigned

Bug Description

Using 1.8.3 recipe with OpenERP trunk, I get the following error message when starting OpenERP :

max@thinkpad-x230:~/openerp/8.0$ ./bin/start_openerp
2014-05-07 21:03:24,467 25460 INFO ? openerp: OpenERP version 8.0alpha1
2014-05-07 21:03:24,467 25460 INFO ? openerp: addons paths: ['/home/max/.local/share/OpenERP/addons/8.0', u'/home/max/openerp/8.0/bzr/web/addons', u'/home/max/openerp/8.0/git/openerp/addons', u'/home/max/openerp/8.0/bzr/addons', u'/home/max/openerp/8.0/bzr/server/openerp/addons', '/opt/openerp/8.0/server/openerp/addons']
2014-05-07 21:03:24,467 25460 INFO ? openerp: database hostname: localhost
2014-05-07 21:03:24,467 25460 INFO ? openerp: database port: 5432
2014-05-07 21:03:24,467 25460 INFO ? openerp: database user: openerp8dev
2014-05-07 21:03:24,557 25465 INFO ? openerp.service.server: Worker WorkerHTTP (25465) alive
2014-05-07 21:03:24,558 25466 INFO ? openerp.service.server: Worker WorkerHTTP (25466) alive
2014-05-07 21:03:24,559 25467 INFO ? openerp.service.server: Worker WorkerHTTP (25467) alive
2014-05-07 21:03:24,560 25468 INFO ? openerp.service.server: Worker WorkerHTTP (25468) alive
2014-05-07 21:03:24,561 25469 INFO ? openerp.service.server: Worker WorkerCron (25469) alive
2014-05-07 21:03:24,568 25460 ERROR ? openerp.service.server: [Errno 2] Aucun fichier ou dossier de ce type
Traceback (most recent call last):
  File "/opt/openerp/8.0/server/openerp/service/server.py", line 620, in run
    self.process_spawn()
  File "/opt/openerp/8.0/server/openerp/service/server.py", line 537, in process_spawn
    self.long_polling_spawn()
  File "/opt/openerp/8.0/server/openerp/service/server.py", line 466, in long_polling_spawn
    popen = subprocess.Popen(nargs)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
OSError: [Errno 2] Aucun fichier ou dossier de ce type
2014-05-07 21:03:24,568 25460 INFO ? openerp.service.server: Stopping forcefully

It works when I execute :

max@thinkpad-x230:~/openerp/8.0$ /home/max/openerp/8.0/git/openerp/tools/parts/../../../../bzr/server/openerp-server -c /home/max/openerp/8.0/etc/dev.cfg
2014-05-07 21:07:57,156 25579 INFO ? openerp: OpenERP version 8.0alpha1
2014-05-07 21:07:57,156 25579 INFO ? openerp: addons paths: ['/home/max/.local/share/OpenERP/addons/8.0', u'/home/max/openerp/8.0/bzr/web/addons', u'/home/max/openerp/8.0/git/openerp/addons', u'/home/max/openerp/8.0/bzr/addons', u'/home/max/openerp/8.0/bzr/server/openerp/addons', '/opt/openerp/8.0/server/openerp/addons']
2014-05-07 21:07:57,156 25579 INFO ? openerp: database hostname: localhost
2014-05-07 21:07:57,156 25579 INFO ? openerp: database port: 5432
2014-05-07 21:07:57,156 25579 INFO ? openerp: database user: openerp8dev
2014-05-07 21:07:57,232 25584 INFO ? openerp.service.server: Worker WorkerHTTP (25584) alive
2014-05-07 21:07:57,233 25585 INFO ? openerp.service.server: Worker WorkerHTTP (25585) alive
2014-05-07 21:07:57,235 25586 INFO ? openerp.service.server: Worker WorkerHTTP (25586) alive
2014-05-07 21:07:57,236 25587 INFO ? openerp.service.server: Worker WorkerHTTP (25587) alive
2014-05-07 21:07:57,238 25588 INFO ? openerp.service.server: Worker WorkerCron (25588) alive
2014-05-07 21:07:57,544 25589 INFO ? openerp: OpenERP version 8.0alpha1
2014-05-07 21:07:57,544 25589 INFO ? openerp: addons paths: ['/home/max/.local/share/OpenERP/addons/8.0', u'/home/max/openerp/8.0/bzr/web/addons', u'/home/max/openerp/8.0/git/openerp/addons', u'/home/max/openerp/8.0/bzr/addons', u'/home/max/openerp/8.0/bzr/server/openerp/addons', '/opt/openerp/8.0/server/openerp/addons']
2014-05-07 21:07:57,544 25589 INFO ? openerp: database hostname: localhost
2014-05-07 21:07:57,544 25589 INFO ? openerp: database port: 5432
2014-05-07 21:07:57,544 25589 INFO ? openerp: database user: openerp8dev
2014-05-07 21:07:57,621 25589 INFO ? openerp.service.server: Evented Service (longpolling) running on 0.0.0.0:8072

Related branches

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :
Changed in anybox.recipe.openerp:
status: New → Confirmed
Revision history for this message
Laurent Mignon (Acsone) (lmi) wrote :

Hi,

I've the same problem, The bug appear when we try to launch the server in a multi worker mode ( --workers=2). I've fixed the bug on my machine. A MP will follow.

Regards,

lmi

Revision history for this message
Georges Racinet (gracinet) wrote :

Thanks for the report, Maxime.
Thanks for the fix, Laurent.

summary: - OSError: [Errno 2] Aucun fichier ou dossier de ce type
+ [v8] --workers OSError: [Errno 2] Aucun fichier ou dossier de ce type
Changed in anybox.recipe.openerp:
milestone: none → 1.8.4
status: Confirmed → Fix Committed
Revision history for this message
Georges Racinet (gracinet) wrote :

Actually, Laurent's fix is not enough anymore on odoo.
It allows to find the openerp-gevent script that ships with odoo, but that script can't run in the buildout context, for two reasons:

* it has an hardcoded shebang on /usr/bin/env python
* it can't have the sys.path initialization that is the core principle of zc.buildout.

Basically, that gevent-openerp should have been the one generated by setup.py and should not be versioned with the sources. Besides, the launcher should not make any assumptions on its name or path. I'll try and explain that to the odoo team.

In any case, we need to have the recipe generate the proper script (that's easy, and the right thing to do for split running) and to register it in some way so that the --workers spawner will call it.

Maybe I should file a new ticket on the recipe for that.

Changed in anybox.recipe.openerp:
status: Fix Committed → In Progress
Revision history for this message
Georges Racinet (gracinet) wrote :

Forgot to add that current exception is an ImportError on gevent.monkey.
And that's because the gevent script has none of the recipe's paths

This may not be so visible with buildouts that aren't isolated by a virtualenv, on hosts having global gevent and gevent-psycopg2 packages.

Revision history for this message
Georges Racinet (gracinet) wrote :

Fixed at the end of may by implementing the plan as explained above.

Changed in anybox.recipe.openerp:
importance: Undecided → Critical
status: In Progress → Fix Committed
Changed in anybox.recipe.openerp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.