You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having troubles to connect a node.js app to SQL Server. I don't know why the connection is refused since the user on SQL server have, I think, all the authorizations for the app.
Here is the error :
Error creating connection pool. ConnectionError: Failed to connect to localhost:[port] - connect ECONNREFUSED 127.0.0.1:[port]
at Connection. (C:\Users[...]\node_modules\mssql\lib\tedious.js:378:25)
at Object.onceWrapper (node:events:628:26)
at Connection.emit (node:events:513:28)
at Connection.socketError (C:\Users[...]\node_modules\mssql\node_modules\tedious\lib\connection.js:531:14)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ESOCKET'
Can someone help me with this please ?
Thanks alot
The text was updated successfully, but these errors were encountered:
Hi @Julia1205, Can you provide your connection configuration, so we have a bit more information to help you investigate this? I also did a quick search, people mentioned this could be caused by something else is actively running on the localhost:[port] that you are trying to connect to, which cause the ECONNREFUSED error.
By the way, have you try to connect to you server via SQL server management studio(SSMS)?
Hi @MichaelSun90, the database is on local and so is the app. The port is 1433 for the database. There is no app already running on this port. If I try to connect on SSMS with the user I created for the app, I have a 233 error but with windows authentication I have access to the database.
I don't have much knowledge about servers or network, which informations do you need ?
Sorry for my english and thanks for your help !
Hello,
I'm having troubles to connect a node.js app to SQL Server. I don't know why the connection is refused since the user on SQL server have, I think, all the authorizations for the app.
Here is the error :
Error creating connection pool. ConnectionError: Failed to connect to localhost:[port] - connect ECONNREFUSED 127.0.0.1:[port]
at Connection. (C:\Users[...]\node_modules\mssql\lib\tedious.js:378:25)
at Object.onceWrapper (node:events:628:26)
at Connection.emit (node:events:513:28)
at Connection.socketError (C:\Users[...]\node_modules\mssql\node_modules\tedious\lib\connection.js:531:14)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
code: 'ESOCKET'
Can someone help me with this please ?
Thanks alot
The text was updated successfully, but these errors were encountered: