I’m trying to test out the java jar driver, running nomad with the -dev mode. Java is installed on the machine and the Java driver appears Healthy on the client configuration. This is the job definition I’m testing:
The allocation gets stuck in “pending” status. I have tried to set an absolute path to the jar file and happens the same thing, it seems the nomad client does not find the jar file.
Where does the nomad client look for those files when running it with -dev ?
The allocation will be run in an isolated chroot and therefore will not have access to the entire host filesystem.
In order to make the jar available, you could use the artifact job specification block to download the jar into the isolated allocation directory. It is important to note, for security reasons the artifact cannot be downloaded from the host machine.
If this is merely for testing, you could also use the raw_exec driver which does not provide any isolation. Assuming Nomad is running as root and the Java binary is within its path, the command and args would then call the java binary, jar, and args like: