I'm trying to connect my script with my database in Firebird, but I have this error.
This is my code, I'm trying to connect to my local database:
const Firebird = require('node-firebird');
var options = {};
options.host = '127.0.0.1';
options.port = 3050;
options.database = 'C:\\DATABASES\\PRUEBA.FDB';
options.user = 'SYSDBA';
options.password = 'password';
options.lowercase_keys = false; // set to true to lowercase keys
options.role = null; // default
options.pageSize = 4096;
Firebird.attach(options, (err, db) => {
if (err) console.log(err);
db.query('select * from temp', (err, response) => {
if (err) console.log(err);
console.log(response);
})
})
The error is this, but I don't know what happens:
Incompatible wire encryption levels requested on client and server
This error "Incompatible wire encryption levels requested on client and server" occurs when you're using Firebird 3 and either the server or the client requires wire encryption, and the other side (usually the client) has wire encryption disabled. In this case, you're using node-firebird, and it doesn't support wire encryption, and always reports it as disabled:
On the other hand, the default configuration of Firebird 3 requires wire encryption. In order to connect, you will need to relax this setting from its default of
RequiredtoEnabled(orDisabled, but that is less secure for applications that do support wire encryption).You do this by editing
firebird.confof your server, and modifying or adding:and then restarting your Firebird server.
In case you're using Firebird 4.0 or higher, also check my answer on Error: Incompatible wire encryption levels requested on client and server - trying to connect node server with Firebird 4.0.