hasura / hasura/graphql-engine

healthcheck doesn't respect port changes

Open
#10,552 8 comments 0 reactions 0 assignees View on GitHub
c/v2-engine v2 v2-engine
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: v2.44.0
CLI Version (for CLI related issue):

### Environment
Docker

### What is the current behaviour?

In docker, I set the `HASURA_GRAPHL_SERVER_PORT` environment variable so that Hasura uses a port other than 8080. This works fine so that the server is running on a different port. However, the `healthz` periodic healthcheck always seems to use port 8080. This means that when I switch my port, even though everything is working, I get an `unhealthy` status in Docker. This also means that if something else uses port 8080, then it gets spammed with these `healthz` checks.

### What is the expected behaviour?

If I change the port of the server to something else, then the `healthz` healthchecks should also use that port for checking.

### How to reproduce the issue?

1. Use Docker and set `HASURA_GRAPHL_SERVER_PORT=8081`
2. Start the container and wait a minute or two
3. Check the health of the container and it'll be `unhealthy`

### Please provide any traces or logs that could help here.

### Any possible solutions/workarounds you're aware of?

None that I know of outside of maybe wrapping the container in another container and recreating the healthcheck with the right port?

### Keywords

healthz, 8080, healthcheck

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.