mattermost / mattermost

Mattermost is an open source platform for secure collaboration across the entire software development lifecycle..
https://mattermost.com
Other
30.5k stars 7.31k forks source link

Connection issues behind Apache2 reverse proxy #28908

Open RolfWojtech opened 1 day ago

RolfWojtech commented 1 day ago

Summary

Since upgrading my Mattermost instance to 10.0.1 (bundled with Gitlab), the connection through a reverse proxy is unstable https://docs.mattermost.com/configure/config-proxy-apache2.html with the browser and the android app (least).

Steps to reproduce

Setup mattermost behind a reverse proxy as outlined in https://docs.mattermost.com/configure/config-proxy-apache2.html Connect with the app or from a browser through the reverse proxy. You would get the message "The server is not reachable" and sending messages will go to the retry mechanismn, but sometimes they go through. Incoming messages also do not arrive.

Operating System

Android App 2.21.0

Mattermost Server Version

Gitlab Mattermost Version 10.0.1

Expected behavior

Stable communication with the server, outgoing messages leaving without retry.

Observed behavior

You get the message "The server is not reachable" and sending messages will go to the retry mechanismn, but sometimes they go through. Incoming messages also do not arrive.

Log Output

Not sure how to get logs from Android.

Additional Information

I am aware that the functionality behind a reverse proxy is labeled as unofficial and you probably don't support Gitlab Mattermost, but I would be surprised if the Gitlab team touches this part of the code and wanted to report the issue nonetheless in case the linked reverse proxy guide needs an update for 10.x.

mattrmiller commented 19 hours ago

Do you have logs from server?

You can try increasing the timeout inside your apache config for proxy:

ProxyTimeout 300
ProxyConnectTimeout 300
ProxySendTimeout 300
ProxyReceiveTimeout 300

As a second debug step, you can try disabling buffering to ensure real-time updates flow correctly without delay:

SetEnv proxy-nokeepalive 1