-
Notifications
You must be signed in to change notification settings - Fork 439
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
not able to connect to Microsoft Fabric #1563
Comments
Hi @tchenazure, on thing that I noticed is you may have posted your connection credential in the description. If it is for sandbox, then it should be fine. connection.connect((err) => {
if (err) {
console.log(err);
}
});
connection. also, the error returned maybe a aggregate, and you can output it as mentioned here under section : connection.connect(callback). can you give this a try see if you can get a bit more detail on the error, so we can work from there. |
Hi @MichaelSun90 , I got this error: |
Hi @tchenazure, have you tried the aggregate error option that I mentioned in the pervious message? if that does not return any additional errors underneath that, then you can enable our debug options on tedious side, so it can log more details on the error. Here is an example for enable debugging from tedious side: var config = {
...
options: {
...
// Add this to your configuration file. You can pick and choose which ones to enable.
debug: {
packet: true,
data: true,
payload: true,
token: true
}
},
...
}; Then add this event listener to output the debug messages: connection.on('debug', (msg) => {
console.log(msg);
}); Then can you share the log here, so we can have a bit more information to work with. Thanks! |
I am facing a similar issue with connection to Microsoft fabric.
My node version is : v18.16.0 My code :
The error I am getting : Connection lost - socket hang up |
some more debug messages :
|
Hi @SwadX, Thanks for the detail log. Will look into this a bit more, see if we can figure out why it behave like this. |
I also experience the Error:
|
Hi @SanderBlom, we did some investigation and unfortunately that tedious does not currently support connection to Microsoft Fabric DW. Microsoft Fabric DW has a bit more restricted way for handling incoming connection compare to how tedious currently handles it internally. The team will have a discussion and see when we will have the bandwidth to get this working. |
From the authentication side of things, the new PR at #1624 should add authentication support as you can roll any authentication you need from the MSFT side of things. Protocol support is a different thing... |
Ji @MichaelSun90, I am just wondering if you have discussed when (or if) this issue will be addressed? My team is currently in the process of adding Fabric DWH to our nodejs application. We are kind of under pressure by our customers and we need to establish a timeline for this added feature. |
It's on the team's radar to consider looking at during the next 6 months, but there is no timeline to share at this time. EDIT: By "team", I mean the MS team that are contributors to this project. |
Halfway through those next 6 months, are there any updates on timelines? |
I would really appreciate if we could get an answer when this could be completed. Without any update and the upcoming deadline of our MS Fabric project we are forced to look at a different solution. |
This would also help our team to make progress in migrating all our reporting capabilities to Fabric. |
Unfortunately, there is still no timeline from my team as far as contributing this work. I'll bubble it up to some others in case there is someone else who can contribute this. |
@MichaelSun90 Would you be able to share details about the difference between how Fabric DW handles incoming connections and what tedious currently does? Using tedious would be the preferred solution for integrating Fabric into our nodejs application, so we would be interested in contributing the fix if it seems feasible. |
I was able to connect to Fabric locally using these changes. Would appreciate an owner of the repo taking a look - thanks! |
I also tested locally and can confirm that this solves the issue in this use case. |
Hello everyone. At work I had the opportunity to register a ticket to Microsoft about this problem. They officially informed me that it is not possible to access Fabric DB from Node JS. |
Hello @TPVallancourt, I was using your fix, and it was working perfectly. However, today it started throwing the socket hang up error again. I suspect it might be related to a recent Microsoft Fabric update. Have you experienced this issue as well? @pdmangel2, have you encountered this too? |
Indeed, I did a quick test and got a ESOCKET ConnectionError |
Software versions
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
The text was updated successfully, but these errors were encountered: