Here is my fork of Keter with *.nix
files generated via cabal2nix
: https://github.com/bsima/keter/tree/nix
I did nix-build shell.nix
on my dev machine (NixOS 17.09), then used nix-copy-closure
to put it on my VPS on Digital Ocean (also NixOS 17.09, via nix-infect).
I created a systemd service which starts just fine, but then Keter dies after trying to fork a process for the server:
2018-02-03 19:34:03.21: Data.Conduit.Process.Unix.monitorProcess: /opt/keter/temp/pprjam-0/dist/bin/pprjam: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
It can't find exec
, which I believe should be a part of coreutils
. I doubt coreutils
is missing, but just in case I put it in my environment.systemPackages
and rebuilt, but it still didn't work.
So that makes me think this is a $PATH
problem, or this issue (which I don't quite understand, so I'm assuming it's more likely a $PATH
problem).
Is there something I have to do in Keter's default.nix
in order to help it find exec
on the $PATH
of the target machine? What else am I missing here?
exec
is actually a shell built-in, not acoreutils
command. Actually the createProcess error message is confusing. The command name that can't be found comes before thecreateProcess:
. So the problem is not thatpprjam
can not findexec
(as a command), butcreateProcess
detected a failedexec
system call.It seems that
/opt/keter/temp/pprjam-0/dist/bin/pprjam
is missing on your server, or the runtime linker can not findpprjam
's dependencies. If the latter is the case, you may be able to fix it by extending theLD_LIBRARY_PATH
environment variable of the Keter service.