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

[BUG] UI status page error #3498

Closed
vixns opened this issue Oct 1, 2020 · 10 comments · Fixed by #3505
Closed

[BUG] UI status page error #3498

vixns opened this issue Oct 1, 2020 · 10 comments · Fixed by #3505
Labels

Comments

@vixns
Copy link

vixns commented Oct 1, 2020

Describe the bug

The UI status page fails to load data.

js console error :

Uncaught TypeError: can't access property "no action", data.actions is undefined [...] stats.js:276:37

Versions

2.6

@vixns vixns added the bug label Oct 1, 2020
@moisseev
Copy link
Member

moisseev commented Oct 1, 2020

Would you find the response (or responses if you have multiple hosts in the cluster) on GET request(s) to /stat path in the browser console and post it here?

@vixns
Copy link
Author

vixns commented Oct 1, 2020

{"error":"Unauthorized"}

Did I miss a configuration change when updating to version 2.6 ?

@HansVanEijsden
Copy link

I also had js errors and module errors after upgrading from 2.5 to 2.6 (Safari 14.0 (15610.1.28.1.9, 15610)).
Clearing the Safari browser cache helped in my case: no more errors and everything runs smoothly.

@urmel1960
Copy link

Had issues with firefox 81 after upgrade - clearing saved browser data and closing browser completly after cache clearing solved the issues.
All running fine in UI

@vstakhov
Copy link
Member

vstakhov commented Oct 1, 2020

That's another candidate to add to the upgrading notes.

@vixns
Copy link
Author

vixns commented Oct 1, 2020

It seems the UI try to fetch /stat without any headers before asking for the password, this call returns a 403 error, as expected.
After the password is entered, the /stat calls are well formated and returns this content

From a node:

{"version":"2.6","config_id":"REDACTED","uptime":19755,"read_only":false,"scanned":2782,"learned":153,"actions":{"reject":313,"soft reject":0,"rewrite subject":0,"add header":647,"greylist":372,"no action":1450},"spam_count":960,"ham_count":1822,"connections":5286,"control_connections":1812,"pools_allocated":7143,"pools_freed":7116,"bytes_allocated":31188552,"chunks_allocated":219,"shared_chunks_allocated":17,"chunks_freed":0,"chunks_oversized":1167,"fragmented":0,"total_learns":190204,"statfiles":[{"revision":128562,"used":0,"total":0,"size":0,"symbol":"BAYES_SPAM","type":"redis","languages":0,"users":121},{"revision":61642,"used":0,"total":0,"size":0,"symbol":"BAYES_HAM","type":"redis","languages":0,"users":381}],"fuzzy_hashes":{"rspamd.com":1403013953}}

from a proxy :

{"version":"2.6","config_id":"REDACTED","uptime":19596,"read_only":false,"scanned":0,"learned":0,"spam_count":0,"ham_count":0,"connections":0,"control_connections":2263,"pools_allocated":98569,"pools_freed":98533,"bytes_allocated":28423904,"chunks_allocated":227,"shared_chunks_allocated":16,"chunks_freed":0,"chunks_oversized":1,"fragmented":0,"total_learns":0,"statfiles":[{"revision":0,"used":0,"total":0,"size":0,"symbol":"BAYES_SPAM","type":"redis","languages":0,"users":0},{"revision":0,"used":0,"total":0,"size":0,"symbol":"BAYES_HAM","type":"redis","languages":0,"users":0}],"fuzzy_hashes":{"rspamd.com":1403008934}}

The actions key is missing in the proxy response, this may be the js error's cause.

@moisseev
Copy link
Member

moisseev commented Oct 1, 2020

@vixns Looks like the responses are from different nodes and the proxied response is actually from Rspamd 2.5 or earlier.

What is the "js error's cause"?

@vixns
Copy link
Author

vixns commented Oct 1, 2020

@moisseev The proxy host runs rspamd version 2.6

modify stats.js line 276 as follow fix this issue.

if (data.actions != undefined) neighbours_sum.actions[action] += data.actions[action];

@moisseev
Copy link
Member

moisseev commented Oct 1, 2020

@vixns Sure, it does. But I'd like to know the reason why the data.actions is undefined.
The proxied and direct responses are too different. I am quite sure they are from different nodes.

@moisseev
Copy link
Member

moisseev commented Oct 1, 2020

I've found the problem. Controller doesn't return the actions object until at least one message is scanned. I'll fix it in WebUI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants