简体   繁体   中英

Not able to run Odoo with --workers option

I am trying to run Odoo8 in multiprocessing mode using --workers option. It runs fine without --workers parameter but with the --workers parameter it gives me error

socket.error: [Errno 98] Address already in use

It seems like each of the worker process is trying to bind to one port.

Here is my run configuration

python openerp-server --addons-path my_adons_paths --db_user my_db_user --db_password my_db_password --db-filter my_db_to_use --no-database-list --workers 2

Am I doing something wrong here or there is some bug in Odoo?

I have checked there is no process already running on 8069 port, also server runs fine without --workers 2 parameter. That is with

python openerp-server --addons-path my_adons_paths --db_user my_db_user --db_password my_db_password --db-filter my_db_to_use --no-database-list

I also have a lot of problems when I set workers greater than zero. It's very weird that you are getting the error Address already in use and you don't have any process running there. When I get that error, I kill all processes running on the Odoo port and then I can start Odoo again.

Just in case, try doing this before starting the Odoo server again:

sudo fuser -k 8069/tcp

Ok, I got the issue resolved!

Problem was from my side. For debugging (which has not been possible without this) I had evented = False in my odoo/openerp/__init__.py file.

To be more specific I had these lines commented

if sys.modules.get("gevent") is not None:
    evented = True

Which caused the issue, setting it to True again (enabling the above lines) solved the problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM