Hi,
we are using a binary which needs to few command, When I’m running binary directly everything is working fine. But when we run using nomad raw_exec it says command not found when application tries to run something.
Any suggestion will be helpful.
Thanks
Hi. On linux executaboes are found using $PATH environment variable, and a command might be a function or an alias in an interactive shell.
Specify full path to the executable.
Alternatively run the shell, and let shell start your executable.
If you get the error with full path of the executable, then it might be the errors comes from missing dynamic linker the executable was compiled for. This usually happens in containers when running executables compiled for glibc in alpine linux, or vice versa.
Post the job and please post the exact full verbatim all error messages you are seeing. Specify your environment, operating system, nomad version.
Hi,
Tried in both the ways that you have suggested. Below are the job file snippets.
driver = "raw_exec"
config {
command = "/bin/bash"
args = ["-c", "source /etc/profile && source ~/.bashrc && /root/covlant/Conflux/target/x86_64-unknown-linux-musl/release/conflux"]
}
//different job with same driver
config {
command = "/root/covlant/Conflux/target/x86_64-unknown-linux-musl/release/conflux"
}
Command I’m trying to run is npm install. Code is written in Rust. working when ran the binary directly on the shell.
It is saying not found for the npm commands. In the similar manner I tried for the go (go mod tidy) and it is working fine. Very confused on how nomad is trying to run this.
Thanks