Timeout to kill did not seem to work on REX job

**Problem: Client server did not stop running the REX job after the “Timeout to kill” limit exceeded 300 seconds

**Expected outcome: Client server stopped/canceled REX job after time out to kill exceeded 300 seconds

**Foreman and Proxy versions: Version 2.5.4

**Foreman and Proxy plugin versions:

Distribution and version:

Other relevant data:
I have a REX job that I run on servers with a 300 second timeout to kill limit. The client did process the job but did not send a return code back. 300 seconds passed and REX job was still running on client server.
Timeout to kill can be found in the job:

However, I see that there is a Finish action timeout option in Settings > Content. This is set to 3600 seconds.

Should I be using that option, and if so would that not affect all REX jobs?

Thank you

Hi, just wanted to see if anyone has any insight on this. Thanks

Let me rephrase it just to see if I’m following it correctly.

  1. You run a job which has timeout to kill set to 300 seconds
  2. The job runs and finishes, but does not report back to foreman?
  3. Some time after 2), the 300 second time limit passes but nothing happens

Is that right?

Hi, thank you for your response.

  1. You run a job which has timeout to kill set to 300 seconds
    Yes this is correct, I have the TOK set to 300 seconds
  2. The job runs and finishes, but does not report back to foreman?
    The job does not finish within 300 seconds
  3. Some time after 2), the 300 second time limit passes but nothing happens
    Correct, after the time passes the job still continues to run. I would have expected it to kill after 300 seconds of the initialization of the job.

That should work, or at least it seems to work for me. Could you bump log_level to debug in /etc/foreman-proxy/settings.yml, restart foreman-proxy service, run the job again and then paste logs from /var/log/foreman-proxy/proxy.log?