loopback-example-database icon indicating copy to clipboard operation
loopback-example-database copied to clipboard

MSSQL connection

Open oakley808 opened this issue 12 years ago • 3 comments

Does the MSSQL example truly work, or is it theoretical? (can one actually connect to mssql.strongloop.com:1433 ?)

I got the following error when trying the discovery app:

[~/Desktop/Temp/loopback-example-database/server on mssql]$ DEBUG=loopback:datasource node discover.js
  loopback:datasource Settings: {"name":"db","debug":true} +0ms
  loopback:datasource Settings: {"name":"accountDB","connector":"mssql","host":"mssql.strongloop.com","port":1433,"database":"demo","username":"demo","password":"L00pBack","debug":true} +2ms
Connection fails:  { name: 'ConnectionError',
  message: 'Failed to connect to mssql.strongloop.com:1433 - connect ECONNREFUSED',
  code: 'ESOCKET' } 
It will be retried for the next request.

ConnectionError: Failed to connect to mssql.strongloop.com:1433 - connect ECONNREFUSED
    at Connection.<anonymous> (/Users/moakley/Desktop/Temp/loopback-example-database/node_modules/loopback-connector-mssql/node_modules/mssql/lib/tedious.js:320:25)
    at Connection.g (events.js:180:16)
    at Connection.EventEmitter.emit (events.js:95:17)
    at Connection.socketError (/Users/moakley/Desktop/Temp/loopback-example-database/node_modules/loopback-connector-mssql/node_modules/mssql/node_modules/tedious/lib/connection.js:732:12)
    at Socket.<anonymous> (/Users/moakley/Desktop/Temp/loopback-example-database/node_modules/loopback-connector-mssql/node_modules/mssql/node_modules/tedious/lib/connection.js:3:59)
    at Socket.EventEmitter.emit (events.js:95:17)
    at net.js:440:14
    at process._tickCallback (node.js:415:13)

oakley808 avatar Sep 30 '14 17:09 oakley808

I just tried and it works for me.

raymondfeng avatar Sep 30 '14 17:09 raymondfeng

Hmmm... thanks for verifying. Perhaps my corporate firewall is interfering. I will try again later from a different network.

oakley808 avatar Sep 30 '14 19:09 oakley808

Yep. Looks like a firewall issue for me. Thank you.

oakley808 avatar Oct 01 '14 01:10 oakley808