Skip to content

Unable to connect to Azure Managed Instance via Vnet-Local endpoint with Service Principal auth, getting: "ConnectionError: failed to connect to <server>:<port> in 15000ms" #1674

@EmSSoH-it

Description

@EmSSoH-it

Software versions

SQL Server: Azure Managed Instance
Node.js: 18 LTS
Tedious: 18.6.1
node-MSSQL: 11.0.1

Connection configuration
this.config = { port: DB_PORT, server: DB_HOST, database: DB_DB, requestTimeout: requestTimeout, authentication: { type: azure-active-directory-service-principal-secret, options: { clientId: SP_Client, tenantId: SP_Tenant, clientSecret: SP_Secret } }, options: { encrypt: true, trustServerCertificate: true, abortTransactionOnError: true } };

Problem description
When trying to connect to Managed Instance via the Vnet-Local endpoint, using service principal authentication, the connection times out at the given requestTimeout e.g (15000ms by default)

Note both public endpoint and Private endpoint works as expected with service principal. as well as SQL authentication for all 3.

Expected behavior
Connects successfully without timing out.

Actual behavior
Times out

Error message/stack trace
"ConnectionError: failed to connect to server : port in 15000ms"

Any other details that can be helpful
our current setup also works flawlessly for Azure sql DB and fabric using the edits from PR: #1668

Managed instance was tested with and without PR: #1668, same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions