简体   繁体   English

与 node-firebird 连接时出现错误“客户端和服务器上请求的有线加密级别不兼容”

[英]Error "Incompatible wire encryption levels requested on client and server" connecting with node-firebird

I'm trying to connect my script with my database in Firebird, but I have this error.我正在尝试将我的脚本与我在 Firebird 中的数据库连接起来,但我遇到了这个错误。

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.当您使用 Firebird 3 并且服务器或客户端需要有线加密,而另一端(通常是客户端)禁用了有线加密时,会出现此错误“客户端和服务器上请求的有线加密级别不兼容” In this case, you're using node-firebird, and it doesn't support wire encryption, and always reports it as disabled :在这种情况下,您使用的是 node-firebird,它不支持有线加密,并且始终将其报告为 disabled

blr.addBytes([CNCT_client_crypt, 4, WIRE_CRYPT_DISABLE, 0, 0, 0]); // WireCrypt = Disabled

On the other hand, the default configuration of Firebird 3 requires wire encryption.另一方面,Firebird 3 的默认配置需要有线加密。 In order to connect, you will need to relax this setting from its default of Required to Enabled (or Disabled , but that is less secure for applications that do support wire encryption).为了进行连接,您需要将此设置从默认的Required放松为Enabled (或Disabled ,但对于支持有线加密的应用程序来说,这不太安全)。

You do this by editing firebird.conf of your server, and modifying or adding:您可以通过编辑服务器的firebird.conf并修改或添加:

WireCrypt = Enabled

and then restarting your Firebird server.然后重新启动您的 Firebird 服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM