Error fetching jobs (UI)
Nomad version
2.0.6 (also affected 2.0.5)
Operating system and Environment details
Ubuntu 26.0x
Issue
When I leave the web ui open for a couple minutes, I eventually end up with a toast message that says the following:
Error fetching jobs The backend returned an error with status undefined while fetching jobs
Browser is Microsoft Edge and the console logs have the following originating from "nomad-ui-51f754e9ed66e01e82d41c2dfdc06d80.js:2108":
error fetching job allocs SyntaxError: Unexpected token 'A', "AbortError"... is not valid JSON at JSON.parse () at vendor-4b3e7c408fb42152a83056755a483c83.js:3568:12 at vendor-4b3e7c408fb42152a83056755a483c83.js:3570:10 at async a.ajax (vendor-4b3e7c408fb42152a83056755a483c83.js:3531:78)
Once this happens, a full refresh is required to get updates in the ui again.
Reproduction steps
I wish I could provide detailed steps, but for me, I just leave it open on the jobs page and eventually it happens. I do have about 30 jobs running (all green, no errors).
Expected Result
Jobs ui continues to update without toast message.
Actual Result
Jobs ui gives error after minutes and ceases functioning.
Job file (if appropriate)
N/A
Nomad Server logs (if appropriate)
N/A
Nomad Client logs (if appropriate)
N/A
Source: hashicorp/nomad