latenighttales / alcali

Featureful Saltstack GUI
https://alcali.dev
MIT License
356 stars 61 forks source link

event_stream fails with 401 causes delays #476

Open Ataye opened 1 year ago

Ataye commented 1 year ago

Describe the bug After restarting the web app and after a little time lists fail to load for a period of time, and runners wont run. Basically, anything that calls back to the webserver stops until event_stream has failed after several retries. Screenshot below.

The ss shows a run, and shortly after if event_stream makes a call it will hang the call (failed), then i have to wait for event_stream to make several failed calls, usually about 45 seconds each until they stop. At this point i can run jobs and load lists just fine.

It's as if the event_stream does not take a valid token and pass this when making the call.

To Reproduce Steps to reproduce the behavior:

  1. Load Alcali,
  2. Open dev tools Network tabm
  3. Switch between jobs list page and minions list page,
  4. Eventually a list will fail to load,
  5. Networks tab will show event_stream making longs calls after failing the list data call.

Expected behavior It should not happen.

Screenshots

image

Desktop (please complete the following information):

Additional context If i trigger a replay from the Network tab it may fail with a 401. If i load the url into Postman and provide the token from a valid run or minions call it succeeds.