zeromq / zeromq.js

:zap: Node.js bindings to the ØMQ library
http://zeromq.github.io/zeromq.js/
MIT License
1.48k stars 210 forks source link

Emergency exit on certain server #484

Open em92 opened 3 years ago

em92 commented 3 years ago

Describe the bug When connecting and subscribing on certain server (see below), node crashes with emergency exit.

Reproducing Run this script:

var zmq = require("zeromq");
var sub = zmq.socket("sub");
sub.sap_domain = "stats";
sub.plain_username = "stats";
sub.plain_password = "Bossebildoktorn01!";
sub.connect("tcp://155.4.204.239:29960");
sub.subscribe("");
setTimeout(function() {
  console.log("ok. looks like everything is ok");
}, 10000);

Output:

Protocol not available (src/tcp_connecter.cpp:393)
Аварийный останов

Last line from output is emergency exit from Russian.

I am not controlling that server on 155.4.204.239

Expected behavior No emergency exit

Tested on

PredatH0r commented 3 years ago

Works fine under Windows 10 with node 12.16.2 and zeromq 5.2.8

Does not work under Debian 9 with node 12.22.6 and zeromq 5.2.8 (nor 5.1.10):

Protocol not available (src/tcp_connecter.cpp:393)
node: symbol lookup error: /home/xonstat/xonstat/feeder/node_modules/zeromq/build/Release/zmq.node: undefined symbol: _Ux86_64_getcontext

I tried installing the zeromq node module with both "npm install zeromq" and "npm install zeromq --zmq-external" and libzmq3-dev 4.3.4-0 installed. Only the error message and line changes a bit.