# SystemdSpawner FileNotFoundError \[Errno 2\] No such file or directory: 'systemctl'

**URL:** <https://discourse.jupyter.org/t/systemdspawner-filenotfounderror-errno-2-no-such-file-or-directory-systemctl/4400>\
**Category:** JupyterHub\
**Tags:** how-to\
**Created:** [May 15, 2020, 6:45am UTC](https://discourse.jupyter.org/t/systemdspawner-filenotfounderror-errno-2-no-such-file-or-directory-systemctl/4400 "2020-05-15T06:45:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shardo](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/shardo/32/2066_2.png) [@shardo](https://discourse.jupyter.org/u/shardo)\
**Post date:** [May 15, 2020, 6:45am UTC](https://discourse.jupyter.org/t/systemdspawner-filenotfounderror-errno-2-no-such-file-or-directory-systemctl/4400/1 "2020-05-15T06:45:29Z")

</div>

My jupyterhub\_config.py looks something like this:

```auto
import os
c = get_config()
c.JupyterHub.log_level = 'DEBUG'
c.JupyterHub.spawner_class = 'systemdspawner.SystemdSpawner'
c.SystemdSpawner.extra_paths = ['/bin', '/opt/jupyterhub/bin', '/root/.nvm/versions/node/v{{ node_version }}/bin']
c.JupyterHub.hub_ip = '0.0.0.0'
c.JupyterHub.hub_port = 8080

```

systemd is running and systemctl is available on the host machine:

```auto
[root@ip-x-x-x-x ~]# which systemctl
/bin/systemctl

```

I’m getting this error on the front end:

```auto
500 : Internal Server Error

Error in Authenticator.pre_spawn_start: FileNotFoundError [Errno 2] No such file or directory: 'systemctl': 'systemctl'

You can try restarting your server from the home page.

```

What am I missing here? It should be available via the $PATH, as well as `c.SystemdSpawner.extra_paths`.

The jupyterhub process runs as root, via systemd.

There are no log messages from SystemdSpawner in the jupyterhub DEBUG logs.
