taiga-events error 426 (Upgrade required)

512 views
Skip to first unread message

iwkse

unread,
Sep 27, 2018, 8:58:01 AM9/27/18
to taigaio
Hi,
I've tried several things and also search online but I still cannot let events work.
I still receive this 426 error.

I'm connecting with SSL, I'll post here the related config section, hoping I can get some hints.

taiga-back/settings/local.py

EVENTS_PUSH_BACKEND = "taiga.events.backends.rabbitmq.EventsPushBackend"
EVENTS_PUSH_BACKEND_OPTIONS = {"url": "amqp://taiga:*****@Debian:5672/taiga"}

CELERY_ENABLED = True

taiga-front/dist/conf.json

  1 {
  2     "api": "https://127.0.0.1/api/v1/",
  3     "eventsUrl": "wss://127.0.0.1:8094/events",                                                                                                                  
  4     "eventsMaxMissedHeartbeats": 5,
  5     "eventsHeartbeatIntervalTime": 60000,
  6     "eventsReconnectTryInterval": 10000,
  7     "debug": true,
  8     "debugInfo": false,
  9     "defaultLanguage": "en",
 10     "themes": ["taiga"],
 11     "defaultTheme": "taiga",
 12     "publicRegisterEnabled": false,
 13     "feedbackEnabled": false,
 14     "privacyPolicyUrl": null,
 15     "termsOfServiceUrl": null,
 16     "maxUploadFileSize": null,
 17     "contribPlugins": [],
 18     "tribeHost": null,
 19     "importers": [],
 20     "gravatar": true
 21 }

taiga-events/config.json

  1 {
  2     "url": "amqp://taiga:******@Debian:5672/taiga",
  3     "secret": "*************",
  4     "webSocketServer": {
  5         "port": 8094                                                                                                                                                          
  6     }
  7 }

nginx configuration:

  1 server {
  2     listen 80;
  3     listen [::]:80;
  4     access_log /log/taiga.nginx.access.log;
  5     error_log /log/taiga.nginx.error.log;
  6     server_name taiga.test;
  7     return 301 https://$server_name$request_uri;
  8 }
  9 
 10 server {
 11     listen 443 ssl default_server;
 12     listen [::]:443;
 13     server_name taiga.test;
 14     add_header X-Frame-Options "DENY";
 15     large_client_header_buffers 4 32k;
 16     client_max_body_size 50M;
 17     charset utf-8;
 18     access_log /log/taiga.nginx.access.log;
 19     error_log /log/taiga.nginx.error.log;
 20     index index.html;
 21 
 22     # Frontend
 23     location / {
 24         root /home/angrytoken/app/taiga-front/dist/;
 25         try_files $uri $uri/ /index.html;
 26     }
 27 
 28     # Backend
 29     location /api {
 30         proxy_set_header Host $http_host;                                                                                                                                     
 31         proxy_set_header X-Real-IP $remote_addr;
 32         proxy_set_header X-Scheme $scheme;
 33         proxy_set_header X-Forwarded-Proto $scheme;
 34         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 35         proxy_pass http://127.0.0.1:8001/api;
 36         proxy_redirect off;
 37     }
 38 
 39     location /admin {
 40         proxy_set_header Host $http_host;
 41         proxy_set_header X-Real-IP $remote_addr;
 42         proxy_set_header X-Scheme $scheme;
 43         proxy_set_header X-Forwarded-Proto $scheme;
 44         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 45         proxy_pass http://127.0.0.1:8001$request_uri;
 46         proxy_redirect off;
 47     }
 48 
 49     location /events {
 50         proxy_pass http://127.0.0.1:8094/events;
 51         proxy_http_version 1.1;
 52         proxy_set_header Upgrade $http_upgrade;
 53         proxy_set_header Connection "upgrade";
 54         proxy_connect_timeout 7d;
 55         proxy_send_timeout 7d;
 56         proxy_read_timeout 7d;
 57     }
 58 
 59     # Static files
 60     location /static {
 61         alias /src/taiga-back/static;
 62     }
 63 
 64     # Media files                                                                                                                                                             
 65     location /media {
 66         alias /src/taiga-back/media;
 67     }
 68 
 69     add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload";
 70     add_header Public-Key-Pins 'pin-sha256="klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY="; pin-sha256="633lt352PKRXbOwf4xSEa1M517scpD3l5f79xMD9r9Q="; max-age=2592000; include    SubDomains';
 71     ssl on;
 72     ssl_certificate ***;
 73     ssl_certificate_key ***;
 74     ssl_session_timeout 5m;
 75     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
 76     ssl_prefer_server_ciphers on;
 77     ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-    GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-R    SA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:!aNULL:!eNULL:    !EXPORT:!DES:!RC4:!3DES:!MD5:!PSK';
 78     ssl_session_cache shared:SSL:10m;
 79     ssl_dhparam /etc/nginx/dhparam.pem;
 80     ssl_stapling on;
 81     ssl_stapling_verify on;
 82 }

I can connect to the rabbit server, i've tested it with a script.
When I execute taiga-events from command line, it starts but I see no output from it.

Any help?

riverman

unread,
Sep 28, 2018, 2:03:36 PM9/28/18
to taigaio
Hi,

What are you trying to achieve exactly?
/events does return 426 “Upgrade Required” for GET requests, which is normal, because it’s a websocket endpoint.

To test events, open two different browsers, login to your taiga instance, go to kanban view, move one user story to another column and check if it has moved in the other browser too.
Internet explorer may fail to update, modern browsers should do the job. Your config seems okay, but the “Debian” hostname is strange in locals.py — are you sure about that?
Reply all
Reply to author
Forward
0 new messages