Error when starting ODOO

I’ve just done a fresh install of 0.92 on centos 7.6 but ODOO is still giving me problems. See log below

-- Unit odoo.service has begun starting up.
Apr 07 12:22:49 test-svr odoo[31416]: mkdir: cannot create directory ‘odoo’: File exists
Apr 07 12:22:49 test-svr runuser[31425]: pam_unix(runuser:session): session opened for user odoo by (uid=0)
Apr 07 12:22:49 test-svr runuser[31425]: pam_unix(runuser:session): session closed for user odoo
Apr 07 12:22:49 test-svr odoo[31416]: Starting Odoo Server Daemon (odoo-server): [  OK  ]
Apr 07 12:22:49 test-svr systemd[1]: Can't open PID file /var/run/odoo/odoo-server.pid (yet?) after start: No such file or directory
Apr 07 12:22:49 test-svr odoo[31416]: Traceback (most recent call last):
Apr 07 12:22:49 test-svr odoo[31416]: File "/usr/bin/odoo", line 4, in <module>
Apr 07 12:22:49 test-svr odoo[31416]: __import__('pkg_resources').run_script('odoo==10.0.post20190619', 'odoo')
Apr 07 12:22:49 test-svr odoo[31416]: File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3098, in <module>
Apr 07 12:22:49 test-svr odoo[31416]: @_call_aside
Apr 07 12:22:49 test-svr odoo[31416]: File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3082, in _call_aside
Apr 07 12:22:49 test-svr odoo[31416]: f(*args, **kwargs)
Apr 07 12:22:49 test-svr odoo[31416]: File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3111, in _initialize_master_working_set
Apr 07 12:22:49 test-svr odoo[31416]: working_set = WorkingSet._build_master()
Apr 07 12:22:49 test-svr odoo[31416]: File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 573, in _build_master
Apr 07 12:22:49 test-svr odoo[31416]: ws.require(__requires__)
Apr 07 12:22:49 test-svr odoo[31416]: File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 891, in require
Apr 07 12:22:49 test-svr odoo[31416]: needed = self.resolve(parse_requirements(requirements))
Apr 07 12:22:49 test-svr odoo[31416]: File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 777, in resolve
Apr 07 12:22:49 test-svr odoo[31416]: raise DistributionNotFound(req, requirers)
Apr 07 12:22:49 test-svr odoo[31416]: pkg_resources.DistributionNotFound: The 'pyusb>=1.0.0b1' distribution was not found and is required by odoo
Apr 07 12:22:49 test-svr systemd[1]: Daemon never wrote its PID file. Failing.
Apr 07 12:22:49 test-svr systemd[1]: Failed to start LSB: Launches the Odoo server..
-- Subject: Unit odoo.service has failed

I am wondering whether the issue is with below line and if so how do I resolve it

pkg_resources.DistributionNotFound: The 'pyusb>=1.0.0b1' distribution was not found and is required by odoo

You may want to check this thread. Also, @buvaneswariarun has been investigating this issue.

1 Like

The Odoo issue was resolved but now openmrs has stopped and giving errors when I try to start it. I was initially using service command but applied this fix

However, I still get below error

Apr 08 11:26:24 test-svr systemd[1]: Starting OpenMRS Server...
Apr 08 11:26:24 test-svr systemd[1]: Can't open PID file /var/run/openmrs/openmrs.pid (yet?) after start: No such file or directory
Apr 08 11:26:24 test-svr systemd[1]: Failed to start OpenMRS Server.
Apr 08 11:26:24 test-svr systemd[1]: Unit openmrs.service entered failed state.
Apr 08 11:26:24 test-svr systemd[1]: openmrs.service failed.

Upon checking, I realized that indeed the directory /var/run/openmrs/ was not created during installation. How do I go about this one? Should I manually create the directory and PID file, and what ownership and permissions should I set.

most likely your service unit file was changed.

systemctl show -p FragmentPath openmrs

this should be

/usr/lib/systemd/system/openmrs.service

Check whether the contents are like the file here

You may have to now delete the “/var/run/openmrs” directory

this returned expected path. The contents of the file are also similar to the one you shared

The directory is not there

Not sure. can see if there is more in the log?

systemctl start openmrs

if it fails

journalctl -u openmrs

scroll right to the end … and check corresponding to time