DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 312 forks source link

Cannot start slicer as a systemd service #454

Closed j0hnys closed 5 years ago

j0hnys commented 6 years ago

Hi.

I am getting a python error when i am trying to set up "slicer server slicer_1.ini" as a systemd service for ubuntu 16.04LTS

my .service file is:

[Unit]
Description=OLAP Cube
After=multi-user.target
Requires=local-fs.target
Requires=network-online.target

[Service]
Type=simple
WorkingDirectory=/usr/local/bin
ExecStart=/usr/bin/python /usr/local/bin/slicer serve /home/john/cubes1.1/cubes_projects/slicer_1.ini
Restart=always

[Install]
WantedBy=multi-user.target

and the error i am getting on "systemctl start olap_cube.service" is:

systemd[1]: Started OLAP Cube.
python[2896]: Traceback (most recent call last):
python[2896]:   File "/usr/local/bin/slicer", line 5, in <module>
python[2896]:     from pkg_resources import load_entry_point
python[2896]:   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
python[2896]:     @_call_aside
python[2896]:   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
python[2896]:     f(*args, **kwargs)
python[2896]:   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
python[2896]:     working_set = WorkingSet._build_master()
python[2896]:   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 635, in _build_master
python[2896]:     ws.require(__requires__)
python[2896]:   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 943, in require
python[2896]:     needed = self.resolve(parse_requirements(requirements))
python[2896]:   File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve
python[2896]:     raise DistributionNotFound(req, requirers)
python[2896]: pkg_resources.DistributionNotFound: The 'expressions>=0.2.3' distribution was not found and is required by cubes
systemd[1]: olap_cube.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: olap_cube.service: Unit entered failed state.
systemd[1]: olap_cube.service: Failed with result 'exit-code'.
systemd[1]: olap_cube.service: Service hold-off time over, scheduling restart.
systemd[1]: Stopped OLAP Cube.

Has anyone experienced this issue before?

Thank you.

KhaledTo commented 6 years ago

Hi,

Didn't experience this issue, but it looks like the package "expressions" that is in requirements.txt needs to be installed or updated, or it is not found because of a path issue.

Thank you.

jjmontesl commented 5 years ago

Closing as issue is already answered by @KhaledTo.