node-redis-server icon indicating copy to clipboard operation
node-redis-server copied to clipboard

Fatal error (code -3)

Open RayyanTahir opened this issue 6 years ago • 4 comments

Hi, I provided the binary to redis server but on server.open callback i get a fatal error with code "-3" and with the following stack trace:

"Error: Fatal error\n    
at Function.parseData (c:\Projects\self-attendance\node_modules\redis-server\RedisServer.js:184:22)\n    at Socket.dataListener (c:\Projects\self-attendance\node_modules\redis-server\RedisServer.js:235:38)\n    at emitOne (events.js:121:20)\n    
at Socket.emit (events.js:211:7)\n    
at addChunk (_stream_readable.js:263:12)\n    
at readableAddChunk (_stream_readable.js:250:11)\n   
at Socket.Readable.push (_stream_readable.js:208:10)\n    
at Pipe.onread (net.js:597:20)"

If I run the redis-server.exe manually it works fine as below:

PS C:\Program Files\Redis> ./redis-server.exe
[16236] 12 Sep 12:30:18 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
[16236] 12 Sep 12:30:18 * Server started, Redis version 2.4.6
[16236] 12 Sep 12:30:18 # Open data file dump.rdb: No such file or directory
[16236] 12 Sep 12:30:18 * The server is now ready to accept connections on port 6379
[16236] 12 Sep 12:30:19 - 0 clients connected (0 slaves), 1179896 bytes in use
[16236] 12 Sep 12:30:25 - 0 clients connected (0 slaves), 1179896 bytes in use

I can't seem to figure out the cause of it. Any help will be appreciated. Thanks.

RayyanTahir avatar Sep 12 '18 07:09 RayyanTahir

What version of this module are you using?

BrandonZacharie avatar Sep 12 '18 10:09 BrandonZacharie

Hello, I am getting the exact same error.
Here is my code:

const RedisServer = require('redis-server');
 
// const port = 6379 // real redis port
const port = 5555;
 
const server = new RedisServer(port);
 
server.open((err) => {
  if (err === null) {
    console.log('Started Redis Server on port ' + port)
  } else {
	  throw err;
  }
});

I am using Redis Windows Port, with Redis server version 2.4.6 (26cdd13a:0) I have the latest release of the package from npm.

Techno11 avatar Mar 04 '19 21:03 Techno11

I have not tested with Windows. I'll take a look this weekend to see if I can reproduce that error.

BrandonZacharie avatar Mar 05 '19 02:03 BrandonZacharie

I switched to this windows port here https://github.com/MicrosoftArchive/redis and instead of getting the error, nothing prints, and the app exits on the first line. Same Code as above, nothing happens. No Error prints, nothing. I have added my redis install to PATH

Techno11 avatar Mar 05 '19 18:03 Techno11