lorri
lorri copied to clipboard
Failed to enable unit: Unit file lorri.service does not exist.
Edit:
I had lorri 1.2.0
. Switched to lorri 1.5.0
and apparently presents the same behavior.
I had lorri
installed for a while (and rebooted a few times), but have always been unable to... enable it with systemctl
:
systemctl --user enable lorri.service
returned the Failed to enable unit: Unit file lorri.service does not exist.
message.
Long story short, ~/.config/systemd/user/lorri.service
linked file (/nix/store/mn2xw17nf6r7frhy595479rgwkpyr74m-unit-lorri.service/lorri.service
in my case) did not contain:
[Install]
WantedBy=multi-user.target
- I created a standalone
~/.config/systemd/user/lorri.service
- with the content of
/nix/store/mn2xw17nf6r7frhy595479rgwkpyr74m-unit-lorri.service/lorri.service
- added the
WantedBy=multi-user.target
clause to it - saved
now I am able to enable/start lorri
.
As I did not find any reference to this case in issues (or any search online, for what matters), I wonder if I am the only one experiencing this behavior and/or I am missing something 🤔
Hi @maxdevjs, could you please run the following commands:
$ lorri info
<please paste output here>
$ uname -a
<please paste output here>
@Profpatsch , thanks for your reply.
- after I edited of
~/.config/systemd/user/lorri.service
-
lorri
apparently started andstatus
wasActive: active (running)
- I could find its socket
-
I then tried to repeat the process (recreate lorri.service
, restart lorri
, etc), and worked, somewhat (last entry in status log is now lorri.service: Current command vanished
). I report all the sequence, never knows there is something wrong in my setup:
$ lorri info
error: The following required arguments were not provided:
--shell-file <nix_file>
USAGE:
lorri info --shell-file <nix_file>
For more information try --help
$ lorri info --help
lorri-info 1.5.0
Graham Christensen <[email protected]>, Profpatsch <[email protected]>
Show information about a lorri project
USAGE:
lorri info --shell-file <nix_file>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--shell-file <nix_file> The .nix file in the current directory to use
$ test-lorri
❯ tree . -aL 1
.
├── .envrc
├── lorri-log.txt
└── shell.nix
$ lorri info --shell-file shell.nix
lorri version: 1.5
GC roots exist, shell_gc_root: /home/max/.cache/lorri/gc_roots/47186861f4656f3c9279b751b253d662/gc_root/shell_gc_root
$ uname -a
Linux 5.4.122 #1-NixOS SMP Wed May 26 10:05:21 UTC 2021 x86_64 GNU/Linux
I add the current status, because there is that last Current command vanished from the unit file, execution of the command list won't be resumed
message from Sep 11
.
$ systemctl status --user lorri
● lorri.service - Lorri Daemon
Loaded: loaded (/home/max/.config/systemd/user/lorri.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2021-09-11 05:26:01 -03; 2 days ago
Main PID: 16275 (lorri)
CGroup: /user.slice/user-1000.slice/[email protected]/lorri.service
└─16275 /nix/store/c8rma224cal40z9qk995plyfgvvrkiyk-lorri-1.2/bin/lorri daemon
Sep 11 05:26:01 max-nixos systemd[1770]: Started Lorri Daemon.
Sep 11 05:26:01 max-nixos lorri[16275]: Sep 11 05:26:01.412 INFO ready
Sep 11 05:47:47 max-nixos lorri[16275]: Sep 11 05:47:47.461 INFO build status, message: BuildEvent(Started { nix_file: NixFile("/home/max/Personal/Pro>
Sep 11 05:47:47 max-nixos lorri[16275]: Sep 11 05:47:47.489 INFO build status, message: BuildEvent(Failure { nix_file: NixFile("/home/max/Personal/Pro>
Sep 11 17:11:16 max-nixos systemd[1770]: lorri.service: Current command vanished from the unit file, execution of the command list won't be resumed.
$ systemctl list-units --user | grep lorri
lorri.service loaded active running Lorri Daemon
● lorri.socket not-found active running lorri.socket
I tried then to stop and restart again lorri
to check if it'd create the socket
:
$ systemctl start --user lorri
Failed to start lorri.service: Unit lorri.socket not found.
$ systemctl status --user lorri
● lorri.service - Lorri Daemon
Loaded: loaded (/home/max/.config/systemd/user/lorri.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Sep 11 05:20:50 max-nixos lorri[32521]: Sep 11 05:20:50.956 INFO build status, message: BuildEvent(Failure { nix_file: NixF>
Sep 11 05:20:57 max-nixos systemd[1770]: lorri.service: Succeeded.
Sep 11 05:26:01 max-nixos systemd[1770]: Started Lorri Daemon.
Sep 11 05:26:01 max-nixos lorri[16275]: Sep 11 05:26:01.412 INFO ready
Sep 11 05:47:47 max-nixos lorri[16275]: Sep 11 05:47:47.461 INFO build status, message: BuildEvent(Started { nix_file: NixF>
Sep 11 05:47:47 max-nixos lorri[16275]: Sep 11 05:47:47.489 INFO build status, message: BuildEvent(Failure { nix_file: NixF>
Sep 11 17:11:16 max-nixos systemd[1770]: lorri.service: Current command vanished from the unit file, execution of the comma>
I am stuck with that Current command vanished
now.