Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Health check fails if "http" listener is not defined, or listens on a different port #11472

Closed
ShadowJonathan opened this issue Dec 1, 2021 · 2 comments

Comments

@ShadowJonathan
Copy link
Contributor

Description

While investigating while matrix-org/complement#236 failed, and after correlating its failure with my own synapse deployment experiences, i found this problem.

I have had no healthchecks on my workers for a while, this confused me initially, but i eventually disabled them and chalked it up to some latent bug i wasnt able to reproduce or find.

Turns out, this is because the healthcheck blindly checks on 8008, and then doesn't try to account for both of these issues.

Steps to reproduce

version 1:

  • Create a worker
  • Don't define any listeners, no "http" ones either
  • Deploy
  • Observe "unhealthy" status

version 2:

  • Create a worker
  • Define a "http" listener, but on a different port;
orker_listeners:
  - type: http
    port: 8083
    resources:
      - names:
        - client
  • Deploy
  • Observe "unhealthy" status

Suggested fix

I suggest decoupling the Health resource from any listener definition, and to place it up on a very high port, regardless of config.

This behaviour should be enabled with an env variable (defined by default in the Dockerfile), with additionally also another env variable dictating a non-default port.

This is to make sure that if someone runs this on bare-metal, and still wants health checks, but do not want the ports to collide, they could enable and divert the health-check port to something else.

Version information

  • Homeserver: jboi.nl
  • Version: 1.46.0
  • Install method: Docker, wrapping with a local Dockerfile with additional apt-get and pip instructions, to install an s3 media repository proxy.
  • Platform: Linux
@richvdh
Copy link
Member

richvdh commented Dec 1, 2021

dup #8780 I think

@richvdh richvdh closed this as completed Dec 1, 2021
@ShadowJonathan
Copy link
Contributor Author

ShadowJonathan commented Dec 1, 2021

Sorta, I'll add a comment that it doesn't work with different port as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants