Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
EmSSoH-it opened this issue Nov 27, 2024 · 2 comments

Comments

@EmSSoH-it
Copy link

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.

@AlejandroFerrera
Copy link

AlejandroFerrera commented Nov 27, 2024

Hello @EmSSoH-it , are you currently able to connect to Microsoft Fabric after applying the fix from #1668? My setup was working perfectly until 23-11-2024, but since then, it has been throwing a "socket hang up" error again.

@EmSSoH-it
Copy link
Author

@AlejandroFerrera I tested the fabric connection again now after you mentioned it, and no I cant connect anymore either, also getting socket hang up again. I have not update my packages since so I guess it's on Microsoft's side. I guess a new solution has to found again.....

Regardless the managed instance issue stands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants