Odoo Help


How do I completely STOP and START openerp server

on 10/4/13, 8:45 PM 68,520 views

Hi I'm developing a module and constantly making changes to the module.

To stop and start the deb Openerp server I use

sudo /etc/init.d/openerp stop and sudo /etc/init.d/openerp start

However I've noticed its not very consistent! More often than not, errors are not cleared

I'm having do a sudo reboot to make sure , but this is very time consuming!

Does anyone know of a better way? OR is their another service I need to stop?

EDIT The behavior is ....I'll right some bad code (I'm good at this) transfer the module to the addons folder restart the openerp server and I'll get some error message (openerp obviously runs through the addons code to check and validate it), Then I'll remove the module, restart the server, but the error wont clear until I reboot.

THOUGHTS Could it be a python or postgresql service?

RESEARCH If if I use ps -Al to list running services then sudo /etc/init.d/openerp stop followed by `ps -Al again, I can identify that openerp-server is stopped by this command!

if i am logged in to openerp and i do a /etc/init.d/openerp restart, i go back to the browser and refresh and I am still logged in. All I know so far is that web server role and the session handling is done by a python module called werkzeug. in my system it is at /usr/lib/python2.7/dist-packages/werkzeug. if you want to reset the state of web side of things, you may want to search further there. if you are developing/testing, you may try the usual steps of clearing the cache on the browser, etc.

Mr. Kinjal Dixit
on 10/5/13, 8:35 AM

Can you give an example of the behavior you get? because if you save your code changes, restart the server and update your modified module, this behavior should not happen.

IBS Group
on 10/6/13, 3:14 PM

Cheers Karim - please see EDIT above.

on 10/6/13, 7:08 PM

Can you share the error you are getting?

IBS Group
on 10/6/13, 7:10 PM

Cheers Kinjal, Yes I to have I've noticed you stay logged in when you stop / start the server. (I wonder if their is a security issue here?) However I don't think this is the cause of my problem! - please see the Edit above. I'm going to try Andreas offering and see how I go! - I suppose the real answer is to write better code first time!

on 10/6/13, 7:13 PM

I've forgotten the error, when I get it again I'll report it , but I'm 99.9% sure the error relates to my poor code and is not relevant to this issue. The error message relates to me trying to work out how to use fields.related see here...http://help.openerp.com/question/32739/retrieve-a-field-using-related-to-select-a-selection-field/

on 10/6/13, 7:39 PM

Andreas Brueckl

--Andreas Brueckl--

| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 10/6/13, 4:46 PM

Sometimes it happens that there is a deadlock in postgresql. You can see such situations if you see waiting postgres processes when you execute ps ax .

For a complete restart perform:

  • service openerp-server stop
  • service postgresql restart
  • service openerp-server start

(I assume that you have the required scripts in /etc/init.d)

Many thanks... I was starting to think that I imagined it as I had experianced the problem since reporting it ..sods law!

I dont have openerp-server in init.d, I have openerp - also ubuntu server, so I'll try

sudo service openerp stop

sudo service postgresql restart

sudo service openerp start

and see how it goes

on 10/6/13, 6:47 PM

rebooting the computer (sudo shutdown -r now in your case) on which OpenERP is installed would do the job as well. Maybe not as elegant as the "service .... restart" solution by Andreas but if someone is in doubt .... this will work.

on 10/8/13, 11:45 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

4 follower(s)


Asked: 10/4/13, 8:45 PM
Seen: 68520 times
Last updated: 10/30/17, 2:53 PM