Odoo Help


unable to start openerp-server with gevent

on 3/19/14, 9:30 AM 5,970 views

still I haven’t started my openerp server --gevent on window so I tried it on ubuntu but still I am getting error

Internal Server Error {"message": "OpenERP Server Error", "code": 200, "data": {"debug": "Server Traceback (most recent call last):\n File \"/opt/openerp/server/openerp/addons/web/session.py\", line 89, in send\n return openerp.netsvc.dispatch_rpc(service_name, method, args)\n File \"/opt/openerp/server/openerp/netsvc.py\", line 296, in dispatch_rpc\n result = ExportService.getService(service_name).dispatch(method, params)\n File \"/opt/openerp/server/openerp/service/web_services.py\", line 122, in dispatch\n return fn(params)\n File \"/opt/openerp/server/openerp/service/web_services.py\", line 359, in exp_list\n cr = db.cursor()\n File \"/opt/openerp/server/openerp/sql_db.py\", line 484, in cursor\n return Cursor(self._pool, self.dbname, serialized=serialized)\n File \"/opt/openerp/server/openerp/sql_db.py\", line 182, in __init__\n self._cnx = pool.borrow(dsn(dbname))\n File \"/opt/openerp/server/openerp/sql_db.py\", line 377, in _locked\n return fun(self, *args, *kwargs)\n File \"/opt/openerp/server/openerp/sql_db.py\", line 440, in borrow\n result = psycopg2.connect(dsn=dsn, connection_factory=PsycoConnection)\n File \"/usr/lib/python2.7/dist-packages/psycopg2/__init__.py\", line 179, in connect\n connection_factory=connection_factory, async=async)\n File \"/usr/local/lib/python2.7/dist-packages/gevent_psycopg2.py\", line 52, in gevent_wait_callback\n state = conn.poll()\nOperationalError: asynchronous connection failed\n\nClient Traceback (most recent call last):\n File \"/opt/openerp/server/openerp/addons/web/http.py\", line 285, in dispatch\n r = method(self, **self.params)\n File \"/opt/openerp/server/openerp/addons/web/controllers/main.py\", line 570, in index\n db, redir = db_monodb_redirect(req)\n File \"/opt/openerp/server/openerp/addons/web/controllers/main.py\", line 98, in db_monodb_redirect\n return db_redirect(req, not config['list_db'])\n File \"/opt/openerp/server/openerp/addons/web/controllers/main.py\", line 109, in db_redirect\n dbs = db_list(req, True)\n File \"/opt/openerp/server/openerp/addons/web/controllers/main.py\", line 90, in db_list\n dbs = proxy.list(force)\n File \"/opt/openerp/server/openerp/addons/web/session.py\", line 30, in proxy_method\n result = self.session.send(self.service_name, method, *args)\n File \"/opt/openerp/server/openerp/addons/web/session.py\", line 103, in send\n raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)\nFault: <fault asynchronous="" connection="" failed:="" 'traceback="" (most="" recent="" call="" last):\\n="" file="" \"="" opt="" openerp="" server="" openerp="" addons="" web="" session.py\",="" line="" 89,="" in="" send\\n="" return="" openerp.netsvc.dispatch_rpc(service_name,="" method,="" args)\\n="" file="" \"="" opt="" openerp="" server="" openerp="" netsvc.py\",="" line="" 296,="" in="" dispatch_rpc\\n="" result="ExportService.getService(service_name).dispatch(method," params)\\n="" file="" \"="" opt="" openerp="" server="" openerp="" service="" web_services.py\",="" line="" 122,="" in="" dispatch\\n="" return="" fn(*params)\\n="" file="" \"="" opt="" openerp="" server="" openerp="" service="" web_services.py\",="" line="" 359,="" in="" exp_list\\n="" cr="db.cursor()\\n" file="" \"="" opt="" openerp="" server="" openerp="" sql_db.py\",="" line="" 484,="" in="" cursor\\n="" return="" cursor(self._pool,="" self.dbname,="" serialized="serialized)\\n" file="" \"="" opt="" openerp="" server="" openerp="" sql_db.py\",="" line="" 182,="" in="" __init__\\n="" self._cnx="pool.borrow(dsn(dbname))\\n" file="" \"="" opt="" openerp="" server="" openerp="" sql_db.py\",="" line="" 377,="" in="" _locked\\n="" return="" fun(self,="" *args,="" **kwargs)\\n="" file="" \"="" opt="" openerp="" server="" openerp="" sql_db.py\",="" line="" 440,="" in="" borrow\\n="" result="psycopg2.connect(dsn=dsn," connection_factory="PsycoConnection)\\n" file="" \"="" usr="" lib="" python2.7="" dist-packages="" psycopg2="" __init__.py\",="" line="" 179,="" in="" connect\\n="" connection_factory="connection_factory," async="async)\\n" file="" \"="" usr="" local="" lib="" python2.7="" dist-packages="" gevent_psycopg2.py\",="" line="" 52,="" in="" gevent_wait_callback\\n="" state="conn.poll()\\nOperationalError:" asynchronous="" connection="" failed\\n'="">\n", "fault_code": "asynchronous connection failed", "type": "server_exception"}}

Let's resume, can you tell me which procedure did you followed ? is it from http://febru.soluvas.com/2013/09/how-to-activate-instant-messaging-on.html ? or others links ?

Med Said BARA
on 4/10/14, 11:16 AM

Add the following lines to your openerp-server.conf: gevent = True and longpolling_port = 8072

Med Said BARA
on 4/11/14, 7:29 AM

With which command did you start the server? Post your openerp-server.conf.

Med Said BARA
on 4/11/14, 7:57 AM

yes I have created database and also installed some module when I copy the Im, and Im_livechat modules into addons path and adding gevent features it is throwing error. tell me is it possible to activate instant messenger on windows I've tried all possible ways "import error" there is no greentlet module

on 4/12/14, 3:06 AM
Med Said BARA
on 4/12/14, 12:08 PM

greenlet error Traceback (most recent call last): File "openerp-server", line 5, in <module> File "D:\openerp\OpenERP\server\server.\openerp\cli__init__.py", line 61, in main o.run(args) File "D:\openerp\OpenERP\server\server.\openerp\cli\server.py", line 285, in runmain(args) File "D:\openerp\OpenERP\server\server.\openerp\cli\server.py", line 233, in main import gevent File "D:\openerp\OpenERP\server\server.\gevent__init__.py", line 36, in <module> from gevent.hub import get_hub, iwait, wait File "D:\openerp\OpenERP\server\server.\gevent\hub.py"

on 4/17/14, 7:16 AM

Your Copy/Paste is too short. Paste more lines from log

Med Said BARA
on 4/17/14, 9:00 AM

Med Said BARA

--Med Said BARA--
| 5 5 7
--Med Said BARA--
Med Said BARA
On 3/20/14, 2:13 PM


The error is probably in your openerp-server.conf.

Copy paste the content of your file or attach it

The error message you get means that the Starting Option "gevent" is unrecognized

Did you read This

Perhaps, you will have better luck, by following this Question

Python dependencies and Windows

Your problem is that you are running OpenERP under windows:

I suppose that you have python installed somewhere in a folder Drive x:\python27..

When you install a python external dependency for OpenERP, this dependecy module is installed in the subfolder Drive x:\Python27\Lib\site-packages\Dependencie Module Name

What you should do after having the dependency installed under python, is to copy the dependency folder, to C:\Program Files\OpenERP 7.0-20140118-002423\Server\server..

For example:

After installing gevent, you will find this module under drive x:\Python27\Lib\site-packages\gevent-1.0-py2.7-win32.egg\gevent.

Copy the gevent folder to C:\Program Files\OpenERP 7.0-20140118-002423\Server\server..

This way OpenERP can find the dependency.

Conflict between python versions:

It seems that your windows python version differs from the OpenERP python version.

In windows install the same version of python as for your OpenERP Instance, and after that download the correct version from here, install it, delete the gevent module you copied before(in OpenERP) and replace it with the new one

But, if you will encounter some problems about greenlet, libevent ... !, see below

In this case, try to follow the instructions here , here and here.

Let's resume from: gevent-psycopg2 connection failure.

What means : OperationalError:" asynchronous="" connection="" failed

In psycopg2, OperationalError is a subclass of DatabaseError , it's a kind of errors related to database (as stated in the psycopg2 documentation:

exception psycopg2.OperationalError

       Exception raised for errors that are related to the database’s operation and not necessarily under the control of the programmer, e.g. an unexpected disconnect occurs, the data source name is not found, a transaction could not be processed, a memory allocation error occurred during processing, etc. It is a subclass of DatabaseError.

Or wrong parameters related to Database in openerp-server.conf .

About your openerp-server.conf.

REMARK 1_ Duplicated lines (Comment the duplicated lines, for db_user choose between openerp and keshav according to your installation ):

admin_passwd = admin

db_host = False

db_port = False

db_user = openerp

db_password = 123

addons_path = /opt/openerp/server/openerp-7.0-20140407-232745/openerp/addons, /addons

admin_passwd = admin

db_host = False

db_port = False

db_user = keshav

db_password = 123

addons_path = /opt/openerp/server/openerp-7.0-20140407-232745/openerp/addons, /addons


;Log settings _ add the file name openerp-server.log

logfile = /var/log/opener/openerp-server.log

REMARK 3_ add the following lines.

netrpc = True

netrpc_interface =

netrpc_port = 8070

xmlrpc = True

xmlrpc_interface =

xmlrpc_port = 8069

xmlrpcs = True

xmlrpcs_interface =

xmlrpcs_port = 8071

gevent = True

longpolling_port = 8072

About your install Directory

According to the paths in your openerp-server.conf and in your log, it seems to me that you installed the new version (openerp-7.0-20140407-232745) over the old one.

Steps to verify:

go under /opt/openerp/server/openerp-7.0-20140407-232745/openerp/ and see if there are the same subfolder as under /opt/openerp/

Or run openerp without gevent, just to see if it starts, and if so login and verify which version is running (By opening the About OpenERP menu:

About OpenERP

About Database.

Did you created a database and installed some modules after OpenERP installation ?

Which error ?

Med Said BARA
on 3/24/14, 9:24 AM

you haven't installed the monkey patch

Med Said BARA
on 3/24/14, 9:25 AM

By installing gevent_psycopg2: Patches psycopg2 egg for gevent. All the requirements are described here https://bitbucket.org/anybox/web_socketio

Med Said BARA
on 3/24/14, 9:45 AM

Where and when you are getting this error ("Instant messaging is not started with this server") ?

Med Said BARA
on 3/24/14, 11:01 AM

I've copied gevent folder into openerp-server folder while trying to start the server getting error from psycopg2._psycopg import BINARY, NUMBER, STRING, DATETIME, ROWID ImportError: Module use of python27.dll conflicts with this version of Python.

on 4/3/14, 5:51 AM

thank you thanks a lot I've achieved it on ubuntu but still I didn't start instant messaging on windows platform please help me Med Said BARA

on 4/12/14, 5:54 AM

The main difference for OpenERP, when installed under Linux or Windows is the Python Dependencies. After installing a Python dependency under Windows, you must copy it from ".\python2.x\lib\site-packages" to "X:\Program Files\OpenERP 7.0-xxxxxxxxxx\Server\server", this is because OpenERP use it's own python executable. For the rest, the things remains the same. Just follow the same steps as for Linux.

Med Said BARA
on 4/12/14, 11:22 AM

Under windows, what errors do you get, this time?

Med Said BARA
on 4/12/14, 11:27 AM
On 3/19/14, 11:05 AM

Looks like bad indentation in Python script. As message says, check C:\Program Files\OpenERP 7.0-20140118-002423\Server\server.\openerp\too ls\config.py", file at line 113

I've verified my script however I am unable to find the problem

on 3/20/14, 2:18 AM

how do you start your server ? Is it by command line, if so post it.

Med Said BARA
on 3/21/14, 12:59 PM

I've tried to start through command line by using openerp-server --gevent command

on 3/24/14, 2:17 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 3/19/14, 9:30 AM
Seen: 5970 times
Last updated: 3/16/15, 8:10 AM