Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: DB connection #318

Open
khalidMhd opened this issue Nov 22, 2023 · 1 comment
Open

Error: DB connection #318

khalidMhd opened this issue Nov 22, 2023 · 1 comment

Comments

@khalidMhd
Copy link

I am facing these two error
Error: Incompatible wire encryption levels requested on client and server at doCallback
Error2: Incompatible wire encryption levels requested on client and server

+++++++++++++ code review ++++++++++++++

const firebird = require('node-firebird');

const options = {
host: '127.0.0.1',
port: 3050,
database: 'C:/Users/khalid.d/Documents/MYDB.fdb',
user: 'SYSDBA',
password: 'root',
lowercase_keys: false,
pageSize: 4096,
role: null,
// charset: 'WIN1253',
// encrypt: 'AES256',
// algorithm: 'AES256',
};

exports.executeQuery = async (query, params = []) => {
return new Promise((resolve, reject) => {
firebird.attach(options, (err, db) => {
if (err) {
console.error('Error connecting to the Firebird database:', err);
reject(err);
return;
}
console.log('Connected to the Firebird database.');

  db.query(query, params, (err, result) => {
    if (err) {
      console.error('Error executing query:', err);
      reject(err);
    } else {
      console.log('Query executed successfully.');
      resolve(result);
    }

    db.detach();
  });
});

});
};

@maratth
Copy link
Contributor

maratth commented Jan 4, 2024

Hi,

It's because your server isn't configure to accept connection without WireCrypt because node-firebird son't support this.

See this section in readme to configure your firebird.conf.

I think actually node-firebird support Srp authentification also you can try to only configure WyreCrypt = Enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants