So I am trying to host taiga in ubuntu 22.04 in my Hyper-V environment. so I followed the “Install taiga in production/from source code” documentation. I have followed every step properly. The fronted is working fine but whenever it tries to connect with taiga-event it says “Firefox can’t establish a connection to the server at wss://localhost:8888/events.” I have spent several days trying to figure out whats wrong. but failed. All the services are running properly.
Can you help me detect whats wrong with my configurations?
Things I have tried:
- tried different ports to connect taiga event and also tried default rabbitMQ ports (5671/5672)
- Tried in different browser
- Tried different configuration in nginx.
All the configurations:
1. nginx taiga.conf:
server {
listen 80 default_server;
server_name localhost;
return 301 https://$server_name$request_uri;
}
server {
listen 443 default_server;
server_name localhost; # See http://nginx.org/en/docs/http/server_names.html
large_client_header_buffers 4 32k;
client_max_body_size 50M;
charset utf-8;
access_log /home/taiga/logs/nginx.access.log;
error_log /home/taiga/logs/nginx.error.log;
# TLS: Configure your TLS following the best practices inside your company
# Other configurations
# Frontend
location / {
alias /home/taiga/taiga-front-dist/dist/;
index index.html;
try_files $uri $uri/ index.html =404;
}
# API
location /api/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8001/api/;
proxy_redirect off;
}
# Admin
location /admin/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8001/admin/;
proxy_redirect off;
}
# Static files
location /static/ {
alias /home/taiga/taiga-back/static/;
}
# Media
location /_protected/ {
internal;
alias /home/taiga/taiga-back/media/;
add_header Content-disposition "attachment";
}
# Unprotected section
location /media/exports/ {
alias /home/taiga/taiga-back/media/exports/;
add_header Content-disposition "attachment";
}
location /media/ {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8001/;
proxy_redirect off;
}
# Events
location /events {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
proxy_pass http://127.0.0.1:8888/events;
}
}
2. taiga.service:
[Unit]
Description=taiga_back
After=network.target
[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-back
ExecStart=/home/taiga/taiga-back/.venv/bin/gunicorn --workers 4 --timeout 60 --log-level=info --access-logfile - --bind 0.0.0.0:8001 taiga.wsgi
Restart=always
RestartSec=3
Environment=PYTHONUNBUFFERED=true
Environment=DJANGO_SETTINGS_MODULE=settings.config
[Install]
WantedBy=default.target
taiga-async.service:
[Unit]
Description=taiga_async
After=network.target
[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-back
ExecStart=/home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
Restart=always
RestartSec=3
ExecStop=/bin/kill -s TERM $MAINPID
Environment=PYTHONUNBUFFERED=true
Environment=DJANGO_SETTINGS_MODULE=settings.config
[Install]
WantedBy=default.target
3. taiga-async.service:
[Unit]
Description=taiga_async
After=network.target
[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-back
ExecStart=/home/taiga/taiga-back/.venv/bin/celery -A taiga.celery worker -B --concurrency 4 -l INFO
Restart=always
RestartSec=3
ExecStop=/bin/kill -s TERM $MAINPID
Environment=PYTHONUNBUFFERED=true
Environment=DJANGO_SETTINGS_MODULE=settings.config
[Install]
WantedBy=default.target
4. taiga-events.service:
[Unit]
Description=taiga_events
After=network.target
[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-events
ExecStart=npm run start:production
Restart=always
RestartSec=3
[Install]
WantedBy=default.target
5. taiga-protected.service:
[Unit]
Description=taiga_protected
After=network.target
[Service]
User=taiga
WorkingDirectory=/home/taiga/taiga-protected
ExecStart=/home/taiga/taiga-protected/.venv/bin/gunicorn --workers 4 --timeout 60 --log-level=info --access-logfile - --bind 0.0.0.0:8003 server:app
Restart=always
RestartSec=3
Environment=PYTHONUNBUFFERED=true
[Install]
WantedBy=default.target
6. taiga-back/settings/config.py:
import os
from .common import * # noqa, pylint: disable=unused-wildcard-import
DEBUG = False
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'taiga',
'USER': 'taiga',
'PASSWORD': 'changeme',
'HOST': '',
'PORT': '',
}
}
SECRET_KEY = "TaigaSecretKey"
TAIGA_SITES_SCHEME = "http"
TAIGA_SITES_DOMAIN = "localhost"
FORCE_SCRIPT_NAME = ""
TAIGA_URL = f"{ TAIGA_SITES_SCHEME }://{ TAIGA_SITES_DOMAIN }{ FORCE_SCRIPT_NAME }"
SITES = {
"api": { "name": "api", "scheme": TAIGA_SITES_SCHEME, "domain": TAIGA_SITES_DOMAIN },
"front": { "name": "front", "scheme": TAIGA_SITES_SCHEME, "domain": f"{ TAIGA_SITES_DOMAIN }{ FORCE_SCRIPT_NAME }" }
}
DEFAULT_PROJECT_SLUG_PREFIX = False
MEDIA_URL = f"{ TAIGA_URL }/media/"
DEFAULT_FILE_STORAGE = "taiga_contrib_protected.storage.ProtectedFileSystemStorage"
THUMBNAIL_DEFAULT_STORAGE = DEFAULT_FILE_STORAGE
STATIC_URL = f"{ TAIGA_URL }/static/"
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
CHANGE_NOTIFICATIONS_MIN_INTERVAL = 120 # seconds
DEFAULT_FROM_EMAIL = 'changeme@example.com
7. taiga-frontend conf.json:
{
"api": "http://localhost:8001/api/v1/",
"eventsUrl": "wss://localhost:8888/events",
"baseHref": "/",
"eventsMaxMissedHeartbeats": 5,
"eventsHeartbeatIntervalTime": 60000,
"eventsReconnectTryInterval": 10000,
"debug": false,
"debugInfo": false,
"defaultLanguage": "en",
"themes": [
"taiga"
],
"defaultTheme": "taiga",
"defaultLoginEnabled": true,
"publicRegisterEnabled": true,
"feedbackEnabled": true,
"supportUrl": "https://community.taiga.io/",
"privacyPolicyUrl": null,
"termsOfServiceUrl": null,
"maxUploadFileSize": null,
"contribPlugins": [],
"tagManager": {
"accountId": null
},
"tribeHost": null,
"enableAsanaImporter": false,
"enableGithubImporter": false,
"enableJiraImporter": false,
"enableTrelloImporter": false,
"gravatar": false,
"rtlLanguages": [
"ar",
"fa",
"he"
]
}
8. protected .env
SECRET_KEY=TaigaSecretKey
MAX_AGE=300
TAIGA_SUBPATH=
9. RabbitMQ env:
RABBITMQ_URL="amqp://rabbitmquser:rabbitmqpassword@rabbitmqhost:5672/taiga"
WEB_SOCKET_SERVER_PORT=8888
APP_PORT=3023
SECRET="TaigaSecretKey"
ALGORITHM="HS256"
AUDIENCE=
ISSUER=
USER_ID_CLAIM="user_id"
LOG_LEVEL="info"
Please if you can at least give me some ideas how can I fix it. Thanks in advance.