cancel
Showing results for 
Search instead for 
Did you mean: 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to connect to databricks with ODBC connection on a Mac

danilo_amorim
New Contributor

Hi all!

Need help configuring ODBC connection on a Mac. I'm receiving the error "The web server failed to start, please verify if  port 8020 is being used by another connection or annother application".

I've downloaded and installed Databricks ODBC connector for Mac.
I've configured the odbc.ini file with the same parameters I use to connect on Windows.
Even so, I stumbled on the error below 

danilo_amorim_0-1742470647673.png

I've checked that port 8020 is not being used.
I"ve tried running Excel as root user. No success, though

1 REPLY 1

mark_ott
Databricks Employee
Databricks Employee

The error "The web server failed to start, please verify if port 8020 is being used by another connection or another application" when configuring an ODBC connection to Databricks on a Mac, even after checking that port 8020 is not in use, is a known frustration for Mac users. The root cause isn't always an actual port conflict; sometimes it relates to Mac-specific issues like the ODBC Driver Manager setup, driver compatibility, or Excel's integration on Mac.

Key Points and Troubleshooting Steps

  • ODBC Excel Integration on Mac: The OAuth and browser-based authentication for Databricks with ODBC is not fully supported for Excel on Mac. Microsoft's and Databricks' official documentation notes limitations for Mac, recommending token-based authentication instead. If you try OAuth, you might encounter web server startup or port errors.​

  • Driver Manager Issues: The community and vendor documentation highlight that the Mac environment may not automatically find the required ODBC Driver Manager. Check for libodbcinst.dylib in /usr/local/lib/. If it does not exist, run brew install unixodbc to install it. Then, update the driver config file (usually in /Library/simba/spark/lib/simba.sparkodbc.ini) to explicitly reference the ODBC Driver Manager library.​

  • Correct Connection Method for Mac & Excel:

    • Use the Mac 64-bit ODBC connector.

    • In Excel, go to Data > Get Data (Power Query) > From Database (Microsoft Query).

    • Select your DSN.

    • For "Username", use token; for "Password," paste your Databricks Personal Access Token.

    • If you use OAuth or browser-based login, these features do not work reliably on Mac and can cause the error you're seeing.​

  • Other Potential Causes:

    • A past or failed server process using 8020 may have left residue. Try rebooting your Mac to fully clear the port.

    • Ensure all Excel and ODBC drivers are up to date.

    • Check your ODBC configuration files (odbc.ini, driver .ini) for accuracy, and ensure you're not mixing Windows-specific parameters.

  • If None Work: There are reports on Databricks and GitHub forums that some users must use a token-based connection on Mac or switch to another ODBC client if Excel's built-in approach keeps failing.​

Summary Table: Key Troubleshooting for Databricks ODBC on Mac

Issue Solution
Port 8020 error (not in use) Reboot Mac, ensure no processes use the port, confirm you are not attempting OAuth in Excel.
ODBC Manager not found Install unixODBC with Homebrew, link libodbcinst.dylib in simba.sparkodbc.ini
OAuth authentication issues Use Databricks Personal Access Token instead
Excel ODBC error persists Use "From Database (Microsoft Query)" option with DSN and token credentials
 
 

Adopting token-based authentication and checking the ODBC Driver Manager path are usually effective measures for resolving the specific Mac and Excel issues you're facing.​