Running trunk, saas-1 or saas-2 with workers gives and error

Bug #1241798 reported by Juan José Scarafía (ADHOC)
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Medium
OpenERP's Framework R&D

Bug Description

I'm working with ubuntu 12.04 and python 2.7
Running openerp with '--workers=4' (or any number) gives the following error.

2013-10-18 19:26:09,049 21106 ERROR ? openerp.service.workers: [Errno 2] No existe el archivo o el directorio
Traceback (most recent call last):
  File "/opt/oerpenv/chosco/testsaas2/default/local/lib/python2.7/site-packages/openerp-7.saas_2-py2.7.egg/openerp/service/workers.py", line 225, in run
    self.process_spawn()
  File "/opt/oerpenv/chosco/testsaas2/default/local/lib/python2.7/site-packages/openerp-7.saas_2-py2.7.egg/openerp/service/workers.py", line 157, in process_spawn
    self.long_polling_spawn()
  File "/opt/oerpenv/chosco/testsaas2/default/local/lib/python2.7/site-packages/openerp-7.saas_2-py2.7.egg/openerp/service/workers.py", line 99, 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] No existe el archivo o el directorio
2013-10-18 19:26:09,050 21106 INFO ? openerp.service.workers: Stopping forcefully

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

I have checked this issue with trunk version and also with saas-1 and saas-2. But its working fine with all of three. I think you may be missed some python packages , would you please check it ? and correct if i did any wrong.

Thanks & waiting for your answer.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Juan José Scarafía (ADHOC) (juanjose-scarafia) wrote :

Hi! Thanks for the quick response and the video too.
I'm running ubuntu 13.04 64b but already try it on ubuntu 12.04 64b.

I've downladed latest trunk .dev (OpenERP version 8.0dev-20131021-145759).
After installig it:
1) I stop the service (sudo service openerp stop)
2) I start it manually (openerp-server --workers=4)
This is what I get.
Are you also using python 2.7?

chosco@chosco:/opt/oerpenv/chosco/testsaas2$ openerp-server --workers=4
2013-10-21 16:16:03,458 19213 INFO ? openerp: OpenERP version 8.0dev-20131021-145759
2013-10-21 16:16:03,458 19213 INFO ? openerp: addons paths: /usr/lib/pymodules/python2.7/openerp/addons
2013-10-21 16:16:03,458 19213 INFO ? openerp: database hostname: localhost
2013-10-21 16:16:03,458 19213 INFO ? openerp: database port: 5432
2013-10-21 16:16:03,458 19213 INFO ? openerp: database user: chosco
2013-10-21 16:16:03,797 19218 INFO ? openerp.service.server: Worker WorkerHTTP (19218) alive
2013-10-21 16:16:03,799 19219 INFO ? openerp.service.server: Worker WorkerHTTP (19219) alive
2013-10-21 16:16:03,800 19220 INFO ? openerp.service.server: Worker WorkerHTTP (19220) alive
2013-10-21 16:16:03,803 19221 INFO ? openerp.service.server: Worker WorkerHTTP (19221) alive
2013-10-21 16:16:03,805 19222 INFO ? openerp.service.server: Worker WorkerCron (19222) alive
2013-10-21 16:16:03,807 19223 INFO ? openerp.service.server: Worker WorkerCron (19223) alive
2013-10-21 16:16:03,812 19213 ERROR ? openerp.service.server: [Errno 2] No existe el archivo o el directorio
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/openerp/service/server.py", line 598, in run
    self.process_spawn()
  File "/usr/lib/pymodules/python2.7/openerp/service/server.py", line 527, in process_spawn
    self.long_polling_spawn()
  File "/usr/lib/pymodules/python2.7/openerp/service/server.py", line 456, 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] No existe el archivo o el directorio
2013-10-21 16:16:03,814 19213 INFO ? openerp.service.server: Stopping forcefully

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

Thanks for your quick answer..!!

I have checked this with latest src source openerp-8.0dev-20131021-230101 from nightly build, and I have same issue as yours. So, I am confirming this issue.

Regards,

Changed in openobject-server:
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Juan José Scarafía (ADHOC) (juanjose-scarafia) wrote :

Any news with this bug? Some advice?

Revision history for this message
Esteban (tebanep) wrote :

I'm experiencing the same problem with WorkerCron and the long_polling_spawn() function. Any workarounds or solutions already? I'm using Openerp 8alpha1

Revision history for this message
Esteban (tebanep) wrote :
Download full text (4.8 KiB)

We finally found what the problem was. The error we were getting as noted before was:

eecheverry@eecheverry-HP-ENVY-TS-15-Notebook-PC:~/Downloads/Programs/Openerp/openerp-8.0dev-20140208-000102$ python openerp-server --workers 4
2014-02-08 17:56:36,596 30184 INFO ? openerp: OpenERP version 8.0dev-20140208-000102
2014-02-08 17:56:36,596 30184 INFO ? openerp: addons paths: /home/eecheverry/Downloads/Programs/Openerp/openerp-8.0dev-20140208-000102/openerp/addons
2014-02-08 17:56:36,596 30184 INFO ? openerp: database hostname: localhost
2014-02-08 17:56:36,596 30184 INFO ? openerp: database port: 5432
2014-02-08 17:56:36,596 30184 INFO ? openerp: database user: eecheverry
2014-02-08 17:56:36,657 30184 INFO ? openerp.http: HTTP Configuring static files
2014-02-08 17:56:37,496 30184 INFO ? openerp.http: Generating nondb routing
2014-02-08 17:56:37,505 30187 INFO ? openerp.service.server: Worker WorkerHTTP (30187) alive
2014-02-08 17:56:37,506 30188 INFO ? openerp.service.server: Worker WorkerHTTP (30188) alive
2014-02-08 17:56:37,507 30189 INFO ? openerp.service.server: Worker WorkerHTTP (30189) alive
2014-02-08 17:56:37,508 30190 INFO ? openerp.service.server: Worker WorkerHTTP (30190) alive
2014-02-08 17:56:37,509 30191 INFO ? openerp.service.server: Worker WorkerCron (30191) alive
2014-02-08 17:56:37,510 30192 INFO ? openerp.service.server: Worker WorkerCron (30192) alive
2014-02-08 17:56:37,514 30184 ERROR ? openerp.service.server: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/home/eecheverry/Downloads/Programs/Openerp/openerp-8.0dev-20140208-000102/openerp/service/server.py", line 581, in run
    self.process_spawn()
  File "/home/eecheverry/Downloads/Programs/Openerp/openerp-8.0dev-20140208-000102/openerp/service/server.py", line 507, in process_spawn
    self.long_polling_spawn()
  File "/home/eecheverry/Downloads/Programs/Openerp/openerp-8.0dev-20140208-000102/openerp/service/server.py", line 436, in long_polling_spawn
    popen = subprocess.Popen(nargs)
  File "/usr/lib/python2.7/subprocess.py", line 709, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1326, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
2014-02-08 17:56:37,515 30184 INFO ? openerp.service.server: Stopping forcefully

The such not file or directory error is caused by sys.argv[0] not understanding "openerp-server" as a correct path. (The actual hero in all this is Zigg in http://stackoverflow.com/questions/15725273/python-oserror-errno-2-no-such-file-or-directory)

openerp-server (or openerp-gevent) must be called with a path instead of just a filename, like "python ./openerp-server --workers 4" AND NOT "python openerp-server --workers 4".

eecheverry@eecheverry-HP-ENVY-TS-15-Notebook-PC:~/Downloads/Programs/Openerp/openerp-8.0dev-20140208-000102$ python ./openerp-server --workers 4
2014-02-08 17:59:04,017 31156 INFO ? openerp: OpenERP version 8.0dev-20140208-000102
2014-02-08 17:59:04,017 31156 INFO ? openerp: addons paths: /home/eecheverry/Downloads/Programs/Openerp/openerp-8.0dev-20140208-000102/openerp/addons
2014-02-08 17:59:04,017 31156 INFO ? openerp: data...

Read more...

Revision history for this message
Juan José Scarafía (ADHOC) (juanjose-scarafia) wrote :

Hi Esteban! thanks for your tips!
Now I can get workers alive.
Now I'm fasing this error:

Traceback (most recent call last):
  File "sources/server/openerp-gevent", line 3, in <module>
    import gevent.monkey
ImportError: No module named gevent.monkey

Server start but only on port 8069, I thought it was going to start with Gevent on port 8072 (yo I can enable chat). Any idea?
Thanks,
Juan

Revision history for this message
Juan José Scarafía (ADHOC) (juanjose-scarafia) wrote :

I think my issue is related to virtualenv and oerpenv...

Revision history for this message
Esteban (tebanep) wrote :

Hi Juan José, I think you have to install python-gevent and gevent_psycopg2. See here:

http://help.openerp.com/question/22521/how-to-activate-chat-im-in-v8-trunk/

Best regards!

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.