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

Configure nginx to allow tower to call /websocket/ #4612

Merged
merged 3 commits into from
Jan 30, 2024
Merged

Conversation

acozine
Copy link
Contributor

@acozine acozine commented Jan 24, 2024

Closes #4043.

Attempt to fix issue 4043 with nginx config. Very much WIP.

@acozine
Copy link
Contributor Author

acozine commented Jan 25, 2024

We ran this today, and while it didn't break anything, we're still seeing the errors in the logs about django.request Not Found: /websocket/. That said, it looked like live job updates might be happening - so maybe the log messages are not tightly coupled to the problem . . . I'm going to hold this PR until we have some EEs and can gather more data.

@acozine
Copy link
Contributor Author

acozine commented Jan 25, 2024

Job updates are still not happening. If you kick off a job, you see the Waiting for updates message as long as you stay on the Jobs page, long after the job has failed (or succeeded). To see the actual output, you have to go back to Jobs and then select the individual job.

@acozine acozine marked this pull request as ready for review January 26, 2024 22:56
@acozine
Copy link
Contributor Author

acozine commented Jan 26, 2024

@VickieKarasic and @sandbergja and I fixed this today - in addition to this nginx config update, we had to add a config file to Tower. The file is called /etc/tower/conf.d/websocket_config.py and the content is:

# support headers for real-time updates via websocket
BROADCAST_WEBSOCKET_PROTOCOL = 'https'
BROADCAST_WEBSOCKET_PORT = 443
BROADCAST_WEBSOCKET_VERIFY_CERT = True

With those two changes, the WebSockets connections works and live updates come through. If you inspect the web browser, there are still some errors listed, but they don't seem to affect performance, so we are ignoring them for now.

@acozine acozine requested a review from kayiwa January 29, 2024 21:48
Copy link
Member

@kayiwa kayiwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NICE! thanks @acozine

@kayiwa kayiwa merged commit 7201c2a into main Jan 30, 2024
65 checks passed
@kayiwa kayiwa deleted the tower-nginx-fix branch January 30, 2024 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tower reports 404s on /websocket
3 participants