New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gateway/management] Healthcheck probe must connect on declared host in config #789

Closed
blackfich opened this Issue Sep 15, 2017 · 1 comment

Comments

Projects
None yet
4 participants
@blackfich

blackfich commented Sep 15, 2017

The healthcheck probe must use the host as it is declared in the gravitee.yml rather than localhost.

Expected Behavior

Just like it connects to the port declared in the gravity.yml, the healthcheck probe must use the host as it is declared in the gravitee.yml rather than localhost.

Current Behavior

Currently the probe is hardcoded to connect to localhost, hence giving the following status even if the gateway/management-api is working fine :

management-api:
  healthy: false
  message: "Connection refused: localhost/127.0.0.1:8083"

Possible Solution

Just like the port is retrived from the config file, the host should also be retrieved from there:

@Value("${http.host:localhost}")
private String host;

and used accordingly:

client.connect(port, host, res -> { ...

Steps to Reproduce (for bugs)

Bind the gateway/management-api to the actual IP address rather than localhost or 0.0.0.0

Context

Healtheck is useless if always reporting unhealthy

Your Environment

  • Version used: 1.9.0
  • Browser Name and version: N/A
  • Operating System and version: CentOS/7

@aelamrani aelamrani changed the title from [management][gateway] healthcheck probe must connect on declared host in config to [gateway] Healthcheck probe must connect on declared host in config Sep 15, 2017

@aelamrani aelamrani changed the title from [gateway] Healthcheck probe must connect on declared host in config to [gateway/management] Healthcheck probe must connect on declared host in config Sep 15, 2017

@aelamrani aelamrani self-assigned this Sep 15, 2017

@brasseld brasseld added this to the 1.9.1 milestone Sep 18, 2017

@brasseld brasseld reopened this Sep 25, 2017

@brasseld brasseld modified the milestones: 1.9.1, 1.10.0 Oct 6, 2017

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Oct 6, 2017

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Oct 6, 2017

@brasseld brasseld self-assigned this Oct 6, 2017

brasseld added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Oct 13, 2017

brasseld added a commit to gravitee-io/gravitee-gateway that referenced this issue Oct 13, 2017

NicolasGeraud added a commit to gravitee-io/gravitee-management-rest-api that referenced this issue Oct 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment