support Click to see our new support page.

How to autostart the odoo server when down

8_blog_img
Author

Sarin RajApril 17, 2019

When Odoo server is down we have to manually restart the Odoo service. Instead of this autostart Odoo server, when down by using Monit service. It is a helpful program that automatically monitors and manages server programs. Additionally monit comes with a basic web interface through which all of the processes can be set up. Few easy steps to create a script that will automatically start your odoo server when Ubuntu reboots.

Install Monit
Install monit package in our odoo server by terminal

sudo apt-get install monit

Adding Odoo Service in Monit Configuration File

After the installation completed, adding the Odoo service program to monitor into the /etc/monit.conf under RedhHat/CentOS/Fedora and /etc/monit/monitrc file for Ubuntu/Debian/Linux Mint at the services section.

sudo vim /etc/monit/monitrc
check process odoo-server with pidfile /var/run/odoo-server.pid
start program "/etc/init.d/odoo-server start"
stop program "/etc/init.d/odoo-server stop"

And change The control file '/etc/monit/monitrc' permission to 0700. Once configured Odoo service program for monitoring, check if there is any error in monit syntax by the following command,

Starting Monit Service

When will be finishing all configurations finally we will start the monit service.

sudo /etc/init.d/monit start

when Odoo service will down the monit function automatically detect that and restarting the Odoo service.

Status of Monit Service

sudo /etc/init.d/monit status

From this we can know about the status of the monit service and also we can see that Odoo service is monitoring in monit function.

Monit -t

If there  any error occurred correct them. When we get a error free message like “ Control file syntax OK “, then we proceed ahead.

auto start the odoo server when down

As the part of Odoo server maintaining, it is very easy to handle the server in the case of any odoo server failure.

odoo_erp_services

LinkedIn LinkedIn