redis-commander: Unable to connect with socket

If redis server is started with socket, redis-commander cannot connect and fails with RangeError.

Server:

$> redis-server --unixsocket /tmp/redis.sock --port 0

Redis-commander:

$> redis-commander -p 9000 --clear-config --redis-socket /tmp/redis.sock
...
net.js:1064
      throw new RangeError('"port" option should be >= 0 and < 65536: ' + port);
      ^

RangeError: "port" option should be >= 0 and < 65536: NaN
    at lookupAndConnect (net.js:1064:13)
    at Socket.connect (net.js:1037:5)
    at Object.connect (net.js:113:35)

It seems the socket path is not forwarded to the Redis client: https://github.com/NodeRedis/node_redis#rediscreateclient

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 20 (1 by maintainers)

Commits related to this issue

Most upvoted comments

Lucky me - no new bug to fix 😃

thanks - latest 10.x node dropped support for ‘sha’ algorithm it seems. Pushed update to select algorithm from list of available ones.

btw - as README states installation via yarn not supported - you will run into problems later on. Please use npm for installation.

./redis-commander.js --redis-socket /tmp/redis.sock
internal/crypto/hash.js:33
  this._handle = new _Hash(algorithm);
                 ^

Error: Digest method not supported
    at new Hash (internal/crypto/hash.js:33:18)
    at Object.createHash (crypto.js:101:10)
    at Object.createRedisClient (lib/util.js:320:23)
    at bin/redis-commander.js:370:26
    at startDefaultConnections (bin/redis-commander.js:416:10)
    at startAllConnections (bin/redis-commander.js:336:3)
    at Object.<anonymous> (bin/redis-commander.js:282:5)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)