Skip to content

not able to connect to Microsoft Fabric #1563

@tchenazure

Description

@tchenazure

Software versions

  • Tedious: 16.2.0
  • SQL Server: Microsoft Fabric(12.0.2000.8)
  • Node.js:18.17.0

Additional Libraries Used and Versions

node-mssql: 9.1.1

Table schema

Connection configuration
const sqlConfig = { database: 'Root Data Warehouse', server: 'gextrl4zm6culiitwxjyp6ss5y-vh3r3oacuziunk6ffxzgvl2tay.datawarehouse.pbidedicated.windows.net', port: 1433, pool: { max: 10, min: 0, idleTimeoutMillis: 30000 }, options: { encrypt: true, // for azure trustServerCertificate: true// change to true for local dev / self-signed certs }, authentication: { type: 'azure-active-directory-service-principal-secret', options: { clientId: '74329c3d-6630-40f2-bbb6-ecb70659f0b2', clientSecret: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', tenantId: 'af382f31-6799-4585-a113-b5d387fa52ee' } }, };

Problem description

Got an error message when connecting to Microsoft Fabric
Uncaught ConnectionError Error: Connection lost - read ECONNRESET

Expected behavior

Microsoft Fabric should be connected by service principal, query should work after the connection is established.

Actual behavior

It doesn't connect at all.

Error message/stack trace

Uncaught ConnectionError Error: Connection lost - read ECONNRESET
at socketError (c:\test\fabric\node_modules\tedious\lib\connection.js:1410:26)
at (c:\test\fabric\node_modules\tedious\lib\connection.js:1160:16)
at emit (events:526:35)
at emitErrorNT (internal/streams/destroy:151:8)
at emitErrorCloseNT (internal/streams/destroy:116:3)
at processTicksAndRejections (internal/process/task_queues:82:21)
--- TickObject ---
at init (internal/inspector_async_hook:25:19)
at emitInitNative (internal/async_hooks:202:43)
at emitInitScript (internal/async_hooks:504:3)
at nextTick (internal/process/task_queues:132:5)
at onDestroy (internal/streams/destroy:103:15)
at Socket._destroy (net:812:5)
at _destroy (internal/streams/destroy:109:10)
at destroy (internal/streams/destroy:71:5)
at onStreamRead (internal/stream_base_commons:217:12)
at callbackTrampoline (internal/async_hooks:130:17)
--- TCPWRAP ---
at init (internal/inspector_async_hook:25:19)
at emitInitNative (internal/async_hooks:202:43)
at Socket.connect (net:1176:7)
at connect (net:244:17)
at (c:\test\fabric\node_modules\tedious\lib\connector.js:102:37)
at connectInSequence (c:\test\fabric\node_modules\tedious\lib\connector.js:101:20)
--- await ---
at connectOnPort (c:\test\fabric\node_modules\tedious\lib\connection.js:1157:5)
at initialiseConnection (c:\test\fabric\node_modules\tedious\lib\connection.js:1072:19)
at enter (c:\test\fabric\node_modules\tedious\lib\connection.js:2364:12)
at transitionTo (c:\test\fabric\node_modules\tedious\lib\connection.js:1365:24)
at reconnect (c:\test\fabric\node_modules\tedious\lib\connection.js:2468:14)
at dispatchEvent (c:\test\fabric\node_modules\tedious\lib\connection.js:1391:15)
at socketClose (c:\test\fabric\node_modules\tedious\lib\connection.js:1439:12)
at (c:\test\fabric\node_modules\tedious\lib\connection.js:1163:16)
at emit (events:526:35)
at (net:323:12)
at callbackTrampoline (internal/async_hooks:130:17)
--- TCPWRAP ---
at init (internal/inspector_async_hook:25:19)
at emitInitNative (internal/async_hooks:202:43)
at Socket.connect (net:1176:7)
at connect (net:244:17)
at (c:\test\fabric\node_modules\tedious\lib\connector.js:102:37)
at connectInSequence (c:\test\fabric\node_modules\tedious\lib\connector.js:101:20)
--- await ---
at connectOnPort (c:\test\fabric\node_modules\tedious\lib\connection.js:1157:5)
at initialiseConnection (c:\test\fabric\node_modules\tedious\lib\connection.js:1072:19)
at enter (c:\test\fabric\node_modules\tedious\lib\connection.js:2364:12)
at transitionTo (c:\test\fabric\node_modules\tedious\lib\connection.js:1365:24)
at connect (c:\test\fabric\node_modules\tedious\lib\connection.js:1035:10)
at (c:\test\fabric\ted.js:30:12)
at Module._compile (internal/modules/cjs/loader:1256:14)
at Module._extensions..js (internal/modules/cjs/loader:1310:10)
at Module.load (internal/modules/cjs/loader:1119:32)
at Module._load (internal/modules/cjs/loader:960:12)
at executeUserEntryPoint (internal/modules/run_main:81:12)
at (internal/main/run_main_module:23:47)
Any other details that can be helpful

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