Hi,
Iv been having issues with a particular job which perform a raw_exec. For some reason with this particular job/ executable I always get exit code 0 immediately and the job seemingly completes.
The problem is that the executable is in fact meant to run continuously and does not (exit code 0) immediately when run manually.
task "gitea" {
driver = "raw_exec"
config {
command = "C:/Users/myuser/Documents/gitea/gitea"
}
//remove unneccessary parts
}
Again this seems to work as expected in that it executed but immediately exits.
Similarly if i run a .bat file instead the behaviour seems to be unusual:
cd C:\Users\myuser\Documents\gitea && cmd /k gitea
@pause
when i execute this .bat file from nomad it actually performs each line and does infact not only not pause but seems to auto-complete immediately still:
The job logs show the following within a second of executing:
C:\Users\myuser\Documents\nomad_0.10.2_windows_amd64\data\alloc\7187bce4-b747-dc16-26b3-7ef4d8d85f67\startgitea>cd C:\Users\myuser\Documents\gitea && cmd /k gitea
C:\Users\myuser\Documents\gitea>Press any key to continue . . .
the overview
Feb 04, '20 19:24:37 +0000 Terminated Exit Code: 0
Feb 04, '20 19:24:37 +0000 Started Task started by client
So does anyone have any idea why this particular job just immediately might return exit code 0 rather than hanging on the execution of the application as im trying to keep gitea alive as a permanent service/job via nomad.