Skip to content

Connection lost permanently on TCP RST #57

@a-gerhard

Description

@a-gerhard

We have an issue that our bot becomes unresponsive after a restart of mattermost's reverse proxy.

Steps to reproduce:

  • setup up mattermost behind nginx reverse proxy; connect bot through the reverse proxy. Both mattermost and nginx are running inside docker, with http/s ports directly published from the container.
  • start bot and connect to mattermost instance (verify it's working).
  • restart the nginx server on mattermost (docker-compose restart nginx)

What we'd expect

  • The bot tries to reconnect to mattermost

What happens

  • we see a log entry showing that the connection was closed
  • however, the bot doesn't attempt to reconnect
  • the bot also doesn't exit, process stays active
  • there are no ping/pong message log entries anymore in this state
  • a restart of the bot is required to solve the issue

From the log:

2023-03-16 20:03:06,274 DEBUG    websockets.client         % sending keepalive ping
2023-03-16 20:03:06,274 DEBUG    websockets.client         > PING 37 8d 3d 0e [binary, 4 bytes]
2023-03-16 20:03:06,277 DEBUG    websockets.client         < PONG 37 8d 3d 0e [binary, 4 bytes]
2023-03-16 20:03:06,278 DEBUG    websockets.client         % received keepalive pong
2023-03-16 20:03:17,949 DEBUG    websockets.client         ! failing connection with code 1006
2023-03-16 20:03:17,955 DEBUG    websockets.client         = connection is CLOSED
2023-03-16 20:03:17,956 DEBUG    websockets.client         x closing TCP connection

(no related messages in the log afterwards)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions