atx/prometheus-tor_exporter

ModuleNotFoundError: No module named 'distutils.spawn'

Closed this issue · 1 comments

Just after install:

root@scw:~# systemctl start prometheus-tor-exporter
root@scw:~# systemctl status prometheus-tor-exporter
● prometheus-tor-exporter.service - Prometheus exporter for Tor
   Loaded: loaded (/lib/systemd/system/prometheus-tor-exporter.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2019-09-07 02:16:13 MSK; 4s ago
  Process: 6715 ExecStart=/usr/bin/prometheus-tor-exporter.py $ARGS (code=exited, status=1/FAILURE)
 Main PID: 6715 (code=exited, status=1/FAILURE)

Sep 07 02:16:13 scw systemd[1]: prometheus-tor-exporter.service: Failed with result 'exit-code'.
Sep 07 02:16:13 scw systemd[1]: prometheus-tor-exporter.service: Service hold-off time over, scheduling restart.
Sep 07 02:16:13 scw systemd[1]: prometheus-tor-exporter.service: Scheduled restart job, restart counter is at 5.
Sep 07 02:16:13 scw systemd[1]: Stopped Prometheus exporter for Tor.
Sep 07 02:16:13 scw systemd[1]: prometheus-tor-exporter.service: Start request repeated too quickly.
Sep 07 02:16:13 scw systemd[1]: prometheus-tor-exporter.service: Failed with result 'exit-code'.
Sep 07 02:16:13 scw systemd[1]: Failed to start Prometheus exporter for Tor.
root@scw:~# prometheus-tor-exporter.py -h
Traceback (most recent call last):
  File "/usr/bin/prometheus-tor-exporter.py", line 6, in <module>
    import stem.control
  File "/usr/lib/python3/dist-packages/stem/control.py", line 265, in <module>
    import stem.descriptor.microdescriptor
  File "/usr/lib/python3/dist-packages/stem/descriptor/__init__.py", line 55, in <module>
    import stem.util.system
  File "/usr/lib/python3/dist-packages/stem/util/system.py", line 70, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'

Fixed by apt-get install python3-distutils. Add it to package dependencies?

root@scw:~# uname -a
Linux scw 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
root@scw:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic
atx commented

Hmm, this seems to be python3-stem issue. It looks like I'ts fixed in cosmic but not in bionic. Report this to the Ubuntu bugtracker.