Skip to content

Cannot connect to mysql since we activated tls 1.2 #525

@rmathot

Description

@rmathot

Host operating system: output of uname -a

Linux 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

mysqld_exporter version: output of mysqld_exporter --version

The one from the last docker image prom/mysqld-exporter, pulled today

MySQL server version

mysql Ver 14.14 Distrib 5.7.32, for Linux (x86_64) using EditLine wrapper

mysqld_exporter command line flags

  - --config.my-cnf=/etc/mysqld_exporter.cnf
  - --collect.binlog_size
  - --collect.info_schema.processlist
  - --collect.engine_innodb_status
  - --collect.info_schema.query_response_time
  - --collect.info_schema.tables
  - --collect.info_schema.userstats
  - --collect.perf_schema.eventswaits
  - --collect.info_schema.schemastats
  - --collect.info_schema.tablestats

content of /etc/mysqld_exporter.cnf:

host=<our host name.something.com>
user=exported
password=<redacted>
ssl-ca=/path/to/mysql.ca.pem

What did you do that produced an error?

This used to work until today, when we (finally) enabled tls 1.2 in mysql configuration and restarted our server

What did you expect to see?

Connection works

What did you see instead?

Error message. I try anything I could, including validating the whole chain of signatures for our certificate, I still get the frustrating certificate signed by unknown authority

time="2021-01-19T16:04:29Z" level=info msg="Starting mysqld_exporter (version=0.12.1, branch=HEAD, revision=48667bf7c3b438b5e93b259f3d17b70a7c9aff96)" source="mysqld_exporter.go:257"
time="2021-01-19T16:04:29Z" level=info msg="Build context (go=go1.12.7, user=root@0b3e56a7bc0a, date=20190729-12:35:58)" source="mysqld_exporter.go:258"
time="2021-01-19T16:04:29Z" level=info msg="Enabled scrapers:" source="mysqld_exporter.go:269"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.global_status" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.global_variables" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.slave_status" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.processlist" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.tables" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.binlog_size" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.perf_schema.eventswaits" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.userstats" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.tablestats" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.schemastats" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.innodb_cmpmem" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.query_response_time" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.engine_innodb_status" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg=" --collect.info_schema.innodb_cmp" source="mysqld_exporter.go:273"
time="2021-01-19T16:04:29Z" level=info msg="Listening on :9104" source="mysqld_exporter.go:283"
time="2021-01-19T16:05:08Z" level=error msg="Error pinging mysqld: x509: certificate signed by unknown authority" source="exporter.go:146"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions