Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: failed to parse certificate from server: x509: negative serial number #16309

Open
Eraser3 opened this issue Dec 15, 2024 · 0 comments
Open
Assignees
Labels
bug unexpected problem or unintended behavior

Comments

@Eraser3
Copy link

Eraser3 commented Dec 15, 2024

Relevant telegraf.conf

[[inputs.sqlserver]]
  servers = [
    "Server=127.0.0.1;Port=1433;User Id=telegraf;Password=<HIDDEN>;Database=<MyDatabase>;app name=telegraf;log=1;TrustServerCertificate=1;",
  ]

  query_timeout = "10s"
  database_type = "SQLServer"
  include_query = ["SQLServerPerformanceCounters", "SQLServerRequests"]
  exclude_query = ["SQLServerAvailabilityReplicaStates", "SQLServerDatabaseReplicaStates"]

Logs from Telegraf

Dec 15 14:18:30 sql-02 telegraf[11607]: 2024-12-15T13:18:30Z E! [inputs.sqlserver] Error in plugin: query SQLServerRequests failed for server: 127.0.0.1 and database: <MyDatabase> with Error: TLS Handshake failed: tls: failed to parse certificate from server: x509: negative serial number
Dec 15 14:18:30 sql-02 telegraf[11607]: 2024-12-15T13:18:30Z E! [inputs.sqlserver] Error in plugin: query SQLServerPerformanceCounters failed for server: 127.0.0.1 and database: <MyDatabase> with Error: TLS Handshake failed: tls: failed to parse certificate from server: x509: negative serial number

System info

Telegraf 1.33.0, Ubuntu 20.04.6 LTS, Microsoft SQL Server 2019 (RTM-CU30) (KB5049235) - 15.0.4415.2 (X64) Standard Edition (64-bit)

Docker

No response

Steps to reproduce

  1. Install SQL Server 2019
  2. Configure Telegraf sqlserver input
  3. Run Telegraf

Expected behavior

Telegraf to successfully connect with SQL Server.

Actual behavior

Telegraf fails the SQL Server TLS handshake because of the X509 negative serial number.

Additional info

No response

@Eraser3 Eraser3 added the bug unexpected problem or unintended behavior label Dec 15, 2024
@DStrand1 DStrand1 self-assigned this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants