charts icon indicating copy to clipboard operation
charts copied to clipboard

bitnami/redis 12.1.1 - Once I enable redis.tls and Metrics, I got errors of "bad certificate" and No metrics data shown on Grafana

Open drmy opened this issue 6 years ago • 15 comments

Which chart: The name (and version) of the affected chart bitnami/redis 12.1.1

Describe the bug Once I enable TLS and Metrics, then in the Redis log I see the following errors:

Error accepting a client connection: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate

And, no metrics data can be shown on my Grafana, even though I can see that Prometheus has successfully detected the redis nodes with metrics, e.g. this is green: http://10.244.7.76:9121/metrics

I saw there was a bug - Redis Metrics Exporter doesn't fully support TLS below: https://github.com/oliver006/redis_exporter/issues/387 This bug seems to have been fixed included into the 12.1.1, however I still see the issue.

drmy avatar Dec 03 '20 04:12 drmy

Does anyone have the same problem? I just won't be able to enable Redis TLS and Metrics at the same time, I am using bitnami/redis with the sentinel mode.

So, If I disable TLS and enable metrics, metrics can work fine If I enable TLS and disable metrics, redis logs are good, with no errors, TLS works fine. If I enable TLS and enable metrics, metrics won't work, and redis log keeps writting "bad certificates" erros but actually TLS can work fine with my redis client.

drmy avatar Dec 06 '20 00:12 drmy

Hi @drmy, it looks like you also need to specify TLS option to the Redis Metrics tool. You can do that via metrics.extraArgs.

You can find the Redis Metrics CLI flags for TLS here.

marcosbc avatar Dec 07 '20 15:12 marcosbc

Hi @drmy, it looks like you also need to specify TLS option to the Redis Metrics tool. You can do that via metrics.extraArgs.

You can find the Redis Metrics CLI flags for TLS here.

Thank you very much @marcosbc . It works now.

In my case, I just put the following item in the metrics section of value file to skip tls verification for redis exporter:

extraArgs: skip-tls-verification: true

drmy avatar Dec 09 '20 06:12 drmy

That's cool! but it would be good to have some lines at this section in the README.md https://github.com/bitnami/charts/tree/master/bitnami/redis#securing-traffic-using-tls just saying what Marcos added

You can do that via metrics.extraArgs. You can find the Redis Metrics CLI flags for TLS here.

would you like to contribute with a PR to the repo?

dani8art avatar Dec 09 '20 11:12 dani8art

That's cool! but it would be good to have some lines at this section in the README.md https://github.com/bitnami/charts/tree/master/bitnami/redis#securing-traffic-using-tls just saying what Marcos added

You can do that via metrics.extraArgs. You can find the Redis Metrics CLI flags for TLS here.

would you like to contribute with a PR to the repo?

Yeah. Let me learn how to make a PR...

And my use case is simple since I can accept to skip client TLS authentication so I take: skip-tls-verification: true But I think in case of requiring the client TLS authentication then we might need to set some other key/values: tls-client-key-file tls-client-cert-file tls-ca-cert-file https://github.com/oliver006/redis_exporter#command-line-flags I haven't got an environment to test that yet.

drmy avatar Dec 11 '20 11:12 drmy

Yep, you are completely right, let me check and I could add some guidance about how to add those flags.

BTW, you could start working on the PR, please take a look at this file: https://github.com/bitnami/charts/blob/master/CONTRIBUTING.md

Thanks!

dani8art avatar Dec 14 '20 11:12 dani8art

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

stale[bot] avatar Jan 18 '21 07:01 stale[bot]

Hi @drmy did you have a chance to work on this?

dani8art avatar Jan 18 '21 17:01 dani8art

Hi @drmy did you have a chance to work on this?

Hi @dani8art , I am sorry for the slow resoponse because I was busy in some work stuff. Yes, I am working on that and plan to make it by this week, will keep you updated.

drmy avatar Jan 19 '21 12:01 drmy

That's great! thanks!

dani8art avatar Jan 20 '21 09:01 dani8art

Hi @dani8art ,

I have created a PR for the redis README.md change for the metrics parameter usage:

https://github.com/bitnami/charts/pull/5207

drmy avatar Jan 23 '21 14:01 drmy

Hi @dani8art ,

I have created a PR for the redis README.md change for the metrics parameter usage:

#5207

Hi,

Thank you for the PR merging. However, I just found that I made a markdown mistake affecting the following line in the readme.md file. I think we will need to open a new issue to fix the bug and we can also merge the correct changes to the redis-cluster helm Chart. I apologize for that.

https://github.com/bitnami/charts/tree/master/bitnami/redis#metrics

Host Kernel Settings

drmy avatar Jan 26 '21 00:01 drmy

Ok sure, let's create it then. Thanks for reporting it!

dani8art avatar Jan 26 '21 14:01 dani8art

Ok sure, let's create it then. Thanks for reporting it!

I created a PR and the fix has been merged: https://github.com/bitnami/charts/pull/5232

drmy avatar Jan 26 '21 14:01 drmy

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

stale[bot] avatar Feb 25 '21 12:02 stale[bot]