Hi,
I was redirected here from the AWX Git issue reporter concerning the 404 error I get for /websockets URL:
https://github.com/ansible/awx/issues/8498
Basically, I get 404/not found:
2020-11-02 14:21:13,961 WARNING django.request Not Found: /websocket/
2020-11-02 14:21:13,961 WARNING django.request Not Found: /websocket/
2020-11-02 14:21:13,961 WARNING Not Found: /websocket/
This is a Kubernetes install, both the Ingress and container Nginx have correct definitions (I have posted config and log snips on the above url when reporting the issue).
I also tried reaching daphne via curl on 8051 and I get 404 from inside container as well for localhost:8051/websocket.
Also tried deleting the namespace and installation and deploying from scratch, no joy.
I also have a standalone rpm-based AWX (older version) on which daphne does not throw 404 for said url.
Since I’m not a developer, any insights are more than welcome…
Thanks,
MS
Hello,
I followed you from github, I have the same setup (GKE / Nginx Ingress Controller), and the same symptoms.
I will update you if I find anything, please update this thread if you find a solution.
Thanks
I’m not helping much, but you may now feel a little bit less alone
Hi,
I have managed to get it working yesterday
It was indeed (as you might have seen already) the matter of adding:
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection “upgrade”;’
To the ingress definition.
I have tried that to no avail before, but my error was that I used the wrong annotation.
Since I’m on a private cloud, I deployed Nginx Ingress Controller from Nginx inc. Github via manifests, so the correct annotations are from:
https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/
and not
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/
Which means the correct kubernetes_ingress_annotations value (from AWX deployment inventory) is :
kubernetes_ingress_annotations={ ‘nginx.org/location-snippets’: ‘proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”;’ }
Before that, I was incorrectly using the wrong annotation - nginx.org/configuration-snippet:
Anyway, now it works like a charm, what threw me off initially was that doing curl inside the pod directly to daphne listener threw 404 so I didn’t bother troubleshooting ingress further.
Hope that helps.
Good luck and please respect the read-only Friday
Regards,
Marko
Thank you very much, it works !
Best regards