Hello,
I'm trying to properly set up an Apache2 reverse proxy on Debian 8 or Ubuntu 15.10. Mattermost is already running successfuly inside Docker with its port published on localhost:8605.
I'm using the Apache configuration as shown in https://github.com/mattermost/platform/issues/872 with the minor difference of not using SSL (so all the SSL* Apache directives and the RequestHeader set X-Forwarded-Proto "https" are commented out for the time being). Apache mods enabled: proxy, proxy_connect, proxy_http, proxy_wstunnel.
The problem is that I'm noticing a "Detected version update refreshing the page" console.log message each time I'm navigating from one channel to another (using either Firefox or Chrome), which translates into UI navigation performance being crappy, not working as a single-page-application.
I'm suspecting that something's definitely wrong with Apache2 proxying, but I'd like some help trying to pinpoint it exactly. I've performed a number of steps to narrow down the problem (with no luck):
- Proxying with Nginx or not proxying at all: of course, everything works as intended.
- Turning on and monitoring all possible logging (Mm DEBUG logs, Apache logs, JS Console, Browser network tools, HTTP negotiations)
- Deliberately "breaking" the Apache and Nginx configuration to see what fails (I've included an example below) and what ends up in DEBUG logs.
- I've tried all Mm versions between 1.1 and 1.3.
I've read the source code of platform/web/react/utils/async_client.jsx around line 63 and monitored the HTTP traffic looking at the X-Version-ID header and comparing the HTTP transactions among proxying with Apache, Nginx or without proxy, but I didn't notice something weird.
What strikes me most is that the problem doesn't seem to relate with the WebSocket as I'd expected (and because Firefox, but not Chrome, tends to display the blue-bar complaint about the websocket). I've tried manually connecting on the websocket to ensure it's not blocked. I've even tried to deliberately break Nginx WS proxying by using this bad configuration:
server {
server_name my.mattermost;
location / {
proxy_pass http://localhost:8065;
}
}
This config produces (as expected) a lot of "could not connect to web socket" console.log messages, but async_client behaves as intended when navigating different channels.
Unfortunately, I'm starting to run out of (hacking & forensics) ideas and would really appreciate some help, if possible, thanks in advance!