brocaar / chirpstack-application-server

ChirpStack Application Server is an open-source LoRaWAN application-server.
https://www.chirpstack.io
MIT License
498 stars 325 forks source link

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

Open JohnRoesler opened 4 years ago

JohnRoesler commented 4 years ago

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 commented 4 years ago

was missing port on the redis cluster address

JohnRoesler commented 4 years ago

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