chirpstack-application-server icon indicating copy to clipboard operation
chirpstack-application-server copied to clipboard

Healthcheck fails in confusing manner when redis cluster urls don't include port

Open JohnRoesler opened this issue 4 years ago • 2 comments

  • [x] The issue is present in the latest release.
  • [x] I have searched the issues of this repository and believe that this is not a duplicate.

What happened?

I enabled the redis cluster without setting the ports as well as the health check endpoint. Resulting error:

2020/08/04 17:14:29 http: superfluous response.WriteHeader call from github.com/brocaar/chirpstack-application-server/internal/monitoring.healthCheckHandlerFunc (healthcheck.go:23)

What did you expect?

the healthcheck to pass allowing my kubernetes container to start

Steps to reproduce this issue

Steps:

  1. Set the redis config as cluster redis.cluster=true redis.servers=["localhost","host2"]
  2. Set monitoring.healthcheck_endpoint=true

Could you share your log output?

2020/08/04 17:14:29 http: superfluous response.WriteHeader call from github.com/brocaar/chirpstack-application-server/internal/monitoring.healthCheckHandlerFunc (healthcheck.go:23)

Your Environment

Component Version
Application Server v3.11.1
Network Server
Gateway Bridge
Chirpstack API
Geolocation
Concentratord

JohnRoesler avatar Aug 04 '20 17:08 JohnRoesler

was missing port on the redis cluster address

JohnRoesler avatar Aug 04 '20 17:08 JohnRoesler

I will repurpose this issue. The error message is highly confusing regarding what the issue was.

JohnRoesler avatar Aug 04 '20 17:08 JohnRoesler