Error while installing Bahmni 0.92 - Start Odoo and enable at boot error

Hello @rakib

I am also seeing the same thing in our PROD when I check service status

    atomfeed-console is running with pid: 3876
    Service bahmni-erp-connect is running with pid: 20881
    Service bahmni-reports is running with pid: 32019
    Checking jexec statusnetconsole module not loaded
    Configured devices:
    lo ens192
    Currently active devices:
    lo ens192
    mkdir: cannot create directory ‘odoo’: File exists
    odoo-server is running...
    Service openmrs is running with pid: 4232

I’m not sure if these are related but I can’t seem to install Bahmni Atom Feed because I keep getting below error when I click install

image

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py", line 642, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py", line 684, in dispatch
    result = self._call_function(**self.params)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py", line 334, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/service/model.py", line 101, in wrapper
    return f(dbname, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py", line 327, in checked_call
    result = self.endpoint(*a, **kw)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py", line 942, in __call__
    return self.method(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/http.py", line 507, in response_wrap
    response = f(*args, **kw)
  File "/opt/bahmni-erp/odoo/addons/web/controllers/main.py", line 899, in call_button
    action = self._call_kw(model, method, args, {})
  File "/opt/bahmni-erp/odoo/addons/web/controllers/main.py", line 887, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/api.py", line 689, in call_kw
    return call_kw_multi(method, model, args, kwargs)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/api.py", line 680, in call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/bahmni-erp/odoo/addons/base/module/module.py", line 413, in button_immediate_install
    return self._button_immediate_function(type(self).button_install)
  File "/opt/bahmni-erp/odoo/addons/base/module/module.py", line 495, in _button_immediate_function
    modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/modules/registry.py", line 83, in new
    odoo.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/modules/loading.py", line 377, in load_modules
    loaded_modules, update_module, models_to_check)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/modules/loading.py", line 270, in load_marked_modules
    perform_checks=perform_checks, models_to_check=models_to_check
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/modules/loading.py", line 182, in load_module_graph
    _load_data(cr, module_name, idref, mode, kind='data')
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/modules/loading.py", line 96, in _load_data
    tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/tools/convert.py", line 840, in convert_file
    convert_csv_import(cr, module, pathname, fp.read(), idref, mode, noupdate)
  File "/usr/lib/python2.7/site-packages/odoo-10.0.post20190619-py2.7.egg/odoo/tools/convert.py", line 896, in convert_csv_import
    raise Exception(_('Module loading %s failed: file %s could not be processed:\n %s') % (module, fname, warning_msg))
Exception: Module loading bahmni_atom_feed failed: file bahmni_atom_feed/security/ir.model.access.csv could not be processed:
 No matching record found for external id 'model_order_picking_type_mapping' in field 'Object'
Missing required value for the field 'Object' (model_id)
No matching record found for external id 'model_drug_service_create' in field 'Object'
Missing required value for the field 'Object' (model_id)

Thanks @mupagasi ! It worked just like that. :+1:

And let me be quick to add that while @mupagasi’s :point_up_2: solved the immediate challenge below :point_down:;

I encountered another challenge [Odoo Error: mkdir: cannot create directory ‘odoo’: File exists odoo-server is stopped]

Then a further research revealed @rakib had the solution:

After applying both proposed solutions, my Odoo 10 is now firing up good:

Thanks a bunch guys :+1: :+1:

1 Like

Thank you soooo much, @rakib. :+1: :+1:

My Odoo 10 is now firing up good

1 Like

i did all the steps that @rakib and @utsavdeshar said but still the problem is not solved.

TASK [bahmni-odoo : Start Odoo and enable at boot] ****************************************************************************************************************************************** task path: /opt/bahmni-installer/bahmni-playbooks/roles/bahmni-odoo/tasks/main.yml:112 fatal: [localhost]: FAILED! => {“changed”: false, “msg”: “Unable to start service odoo: Job for odoo.service failed. See “systemctl status odoo.service” and “journalctl -xe” for details.\n”} to retry, use: --limit @/opt/bahmni-installer/bahmni-playbooks/all.retry

PLAY RECAP ********************************************************************************************************************************************************************************** localhost : ok=238 changed=88 unreachable=0 failed=1

Traceback (most recent call last): File “/bin/bahmni”, line 9, in load_entry_point(‘bahmni==0.1’, ‘console_scripts’, ‘bahmni’)() File “/usr/lib/python2.7/site-packages/click/core.py”, line 829, in call return self.main(*args, **kwargs) File “/usr/lib/python2.7/site-packages/click/core.py”, line 782, in main rv = self.invoke(ctx) File “/usr/lib/python2.7/site-packages/click/core.py”, line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File “/usr/lib/python2.7/site-packages/click/core.py”, line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File “/usr/lib/python2.7/site-packages/click/core.py”, line 610, in invoke return callback(*args, **kwargs) File “/usr/lib/python2.7/site-packages/click/decorators.py”, line 21, in new_func return f(get_current_context(), *args, **kwargs) File “/usr/lib/python2.7/site-packages/bahmni-0.1-py2.7.egg/bahmni.py”, line 90, in install File “/usr/lib64/python2.7/subprocess.py”, line 542, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command ‘ansible-playbook -i /etc/bahmni-installer/local all.yml -vv --extra-vars ‘@/etc/bahmni-installer/rpm_versions.yml’ --extra-vars ‘@/etc/bahmni-backrest.conf’ --extra-vars ‘@/etc/bahmni-installer/setup.yml’’ returned non-zero exit status 2

Run the command journalctl -xe, it will give the missing package required during odoo installation. I think the first package it is xlsxwriter (pip install xlsxwriter) and after that the missing package will be list which need to be installed one by one.

@utsavdeshar i installed xlsxwriter with pip install xlsxwriter and also the journalctl -xe shows

– Unit odoo.service has begun starting up. Aug 17 18:33:38 ip-172-31-5-255 odoo[1039]: mkdir: cannot create directory ‘odoo’: File exists Aug 17 18:33:38 ip-172-31-5-255 runuser[1048]: pam_unix(runuser:session): session opened for user odoo by (uid=0) Aug 17 18:33:38 ip-172-31-5-255 runuser[1048]: pam_unix(runuser:session): session closed for user odoo Aug 17 18:33:38 ip-172-31-5-255 odoo[1039]: Starting Odoo Server Daemon (odoo-server): [ OK ] Aug 17 18:33:38 ip-172-31-5-255 odoo[1039]: setsid: failed to execute /usr/bin/odoo: No such file or directory Aug 17 18:33:38 ip-172-31-5-255 systemd[1]: Can’t open PID file /var/run/odoo/odoo-server.pid (yet?) after start: No such file or directory Aug 17 18:33:38 ip-172-31-5-255 systemd[1]: Failed to start LSB: Launches the Odoo server… – Subject: Unit odoo.service has failed – Defined-By: systemd – Support: systemd-devel Info Page

– Unit odoo.service has failed.

Hi dmukungi, I have the exact same error of what apuda is having(bahmni-odoo : Start Odoo and enable at boot). Getting the exact same Stacktrace error lines. So, I run pip uninstall beautifulsoup4, and pip install beautifulsoup4 commands. Then, I rerun the Bahmni install command but, still getting this same error. I am trying to install Bahmni 0.92 on CentOS 7.9. Can you please help?? Thank you so much. Zaw.

Hello apuda, I am getting exact same error of what you have from your screenshot pic. I tried to unstall beautifulsoup4 and reinstall it exactly as this above Error while installing Bahmni 0.92 - Start Odoo and enable at boot error. But, I am still getting the same error after I did that. Can you help me on how did you resolved this error when you had before? thanks, Zaw.

Try the following:

> pip uninstall beautifulsoup4
> pip install beautifulsoup4==v4.9.3
> pip uninstall xlsxwriter
> pip install xlsxwriter==v2.0.0

Hello @angshuonline, I have tried with the following commands you provided but still facing the same outcome. Can you please recheck and share us the resolution as we are struggling with this issue.

please provide details.

  • what Bahmni version? what OS version?
  • whats the error? when does it happen? did it install properly?
  • have you checked error logs?

Bahmni V0.93 has been released yesterday. The install instructions are available here: https://bahmni.atlassian.net/wiki/spaces/BAH/pages/33128505/Install+Bahmni+on+CentOS

I installed Bahmni yesterday on fresh Centos v7.6, and it got setup fine. I did need to login to OpenMRS first and click on “Rebuild Search Index”. After that EMR UI worked fine.

Here is my install log (and commands I fired on CentOS) - file attached. Bahmni v93 Install Log on CentosV76.txt (2.6 MB)

Bahmni Version: 0.92-155 OS: Centos 7.6 Error: "Unable to start service odoo: Job for odoo.service failed. See “systemctl status odoo.service” I have already fired these commands

  • pip uninstall beautifulsoup4
  • pip install beautifulsoup4==v4.9.3
  • pip uninstall xlsxwriter
  • pip install xlsxwriter==v2.0.0

But still facing the problem at the time of installation. Thank you

Hello,

Bahmni version: 0.93.219 (latest).

OS: Centos 7.6

Error: Unable to start service odoo: Job for odoo.service failed

Error logs: