I filled credential fields with my server information but it is returning a timeout error when i try to connect, is the filling incorrect?
Server: 192.168.1.7
Database: DatabaseName
user: sql login
password: sql password
port: 1433
domain: HPMM <<---- SELECT DEFAULT_DOMAIN()[DomainName];
That credential return me this error:
Failed to connect to 192.168.1.7:1433 in 150000ms
TLS on/off Both were tried and failed
Ignore SSL on/off Both were tried and failed
TDS version: 7_3_A (Sqlserver 2008)
It attempts to execute a JavaScript node. But ““Problem in node ‘Code in JavaScript1‘ Module ‘tedious’ is disallowed [line 3]””
const { Connection } = require('tedious');
const config = {
server: '192.168.1.7',
authentication: {
type: 'default',
options: {
userName: 'sa',
password: 'MyPass'
}
},
options: {
database: 'db',
port: 1433,
encrypt: false,
connectTimeout: 15000
}
};
const connection = new Connection(config);
connection.on('connect', (err) => {
if (err) {
console.error('Error detallado:', err);
} else {
console.log('Conexión exitosa!');
}
connection.close();
});
connection.on('error', (err) => {
console.error('Error de conexión:', err);
});
connection.connect();
If I try to connect from the container, I can, the problem arises when I enable TLS. So the problem lies there.
docker exec -it n8n sh
cat > test.js << 'EOF'
const { Connection } = require('tedious');
const config = {
server: '192.168.1.7',
authentication: {
type: 'default',
options: {
userName: 'sa',
password: 'pass'
}
},
options: {
database: 'db',
port: 1433,
encrypt: false,
connectTimeout: 15000
}
};
const connection = new Connection(config);
connection.on('connect', (err) => {
if (err) {
console.error('❌ Error detallado:', err);
} else {
console.log('✅ Conexión exitosa!');
}
connection.close();
});
connection.on('error', (err) => {
console.error('❌ Error de conexión:', err);
});
connection.connect();
EOF
node test.js
But when I connect through the node with TLS disabled, the error still occurs.
Share the output returned by the last node
Failed to connect to \192.168.1.7 in 15000ms
Information on your n8n setup
-
n8n version:
2.9.4 (Self Hosted) -
Running n8n via: Docker
-
Operating system of DB: Window server 2008