Skip to content

Toshi Search fails in systemd service #722

@sempervictus

Description

@sempervictus

Describe the bug
Commandline invocation of /usr/bin/toshi --config /etc/toshi/config.toml which works from the shell fails in systemd service:

[Unit]
Description=Toshi Search
After=default.target

[Service]
User=toshi
Group=toshi
ExecStart=/usr/bin/toshi --config /etc/toshi/config.toml
Type=simple
Environment=RUST_BACKTRACE=1

[Install]
WantedBy=multi-user.target
Jan 19 23:26:30 unknown systemd[1]: Started Toshi Search.
Jan 19 23:26:30 unknown toshi[197006]: Error: IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })
Jan 19 23:26:30 unknown systemd[1]: toshi.service: Main process exited, code=exited, status=1/FAILURE
Jan 19 23:26:30 unknown systemd[1]: toshi.service: Failed with result 'exit-code'.

To Reproduce
Steps to reproduce the behavior:

  1. Build release binary
  2. Write config and place in path shown above
  3. Create the data path and set appropriate ownership
  4. Create systemd service as shown
  5. Run CLI invocation, then run service
  6. Observe failure and logs

Expected behavior
Same behavior in systemd service context as in shell

Desktop (please complete the following information):

  • OS: Arch
  • Rust Version: Stable (Arch Linux upstream)
  • Version: current master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions