taigaio / taiga-docker

Mozilla Public License 2.0
1.22k stars 305 forks source link

[Q] Websocket issue 404/502/426 [Solved] #92

Closed NLBlackEagle closed 1 year ago

NLBlackEagle commented 2 years ago

First of all I have to mention I am a novice when it comes to advanced network troubleshooting and solely use google to track down issues whilst attempting to perform fixes. After spending the last two days troubleshooting I finally gave in and decided to ask for help.

So first of all the guide which I have followed is the docker guide at https://docs.taiga.io/setup-production.html#setup-prod-with-docker & launched taiga using the directives on https://github.com/taigaio/taiga-docker

Then after confirming taiga did run but not properly I configured the apache vhosts resulting in firstly a 426 (upgrade required) error code, then a 502, a 404 and now a 502 once again for the websockets.

Taiga itself loads up properly but I can not start any projects as then it freezes and reports those errors. I quickly figured out it was the websockets at fault due to the firefox inspector giving me the following errors:

afbeelding

Then after following a number of guides among which:

https://github.com/docker-taiga/taiga/issues/28

I stumbled upon the following guide: https://github.com/sftd/taiga-doc/blob/master/setup-production-centos-apache.adoc which basically explains a whole different kind of setup at which point I simply gave up and decided to ask for help rather then trying to widly guess solutions at this point.

mod_proxy + all other required modules are enabled which I have quadruple checked at this point and I also double checked with chrome at multiple intervals to see if it was a browser related issue.

My current vhost settings are;


<VirtualHost *:80>

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ServerName taiga.dregora.com
ServerAlias taiga.dregora.com

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

</VirtualHost>

and https:

<VirtualHost *:443>

ServerName taiga.dregora.com
ServerAlias taiga.dregora.com

Header add X-Forwarded-Proto "https"
RequestHeader add X-Forwarded-Proto "https"

# Logging
LogLevel warn
ErrorLog taiga.dregora.com-error_log
CustomLog taiga.dregora.com-access_log combined

# Reverse proxy configuration
<Location />
ProxyPass http://localhost:9000/
ProxyPassReverse http://localhost:9000/
</Location>

SSLCertificateFile /etc/letsencrypt/live/taiga.dregora.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/taiga.dregora.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/taiga.dregora.com/chain.pem
</VirtualHost>

Aside from the above configs I have tried many, many more. Here are the relevant docket-compose.yml settings:

  TAIGA_SITES_SCHEME: "https"
  TAIGA_SITES_DOMAIN: "taiga.dregora.com"
  TAIGA_URL: "https://taiga.dregora.com"
  TAIGA_WEBSOCKETS_URL: "wss://taiga.dregora.com"
  TAIGA_SUBPATH: "" # "" or "/subpath"

After adding in:

<Location /events/>
ProxyPass http://localhost:9000/events/
ProxyPassReverse http://localhost:9000/events/
</Location>

at the https vhost the following is returned in the console:

afbeelding

I look forward to any replies!

NLBlackEagle commented 2 years ago

SOLUTION

Feel free to close as soon as you read this but please please please include int he documentation that password and secret keys should be without any special characters. ( In my case I had something like A7hgAS/7ahgsD3 (where the / caused the issue)

It's only logical when I think about it now but I can see a lot of people bumping into this issue