首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >与node-firebird连接时出现错误“请求的客户端和服务器上的有线加密级别不兼容”

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

Stack Overflow用户
提问于 2021-04-30 00:23:36
回答 1查看 150关注 0票数 0

我试图将我的脚本与Firebird中的数据库连接起来,但是我遇到了这个错误。

这是我的代码,我正在尝试连接我的本地数据库:

代码语言:javascript
复制
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);
  })
})

错误是这样的,但我不知道会发生什么:

代码语言:javascript
复制
Incompatible wire encryption levels requested on client and server
EN

回答 1

Stack Overflow用户

发布于 2021-04-30 00:53:23

当你使用Firebird 3,服务器或客户端都需要有线加密,而另一端(通常是客户端)禁用了有线加密时,就会出现这个错误“请求客户端和服务器的有线加密级别不兼容”。在本例中,您使用的是node-firebird,并且它不支持有线加密,并且总是reports it as disabled

代码语言:javascript
复制
blr.addBytes([CNCT_client_crypt, 4, WIRE_CRYPT_DISABLE, 0, 0, 0]); // WireCrypt = Disabled

另一方面,Firebird 3的默认配置需要有线加密。为了进行连接,您需要将此设置从默认的Required放宽为Enabled (或Disabled,但这对于支持有线加密的应用程序的安全性较低)。

为此,您可以编辑服务器的firebird.conf,并修改或添加:

代码语言:javascript
复制
WireCrypt = Enabled

然后重新启动Firebird服务器。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67321379

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档