Error starting Juggernaut - node.js

When I try to start Juggernaut I get this error :
1 Apr 20:21:01 - socket.io ready - accepting connections
node_redis: no callback to send error: ERR unknown command 'subscribe'
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: ERR unknown command 'subscribe'
at RedisReplyParser.<anonymous> (/usr/local/lib/node/.npm/redis/0.5.9/packag
e/index.js:84:27)
at RedisReplyParser.emit (events.js:64:17)
at RedisReplyParser.send_error (/usr/local/lib/node/.npm/redis/0.5.9/package
/lib/parser/javascript.js:251:14)
at RedisReplyParser.execute (/usr/local/lib/node/.npm/redis/0.5.9/package/li
b/parser/javascript.js:110:22)
at RedisClient.on_data (/usr/local/lib/node/.npm/redis/0.5.9/package/index.j
s:328:27)
at Socket.<anonymous> (/usr/local/lib/node/.npm/redis/0.5.9/package/index.js
:99:14)
at Socket.emit (events.js:64:17)
at Socket._onReadable (net.js:672:14)
at IOWatcher.onReadable [as callback] (net.js:177:10)
I didnt find anything to help me!

Try upgrading Redis.
It happened to me, and that's what solved it. I'm using Ubuntu, and the one in the package manager isn't an updated version. It needs to be at least version 2.2.1.
Source: From one of the issues posted on the juggernaut github repo.
EDIT: Upon closer inspection, it looks like you were the one who posted the issue on the github repo. I'll just leave this answer here just in case anyone else has the same problem.

Related

Problems/errors with Kurento Node.JS examples

I have been trying to write a Node.JS server/client based on the Kurento Media Server, WebRTC conference example. I couldn't get my code to work right, so I thought I would start off by just taking the original example code, setting that up on my dev computer, watching it work, and then slowly making small changes until I got to the way I needed the software to work.
The problem is that I can't get the "webrtc-video-conference-tutorial-kurento" (or the "kurento-one2many-call") example code to work, even if it's completely unmodified. I have tried setting up the current version of Kurento on 2 separate development systems (Ubuntu 18, and Windows 10). Both of them encounter the same errors (code: 40401... Ice Candidate Error).
The exact error text that I am getting is listed below. I would be very greateful for any help you can offer.
Trace: Error: Error adding candidate
at C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-client\lib\KurentoClient.js:361:24
at Object.dispatchCallback [as callback] (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:546:9)
at processResponse (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:667:15)
at RpcBuilder.decode (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:723:5)
at Stream.transportMessage (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:208:10)
at Stream.emit (events.js:315:20)
at Stream.EventEmitter.emit (domain.js:467:12)
at drain (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\through\index.js:36:16)
at Stream.stream.queue.stream.push (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\through\index.js:45:5)
at WebsocketStream.onMessage (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\websocket-stream\index.js:45:15) {
code: 40401,
data: { type: 'ICE_ADD_CANDIDATE_ERROR' }
}
at WebRtcEndpoint.noop (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-client-elements\lib\WebRtcEndpoint.js:35:22)
at callback2 (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\promisecallback\index.js:27:25)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Message received: candidate
Trace: Error: Error adding candidate
at C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-client\lib\KurentoClient.js:361:24
at Object.dispatchCallback [as callback] (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:546:9)
at processResponse (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:667:15)
at RpcBuilder.decode (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:723:5)
at Stream.transportMessage (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-jsonrpc\lib\index.js:208:10)
at Stream.emit (events.js:315:20)
at Stream.EventEmitter.emit (domain.js:467:12)
at drain (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\through\index.js:36:16)
at Stream.stream.queue.stream.push (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\through\index.js:45:5)
at WebsocketStream.onMessage (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\websocket-stream\index.js:45:15) {
code: 40401,
data: { type: 'ICE_ADD_CANDIDATE_ERROR' }
}
at WebRtcEndpoint.noop (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\kurento-client-elements\lib\WebRtcEndpoint.js:35:22)
at callback2 (C:\Dev\X-Platform\WebDev\webrtc-video-conference-example\src\node_modules\promisecallback\index.js:27:25)
at processTicksAndRejections (internal/process/task_queues.js:93:5)

How to troubleshoot ECONNREFUSED error?

I'm trying to get the d3.js demo given here to work.
I'm following along the instructions in the README.md file. I get the npm install step to work, but the next step, node server, fails:
% node server
Master pid 16196
16197 listening. Go to: http://localhost:3030/
events.js:72
throw er; // Unhandled 'error' event
^
Error: Redis connection to 127.0.0.1:6379 failed - connect ECONNREFUSED
at RedisClient.on_error (/Users/yrstruly/tmp/derby-barchart/node_modules/redis/index.js:189:24)
at Socket.<anonymous> (/Users/yrstruly/tmp/derby-barchart/node_modules/redis/index.js:95:14)
at Socket.EventEmitter.emit (events.js:95:17)
at net.js:440:14
at process._tickCallback (node.js:415:13)
It looks like the code is expecting to have some process listening to port 6379, but the README says nothing about this.
I'm quite unfamiliar with most of the software used by this demo. In particular, I know very little about node.js, derby, and redis. Therefore, I'm following the steps in the README rather blindly. Any help with troubleshooting this error would be appreciated.

"Unhandled stream error in pipe" from Node.js

My app: Node.js, Express, some middleware including connect-assets and express.static.
All running on local machine (OSX, Node 0.8) in development mode (thus express.static).
Probably important details: I recently made the whole app work through HTTPS (with redirect from HTTP when necessary) and while developing I use self-signe certificate (enabled in my browser, of course).
Now, the app is often failing wit stack traces like that:
(1)
stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: write EPIPE
at errnoException (net.js:769:11)
at Object.afterWrite (net.js:593:19)
(2)
stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: socket hang up
at SecurePair.error (tls.js:948:15)
at EncryptedStream.CryptoStream._done (tls.js:432:17)
at EncryptedStream.CryptoStream._pull (tls.js:577:12)
at SecurePair.cycle (tls.js:866:20)
at EncryptedStream.CryptoStream.end (tls.js:405:13)
at Socket.onend (stream.js:66:10)
at Socket.EventEmitter.emit (events.js:126:20)
at TCP.onread (net.js:417:51)
(3)
stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: socket hang up
at createHangUpError (http.js:1264:15)
at CleartextStream.socketCloseListener (http.js:1315:23)
at CleartextStream.EventEmitter.emit (events.js:126:20)
at SecurePair.destroy (tls.js:938:22)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Important: this happens often but not every time, so I assume this not to be a bug in my code.
I found this can be due to express.static and open files limit so I ran ulimit -n 10000 - with no effect, unfortunately.
Any ideas? This starts to be extremely frustrating.
OK, looks like I found the answer (at least I found a similar problem mentioned, tried their fix and it stopped falling):
the express.static middleware must be the last in the chain

Node.js and Sphinx concurrent connection issue on Server

I have been using Sphinx Technology for site and implemented in php and Node.js. Using php and Sphinx, so far i didn't get any issues. But with Node.js and Sphinx, i got the following issues rapidly,
1. Error: Error: Connection is opening in OnConnect
at Socket.<anonymous> (/usr/local/lib/node_modules/limestone/limestone.js:217:26)
at Socket.emit (events.js:64:17)
at Object.afterConnect [as oncomplete] (net.js:614:10)
2. node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: write EPIPE
at errnoException (net.js:640:11)
at Object.afterWrite [as oncomplete] (net.js:478:18)
I have been using limestone node.js module as middleware between Node.js and Sphinx server. My assumption is that above error is occured due to the concurrent connection request to Sphinx. If so, then how to avoid the concurrent sphinx request.
Please suggest on the same.
you can try using sphinxql via one of mysql libraries available for sphinx.

Node.js redis "unknown command 'hset'"?

I'm new to redis, and I'm trying out various examples. However, it doesn't seem to work:
root#localhost:~# node lol.js
Reply: OK
Error: Error: Error: ERR unknown command 'hset'
Error: Error: Error: ERR unknown command 'hset'
/root/node_modules/redis/index.js:468
throw callback_err;
^
TypeError: Cannot read property 'length' of undefined
at Command.callback (/root/lol.js:15:28)
at RedisClient.return_error (/root/node_modules/redis/index.js:464:25)
at HiredisReplyParser.<anonymous> (/root/node_modules/redis/index.js:253:14)
at HiredisReplyParser.emit (events.js:67:17)
at HiredisReplyParser.execute (/root/node_modules/redis/lib/parser/hiredis.js:41:18)
at RedisClient.on_data (/root/node_modules/redis/index.js:440:27)
at Socket.<anonymous> (/root/node_modules/redis/index.js:70:14)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:367:14)
I'm using one of the example scripts on the github page for node-redis. I'm on Debian Squeeze.
The main problem is not with your code (of course it could recognize the error sent by the server) or with the node redis module but with the Redis server.
You need to upgrade it to a newer version, HSET command is supported since version 2.0.0.

Resources