Unlimited connect.... ios

For feature requests, please see: Contributing Feature Proposals - Mattermost.

For troubleshooting questions, please post in the following format:

Summary


iOS 14, mattermost 1.45.0, server 5.37.0

Continue unlimited connect message…

Push notification, send/receive message is no problem.

Server log is no error.

Steps to reproduce
How can we reproduce the issue (what version are you using?)

Expected behavior
Describe your issue in detail

Observed behavior
What did you see happen? Please include relevant error messages and/or screenshots.

Hi, @Gogogo

In regards to the Connecting status banner shown on your iOS app, I would like to confirm on the following:

  • I believe that you are self hosting your Mattermost Server 5.37.0 on your end. May I know the URL that you used to access it on your iOS app? Were you using HTTP or HTTPS?

  • Were you connected through Wifi or the network service provider?

  • Do you use any proxy set up and configured SSL for the instance?

  • Is this happening specifically to iOS app or does it also occur on Android app too?

  • Are you able to access the Mattermost instance through the mobile web browser instead of using the mobile app?

Keep me posted. Thanks.

  1. https
  2. Wifi / LTE / 5G same issue.
  3. no proxy
    vps1(ssl nginx reverse proxy) <—> vps2(http mattermost server, postgres db)
  4. other ios phone same issue (ios15, iphone 8)
  5. mobile brower is not issue.

There are no errors in the server log.

Chat, push notificiation, bot, webhook is no error.

Hello, @Gogogo

Thanks for the confirmation. Specific to this part:

The mobile app has a more strict rule on how it allows connectivity from a self hosted server. With that being the case, can you please provide information on how you configured HTTPS on your Mattermost server? Did you refer to the official documentation here and which SSL certificate authority (CA) did you use?

Using Let’s encrypt and Cloudflare

Cloudflare <-> Nginx reverse proxy(Let’s encrypt) <-> http mattermost server.

Disabling cloudflare, fixed the error.

Which part should I check?

I don’t know why using cloudflare proxy occur error. only mm app…
(Cloudflare set http3/http2/tls1.2,1.3/websocket enable)

My nginx conf

   location ~ /api/v[0-9]+/(users/)?websocket$ {
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       client_max_body_size 50M;
       proxy_set_header Host $host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Frame-Options SAMEORIGIN;
       proxy_buffers 256 16k;
       proxy_buffer_size 16k;
       client_body_timeout 60;
       send_timeout 300;
       lingering_timeout 5;
       proxy_connect_timeout 90;
       proxy_send_timeout 300;
       proxy_read_timeout 90s;
       proxy_http_version 1.1;
       proxy_pass http://backend;
   }

   location / {
       client_max_body_size 50M;
       proxy_set_header Connection "";
       proxy_set_header Host $http_host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Frame-Options SAMEORIGIN;
       proxy_buffers 256 16k;
       proxy_buffer_size 16k;
       proxy_read_timeout 600s;
       proxy_cache mattermost_cache;
       proxy_cache_revalidate on;
       proxy_cache_min_uses 2;
       proxy_cache_use_stale timeout;
       proxy_cache_lock on;
       proxy_http_version 1.1;
       proxy_pass http://backend;
   }
}

It continuously requests and sends status 200 responses.

# nginx access log
GET /api/v4/system/ping?time=xxx HTTP/1.1][Mattermost/364 CFNetwork/1126 Darwin/19.5.0

POST /api/v4/users/status/ids HTTP/1.1] [Mozilla/5.0 (iPhone; CPU iPhone OS

some error log

# nginx error log
upstream prematurely closed connection while reading response header from upstream, client: x.x.x.x, server: domain.tld, request: "POST /api/v4/users/status/ids HTTP/2.0", upstream: "http://x.x.x.x:8065/api/v4/users/status/ids"

@ahmaddanial Any solution ?

It seems to be related to the websocket.

It is highly likely that because your websockets are not configured. I don’t see anything configured for it.

@yanuk

I turned on websockets…