CRITICAL OUTAGE: Azure WebApp not finding ODBC Driver

Genesis 76 Reputation points
2022-08-10T09:05:28.01+00:00

I am running an app service on Azure which is connected to an Azure SQL database. I have used the same configuration for over 2 years with similar apps and have had no problems. Up until 2 days ago, this app was working without problems as well.

Now, I am getting the error

sqlalchemy.exc.DBAPIError: (pyodbc.Error) ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")     

I have tried drivers 13 and 18 as well as FreeTDS and get the same error. Please advise on a fix. This app is currently in production and experiencing downtime because of the issue.

Thanks and looking forward to the response.

Ben

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,874 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Genesis 76 Reputation points
    2022-08-12T09:52:20.69+00:00

    I have been informed by Azure support that the problem is a known platform issue that came up after the Antares 99 upgrade. They're working on a solution but as a (temporary) they suggest adding a startup script with

    #!/bin/bash  
    apt-get update  
    apt-get install -y unixodbc-dev  
    ACCEPT_EULA=Y apt-get install msodbcsql17  
    <startup command to launch your application>  
    

    This has got the application up and running again.

    7 people found this answer helpful.

  2. Bjoern Peters 8,781 Reputation points
    2022-08-10T11:39:06.767+00:00

    As we don't know any details about your system, your application nor your ODBC connection, we just can guess...

    It seems (from the error message) that you are running a linux server where your application is running, so something must have been changed on that server, causing trouble with the ODBC driver... Please check your ODBC connection, correct driver, correct path, and correct version, ...

    Do you have followed all the steps from this instruction to install your ODBC connector?
    Update it/re-install it and try again

    https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15