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

Unable to Connect query exporter to Azure SQL database using System Account #146

Open
vaishnavi216 opened this issue Apr 19, 2023 · 0 comments
Labels

Comments

@vaishnavi216
Copy link

vaishnavi216 commented Apr 19, 2023

Describe the bug
Unable to connect Azure SQL database from query exporter using System account credentials.

query exporter config database details:
db1:
dsn: mssql+pyodbc://<>:<>@<>:1433/<>?driver=ODBC+Driver+17+for+SQL+Server&Trusted_connection=yes
autocommit: false
keep-connected: true
labels:
app: sqldb

Post deployment we are unable to get SQL server metrics , below errors observed from pod logs

2023-04-18 05:24:40,986 - ERROR - query-exporter - error from database "db1": (pyodbc.Error) ('HY000', '[HY000] [Microsoft][ODBC Driver 17 for SQL Server]SSPI Provider: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000) (851968) (SQLDriverConnect)')

without "Trusted_connection=yes" in the above mentioned dsn facing below error

2023-04-17 14:29:16,765 - ERROR - query-exporter - error from database "db1": (pyodbc.InterfaceError) ('28000', "[28000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Login failed for user '***'. (18456) (SQLDriverConnect)")
(Background on this error at: http://sqlalche.me/e/13/rvf5)

Connection Details:

  • Query exporter deployed in Kubernetes pod built with ubuntu image
  • Firewall has been enabled between source and destination

How to resolve this error or any other way to connect query exporter to Azure SQL database using System account?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant