私はノードで作業しており、このエラーが発生していますが、これは時々しか発生しません。しかし、この時間は永続的です。
私の設定:
var mssql = require("mssql");
var config =
{
user: "user",
password: "pass",
server: "devsv",
database: "db"
}
var db = new mssql.Connection(config);
db.connect(function(err)
{
console.log(err);
});
module.exports = db;
エラー:
{ ConnectionError: Failed to connect to devsv:1433 - getaddrinfo ENOTFOUND devsv devsv:1433
at Connection.<anonymous> (/Users/user/Projects/p1/node_modules/mssql/lib/tedious.js:378:25)
at Object.onceWrapper (events.js:290:19)
at emitOne (events.js:96:13)
at Connection.emit (events.js:188:7)
at Connection.socketError (/Users/user/Projects/p1/node_modules/tedious/lib/connection.js:531:14)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at connectErrorNT (net.js:1025:8)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)
name: 'ConnectionError',
message: 'Failed to connect to devsv:1433 - getaddrinfo ENOTFOUND devsv devsv:1433',
code: 'ESOCKET' }
ありがとうございました。