mysqld_exporter icon indicating copy to clipboard operation
mysqld_exporter copied to clipboard

Error pinging mysqld" err="context deadline exceeded

Open MilkTeaNo7 opened this issue 5 months ago • 3 comments

I'm really pushed to the wall, it's driving me crazy.

Troubleshooting Steps:

  1. In the Prometheus backend, the node is online, and Targets can be seen.
    • Upon clicking in, it returns around 2000 data points.
    • Adding scrape_interval: 5mscrape_timeout: 1m in Prometheus configuration allows a small portion of data to appear, but the error in mysqld_exporter persists.
  2. Service restarts are ineffective, as are server restarts.
    • mysqld_exporter
    • Prometheus
    • Grafana
  3. /metrics data can be obtained, tested with curl http://10.0.0.9:9104/metrics
    • On the server, it can be obtained.
    • On the mysqld_exporter local machine, it can be obtained.
    • The data volume is normal with around 2000 metrics.
    • The response time takes several seconds.
  4. The mysqld_exporter service configuration file .my.cnf is correct.
    • The same configuration works on other servers.
    • Increasing the timeout with connect_timeout=10 is ineffective.
    • Changing the local address to host=localhost is ineffective.
  5. The database account is correct.
    • Remote tools test the account with no issues.
    • The account has % privileges as well as local privileges.
    • Creating a new account with root privileges does not resolve the issue.
    • The account password does not contain special characters such as #.
  6. The server can Ping the client machine, and the firewalls are all disabled.
  7. The port is normal, port number 9104, not occupied.
  8. The problematic client and the non-problematic client have the same version, both are go1.21.5.

MilkTeaNo7 avatar Sep 05 '24 14:09 MilkTeaNo7