Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nomad UI jobs page error #7710

Closed
gmichalec-pandora opened this issue Apr 13, 2020 · 7 comments
Closed

Nomad UI jobs page error #7710

gmichalec-pandora opened this issue Apr 13, 2020 · 7 comments

Comments

@gmichalec-pandora
Copy link

For reporting security vulnerabilities please refer to the website.

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

Output from nomad version

0.10.4+ent

Operating system and Environment details

Debian Stretch

Issue

If we load the 'jobs' page of the nomad UI for some of our regions (e.g. http://nomad.service.sv5.consul:4646/ui/jobs), clicking on an link will cause the loading animation to spin forever.
Looking at the JS console, it appears we have several jobs returned by the /jobs API call that don't actually exist - there are 404s for the specific job API call (e.g. http://nomad.service.consul:4646/v1/job/hedwig-prod.queue_reports 404 (Not Found))
there is then a JS error:
vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:7454 Uncaught TypeError: Cannot read property 'eachAttribute' of null at e.get (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:7454) at e.<anonymous> (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:8972) at e.<computed> [as createSnapshot] (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:8956) at vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:7872 at r._fetchRecord (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:7874) at h (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:7880) at r._flushPendingFetchForType (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:7887) at Map.forEach (<anonymous>) at r.flushAllPendingFetches (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:7879) at t.invoke (vendor-d62e8ec23cd05cedaa719acf0f8b5554.js:4951)

My guess is that the API is not properly handling the 404 errors and needs some armor to prevent accessing object properties of a 'null' API response

@notnoop
Copy link
Contributor

notnoop commented Apr 13, 2020

Thank you @gmichalec-pandora . This feels like a duplicate of #7698 but additional information.

I'm a bit puzzled with how you got into a state where the jobs API return non-existing APIs that result into 404s. I can think of cases where jobs are deleted or GCed after the jobs page got loaded. Did you run into another case as well?

@gmichalec-pandora
Copy link
Author

gmichalec-pandora commented Apr 14, 2020 via email

@notnoop
Copy link
Contributor

notnoop commented Apr 14, 2020

Thanks! We are on it. Absolutely, the frontend needs to be resilient to such errors. we also appreciate the scenarios so we can incorporate them into test suite or consider them when doing manual testing.

@gmichalec-pandora
Copy link
Author

gmichalec-pandora commented Apr 14, 2020

Just to update - after purging all the jobs that were 404-ing (AFAICT none were actually running, and had not been submitted for over 10 months), the nomad UI jobs page works fine now for all our regions. So, in some ways, it was good to help us ID some of the cruft we had running :)

@DingoEatingFuzz
Copy link
Contributor

Hi @gmichalec-pandora, I too was able to reproduce this condition via orphaned child jobs. The child job tries to load its parent to satisfy the belongsTo relationship modeled in the UI, but since the parent is a 404, it goes 💥.

I'll make sure to patch this up.

@DingoEatingFuzz
Copy link
Contributor

This should be fixed in 0.12.1 (See the explanation here).

I'm going to close this issue to centralize the conversation about this bug in #5936.

@github-actions
Copy link

github-actions bot commented Nov 4, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants