Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

odoo not working with variable workers > 0 #72

Closed
JordiBForgeFlow opened this issue Feb 17, 2018 · 15 comments
Closed

odoo not working with variable workers > 0 #72

JordiBForgeFlow opened this issue Feb 17, 2018 · 15 comments

Comments

@JordiBForgeFlow
Copy link
Member

JordiBForgeFlow commented Feb 17, 2018

When I play this playbook on a debian stretch using this playbook:

`

  • name: Odoo 11
    hosts: odoo11
    roles:
    • role: postgresql
      postgresql_version: 9.6
    • role: ansible-odoo
      odoo_version: 11.0
      odoo_config_unaccent: True
      odoo_config_admin_passwd: SuPerPassWorD
      odoo_config_workers: 4
      odoo_config_proxy_mode: True
      `

I get errors like this at the time of trying to start odo
image

If you create a database in odoo with workers=0 it works. But then when you restart the server with workers>0 and access as https://10.0.3.47/web?debug=assets you will again get the same error.

Possible related errors:
odoo/docker#151
odoo/odoo#20158

@JordiBForgeFlow
Copy link
Member Author

I have created an issue to odoo:
odoo/odoo#23124

@JordiBForgeFlow
Copy link
Member Author

The problem occurs also with 10.0 in debian stretch.

@satish-opensys
Copy link

The problem seems to be with lessc node package.
please try commands below -

sudo apt-get install nodejs nodejs-legacy node-less
sudo apt-get install npm
sudo npm install -g less
sudo npm install -g less-plugin-clean-css
sudo ln -s /usr/local/bin/lessc /usr/bin/lessc
sudo ln -s /usr/bin/nodejs /usr/bin/node

@sebalix
Copy link
Collaborator

sebalix commented Feb 17, 2018

@JordiBForgeFlow
Copy link
Member Author

Perhaps it is the vfersion used. Not sure. But I reproduce the error also using Ubuntu 16.04 and odoo 10 for which I never faced issues with multiple workers in non ansible installations.

Will need to compare the package versions between a working instance and the versions proposed by ansible.

Have you been able to reproduce the issue frpm your side?

I used mostly LXC containers, but also tries in a OVH server with same results

@sebalix
Copy link
Collaborator

sebalix commented Feb 17, 2018

No, from my side all was working pretty well when I integrated the NodeJS+NPM packages (I remember that I pass a huge amount of time to test every possibilities on differents distributions...).
I'll test again.
Also, it could help having an URL to test (returning 200 OK) if the CSS is well-compiled, and add it to the tests.

@satish-opensys
Copy link

Can you share screenshots of issues coming on terminal and also the Odoo Web UI

@JordiBForgeFlow
Copy link
Member Author

image

@JordiBForgeFlow
Copy link
Member Author

(b'', b'The "--no-js" argument is deprecated, as inline JavaScript is disabled by default. Use "--js" to enable inline JavaScript (not recommended).
')This error occured while compiling the bundle 'web.assets_backend' containing:
- /web/static/lib/bootstrap/less/variables.less
- /web/static/lib/bootstrap/less/mixins/vendor-prefixes.less
- /web/static/lib/bootstrap/less/mixins/buttons.less
- /web/static/lib/bootstrap/less/mixins/clearfix.less
- /web/static/lib/bootstrap/less/mixins/size.less
- /web/static/src/less/variables.less
- /web/static/src/less/utils.less
- /web_editor/static/src/less/web_editor.variables.less
- /web/static/src/less/import_bootstrap.less
- /web/static/src/less/bootstrap_overridden.less
- /web/static/src/less/webclient_extra.less
- /web/static/src/less/webclient_layout.less
- /web/static/src/less/webclient.less
- /web/static/src/less/domain_selector.less
- /web/static/src/less/model_field_selector.less
- /web/static/src/less/progress_bar.less
- /web/static/src/less/dropdown.less
- /web/static/src/less/dropdown_extra.less
- /web/static/src/less/tooltip.less
- /web/static/src/less/debug_manager.less
- /web/static/src/less/control_panel.less
- /web/static/src/less/fields.less
- /web/static/src/less/fields_extra.less
- /web/static/src/less/views.less
- /web/static/src/less/views_extra.less
- /web/static/src/less/pivot_view.less
- /web/static/src/less/graph_view.less
- /web/static/src/less/form_view.less
- /web/static/src/less/form_view_extra.less
- /web/static/src/less/list_view.less
- /web/static/src/less/list_view_extra.less
- /web/static/src/less/kanban_dashboard.less
- /web/static/src/less/kanban_column_progressbar.less
- /web/static/src/less/kanban_view.less
- /web/static/src/less/kanban_view_mobile.less
- /web/static/src/less/web_calendar.less
- /web/static/src/less/search_view.less
- /web/static/src/less/search_view_extra.less
- /web/static/src/less/data_export.less
- /web/static/src/less/base_settings.less
- /web/static/src/less/report_backend.less
- /base_import/static/src/less/base_import.less
- /web_diagram/static/src/less/diagram_view.less
- /web_editor/static/src/less/web_editor.common.less
- /web_editor/static/src/less/web_editor.backend.less
- /web_settings_dashboard/static/src/less/dashboard.less

@JordiBForgeFlow
Copy link
Member Author

Issue also reported here:odoo/docker#151

@JordiBForgeFlow
Copy link
Member Author

Ok, after a long series of back and forth I found the root cause and the issue is fixed in #69, specifically:
https://github.com/OCA/ansible-odoo/pull/69/files#diff-7eeda618087b49ae876084ab6c73fdbbR66
https://github.com/OCA/ansible-odoo/pull/69/files#diff-7eeda618087b49ae876084ab6c73fdbbR67

Cause:
The ansible role had as default values for limit_memory_hard and limit_memory_soft values that were applicable defaults for openerp 7.0 (see https://github.com/odoo/odoo/blob/7.0/openerp/tools/config.py#L288).

But for 8.0 onwards the default values were increased significantly (see for example https://github.com/odoo/odoo/blob/9.0/openerp/tools/config.py#L267), to abount 2GB of default required memory.

The standard odoo documentation is even obsolete in this point https://www.odoo.com/documentation/11.0/reference/cmdline.html

The lack of memory was causing the less to fail to compile the less files.

@sebalix
Copy link
Collaborator

sebalix commented Feb 18, 2018

@jbeficent good catch, indeed I increased these values in our internal Ansible configuration, that's why all was working well!

@oosantana
Copy link

Try

sudo apt-get install nodejs
sudo apt-get install npm
sudo npm install -g less
sudo npm install -g less-plugin-clean-css
sudo ln -s /usr/local/bin/lessc /usr/bin/lessc
sudo ln -s /usr/bin/nodejs /usr/bin/node

Restar Odoo

@JordiBForgeFlow
Copy link
Member Author

@oosantana that was not the problem. It is now solved, as I said

@majdi61
Copy link

majdi61 commented May 18, 2020

@jbeficent good catch, indeed I increased these values in our internal Ansible configuration, that's why all was working well!

pls how i do that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants