1

I have a custom Linux build agent in my Azure DevOps project. One of the builds uploads a SQL database to Azure SQL Databases through a Python script using sqlalchemyand ODBC Driver 17 for SQL Server.

Recently the build fails with the following error:

sqlalchemy.exc.DBAPIError: (pyodbc.Error) ('HY000', u'[HY000] [Microsoft][ODBC Driver 17 for SQL Server]SSPI Provider: No Kerberos credentials available (851968) (SQLDriverConnect)') (Background on this error at: http://sqlalche.me/e/dbapi)

This is only when the build is scheduled from Azure DevOps Pipelines. When I run the script locally on the custom build agent everything works fine.

Mengdi Liang
  • 17,577
  • 2
  • 28
  • 35
marcopah
  • 826
  • 2
  • 7
  • 25
  • i suspect your logged in context is different when you run the script locally? – 4c74356b41 Aug 16 '19 at 13:12
  • Which authentication do you configure? Windows Authentication? Or SQL authentication? If you are using windows authentication, please change to use SQL authentication. – Mengdi Liang Aug 19 '19 at 06:37
  • @MerlinLiang-MSFT: Is that an option that is configurable when settiing up the agent on the Linux machine? – marcopah Aug 19 '19 at 10:30
  • No, not option, just a connect string. If you ever use windows identity, please change with SQL identity. In addition, which agent it used while the build is run by scheduled? Still your custom build agent? – Mengdi Liang Aug 20 '19 at 07:26
  • @MerlinLiang-MSFT: Yes, still the custom build agent. I also use the SQL connection string provided from the Azure Portal. – marcopah Aug 20 '19 at 13:25
  • If this, I assume the authentication is SQL authentication.Since Stack Overflow is a open forum, it's not security to share some secret info about you. Do you mind raise the ticket in [Developer Community](https://developercommunity.visualstudio.com/content/problem/post.html?space=21)? After raised, better share with your org name, project name, build definition name and your account in the **comment** with **Microsoft Only** type. So that our engineers can view the detailed log from backend according to these message, and analysis the logs. – Mengdi Liang Aug 21 '19 at 12:09

0 Answers0