0

I'm trying to connect to a Firebird server with Node.js "node-firebird", but I always get the error

Incompatible wire encryption levels requested on client and server at doCallback

The problem is that I'm just trying to connect on a server that a company gave me the data to connect, however I don't have access to change the wire crypt in this Firebird server, neither they know how to do that.

Could someone give me the leads to show them what to do and make it works? Or if you have any suggestions on how to change on my JS any data to be able to connect.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Kevin
  • 5
  • 4

2 Answers2

0

In firebird.conf try to add WireCrypt = Enabled

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
0

How to disable the wirecrypt setting of Firebird is documented in the node-firebird documentation under "Firebird 3.0 Support" (though personally, I would recommend changing WireCrypt to Enabled instead of Disabled (the default is Required), so clients that do support wire protocol encryption can still encrypt their connection.

In short:

  1. Open firebird.conf
  2. See if WireCrypt is already configured, and add or modify it to WireCrypt = Enabled (lines prefixed with # are comments)
  3. Restart Firebird

Be careful with applying the other settings as suggested in the node-firebird documentation, as that might cause problems for other applications connecting to the Firebird server. For example, instead of the suggested UserManager = Legacy_UserManager, use UserManager = Srp, Legacy_UserManager.

Alternatively, switch to another Node.js library for Firebird. The ones using fbclient/libfbclient will support encryption if you're using a Firebird 3.0 or higher client library. For example, node-firebird-driver-native. Given the documentation of the library is lacking, maybe you'll find this gist helpful.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • Hello, Mark! Thanks for the answer! Is this firebird.conf a configuration that I can change on the server? This Server is hosted on another company, so I can just ask the IT from this company to change this firebird.conf? This "node-firebird-driver-native", I couldn't find how to connect on it... – Kevin Mar 24 '22 at 18:41
  • `firebird.conf` file is the configuration of Firebird server, on Windows it is in the installation directory of the Firebird server. On Linux it depends on the distribution and the Firebird package you used. – Mark Rotteveel Mar 24 '22 at 19:34
  • OK, I'm going to give it a try, I'm in th meanwhile trying to make `node-firebird-driver-native` to work, but that's being kinda complicated, I can't manage to connect to the database... Would you have any hints on it? – Kevin Mar 24 '22 at 20:01
  • Unfortunately not, I don't program in Node.js myself, but looking at the documentation, I can understand why you're having problems using it, it doesn't explain things at all. – Mark Rotteveel Mar 24 '22 at 20:06
  • @Kevin Maybe this gist can help you: https://gist.github.com/mariuz/87266d930917114c276f64985a054849 – Mark Rotteveel Mar 24 '22 at 20:14
  • Omg, it seems that it's working, I'm just going to test a little bit more.. if it works I'll mark it as correct! Thanks a lot – Kevin Mar 25 '22 at 16:57
  • Mark, that worked perfectly! How do I select it as an answer? The link you said in the comments? I'm just facing one single error, on my electron, when I have this firebird funciton being called, I face the error "DevTools was diconnect from this page" – Kevin Mar 28 '22 at 12:23
  • @Kevin I added the link into my answer. You can accept it by ticking the checkmark in front of my answer. – Mark Rotteveel Mar 28 '22 at 12:24