I googled the error message and found plenty of StackOverflow threads:
- python - pyodbc.OperationalError: ('HYT00', u'[HYT00] [unixODBC][Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired (0) (SQLDriverConnect)') - Stack Overflow
- sql server - "Login timeout expired" error when accessing MS SQL db via sqlalchemy and pyodbc - Stack Overflow
- sql server - Pyodbc: Login Timeout Error - Stack Overflow
- "Login timeout expired" on Centos 7 · Issue #412 · mkleehammer/pyodbc · GitHub
- pyodbc.OperationalError - Issue connect Microsoft SQL Server
The overarching theme seems to be that Microsoft’s SQL Server ODBC drivers for Linux are unable to resolve instance names. The problem might be DNS related, as you can read here. Try to use an IP address and corresponding port number instead of the hostname in the connection string.