Cannot run odoo while Openmrs is running

Hi all, I installed Bahmni 0.92 sucessfully on CentOS 7.7 in vagrant machine without error, but I get error “mkdir: cannot create directory ‘odoo’: File exists odoo-server is stopped” while OpenMRS and OpenElis is running fine. Can someone help me finding the solution?

Can you post the result of this command

journalctl -u odoo

[root@localhost vagrant]# journalctl -u odoo – Logs begin at आइत 2020-01-26 16:00:22 +0545, end at सोम 2020-01-27 09:52:12 +0545. – जनवरी 26 16:00:25 localhost.localdomain systemd[1]: [/run/systemd/generator.late/odoo.service:12] Failed to add dependency on <%=.service, ign जनवरी 26 16:00:25 localhost.localdomain systemd[1]: [/run/systemd/generator.late/odoo.service:13] Failed to add dependency on @postgresService जनवरी 26 16:00:25 localhost.localdomain systemd[1]: [/run/systemd/generator.late/odoo.service:14] Failed to add dependency on %>.service, igno जनवरी 26 16:00:31 localhost.localdomain systemd[1]: Starting LSB: Launches the Odoo server… जनवरी 26 16:00:31 localhost.localdomain runuser[1232]: pam_unix(runuser:session): session opened for user odoo by (uid=0) जनवरी 26 16:00:31 localhost.localdomain runuser[1232]: pam_unix(runuser:session): session closed for user odoo जनवरी 26 16:00:31 localhost.localdomain odoo[1182]: Starting Odoo Server Daemon (odoo-server): [ OK ] जनवरी 26 16:00:31 localhost.localdomain systemd[1]: Can’t open PID file /var/run/odoo/odoo-server.pid (yet?) after start: No such file or dire जनवरी 26 16:00:31 localhost.localdomain systemd[1]: Started LSB: Launches the Odoo server… जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: Traceback (most recent call last): जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: File “/usr/bin/odoo”, line 4, in जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: import(‘pkg_resources’).run_script(‘odoo==10.0.post20190619’, ‘odoo’) जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 3098, in जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: @_call_aside जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 3082, in _call_asi जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: f(*args, **kwargs) जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 3111, in _initiali जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: working_set = WorkingSet._build_master() जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 573, in _build_mas जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: ws.require(requires) जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 891, in require जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: needed = self.resolve(parse_requirements(requirements)) जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: File “/usr/lib/python2.7/site-packages/pkg_resources/init.py”, line 777, in resolve जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: raise DistributionNotFound(req, requirers) जनवरी 26 16:00:33 localhost.localdomain odoo[1182]: pkg_resources.DistributionNotFound: The ‘xlwt’ distribution was not found and is required जनवरी 26 16:00:33 localhost.localdomain odoo[1448]: mkdir: cannot create directory ‘odoo’: File exists जनवरी 26 16:00:33 localhost.localdomain odoo[1448]: Odoo Server Daemon already stopped. जनवरी 26 16:15:47 localhost.localdomain systemd[1]: Starting LSB: Launches the Odoo server… जनवरी 26 16:15:47 localhost.localdomain odoo[6938]: mkdir: cannot create directory ‘odoo’: File exists जनवरी 26 16:15:47 localhost.localdomain runuser[6947]: pam_unix(runuser:session): session opened for user odoo by (uid=0) जनवरी 26 16:15:47 localhost.localdomain odoo[6938]: Starting Odoo Server Daemon (odoo-server): [ OK ] जनवरी 26 16:15:47 localhost.localdomain systemd[1]: Can’t open PID file /var/run/odoo/odoo-server.pid (yet?) after start: No such file or dire जनवरी 26 16:15:47 localhost.localdomain systemd[1]: Started LSB: Launches the Odoo server… जनवरी 26 16:15:48 localhost.localdomain odoo[6938]: Traceback (most recent call last): जनवरी 26 16:15:48 localhost.localdomain odoo[6938]: File “/usr/bin/odoo”, line 4, in जनवरी 26 16:15:48 localhost.localdomain odoo[6938]: import(‘pkg_resources’).run_script(‘odoo==10.0.post20190619’, ‘odoo’) lines 1-37

we are about to release a patch for 0.92 that should take care of the systemd issues. You can give it a try with this one. installer-rpm link

Please note, since the binaries are not uploaded to our release artefactory, that you must have the following configuration in /etc/bahmni-installer/setup.yml file, so that the installer knows to pull binaries from our internal S3 repo

bahmni_repo_url: http://repo.mybahmni.org/rpm/bahmni

For anything else, please follow WIKI documentation for installation https://bahmni.atlassian.net/wiki/spaces/BAH/pages/33128505/Install+Bahmni+on+CentOS

Those output doesn’t quietly complete until the bottom of it, you have to press space or enter until it show “END” at the bottom. And usually, python error’s will give usefull hint at the end of the error message.

Hi Angshumar,

I think systemd issue only affect openmrs, bahmni-report, and bahmni-erp-connect(issue about using ‘su’ instead uf ‘run as’), but not odoo. Correctly me if I am wrong, odoo service error usually because python package version missmatch (at least that’s what I found), I have to use a specific version of some pip package (like 2.7.7 of psycopg2, 0.23 of MarkUpSafe) otherwhise odoo will throw some errors. But the errors log help most of the time to find the problems.

Thats correct. The systemd fixes are not for Odoo. However, with extensive installation try-outs on CentOS 7.6, 7.7 revealed no such problems for us. What version of CentOS and distro are you using? Have you tried to use CentOS minimal? Let us know.

Curently on production, I am using lxc template from proxmox, it was marked as “Centos7-default_20190926_amd64”, having hard time installing odoo. I manage to export anything from gcp instances that was running for testing, and import them to the production vm (dump odoo db, and copy a whole /opt/bahmni-erp directory).

On gcp instance, it was default template from google, it’s always latest centos from version 7 (at the time development env was deployed, it was 7.7). Facing “normal” systemd issue.

On local virtualbox with, deployed with centos 7.6 minimal iso, it work fine (only systemd issue)

I am having the similar issues for my case openmrs and openelis running but tried different way of running odoo but without sucess,

Here is my output of “journalctl -u odoo” command

import pkg_resources

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 3007, in working_set.require(requires)

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 728, in require needed = self.resolve(parse_requirements(requirements))

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 631, in resolve requirements.extend(dist.requires(req.extras)[::-1])

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2489, in requires dm = self._dep_map

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2700, in _dep_map self.__dep_map = self._compute_dependencies()

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2722, in _compute_dependencies for req in self._parsed_pkg_info.get_all(‘Requires-Dist’) or []:

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 2692, in _parsed_pkg_info self._pkg_info = Parser().parsestr(self.get_metadata(self.PKG_INFO))

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 1421, in get_metadata return self._get(self._fn(self.egg_info,name))

File “/usr/lib/python2.7/site-packages/pkg_resources.py”, line 1536, in _get stream = open(path, ‘rb’)

IOError: [Errno 13] Permission denied: '/usr/lib/python2.7/site-packages/pyusb-1.1.1.dist-info/

Apr 16 19:19:29 ip-10-170-2-137.ap-south-1.compute.internal systemd[1]: Daemon never wrote its PID file. Failing.

Hi, Were you able to get the odoo running locally?