Skip to content

Instantly share code, notes, and snippets.

@sudoevans
Created June 6, 2024 15:39
Show Gist options
  • Save sudoevans/c760341573239e13399654e2c425d03f to your computer and use it in GitHub Desktop.
Save sudoevans/c760341573239e13399654e2c425d03f to your computer and use it in GitHub Desktop.
Permissions Issue with `odoo-server.conf` Causing Service to Exit Immediately

Issue Description:

Problem: After running the Odoo installation script from Yenthe666's InstallScript, everything seemed to work well i get the

Done! The Odoo server is up and running. Specifications: Port: 8069 User service: odoo ...... bla bla bla

However, when checking the status of the Odoo service using sudo service odoo-server status, the status displayed as active (exited) instead of active (running).

Error Log: Checking the Odoo log file (/var/log/odoo/odoo-server.log) showed errors indicating that the Odoo server couldn't read the configuration file.

Cause: The issue was due to incorrect permissions for the odoo-server.conf file located in the /etc directory. For some reason, the file permissions were changed, causing the Odoo service to start and then immediately exit.

Solution:

To resolve the issue, I manually changed the permissions of the odoo-server.conf file to ensure the Odoo user had the necessary read and write permissions.

Steps to Fix:

  1. Change the ownership of the odoo-server.conf file to the Odoo user:

    sudo chown -R odoo:odoo /etc/odoo-server.conf
  2. Restart the Odoo service:

    sudo systemctl daemon-reload
    sudo systemctl restart odoo-server
    sudo systemctl status odoo-server

After performing these steps, the Odoo service status changed to active (running) as expected.

Environment:

I wonder why that is, It would be helpful to investigate why the permissions of the odoo-server.conf file were changed during or after the installation process.

I and I hope this helps someone :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment