Giter Site home page Giter Site logo

joeferner / redis-commander Goto Github PK

View Code? Open in Web Editor NEW
3.5K 3.5K 455.0 5.21 MB

Redis management tool written in node.js

Home Page: http://joeferner.github.io/redis-commander/

License: MIT License

JavaScript 72.56% CSS 2.35% Shell 4.99% Dockerfile 0.55% Mustache 0.70% EJS 18.54% Smarty 0.30%

redis-commander's Introduction

Redis Commander

Redis web management tool written in node.js

GUI image

Install and Run

$ npm install -g redis-commander
$ redis-commander

Installation via yarn is currently not supported. Please use npm as package manager.

Or run Redis Commander as Docker image ghcr.io/joeferner/redis-commander rediscommander/redis-commander (instructions see below).

Multi-Arch images built are available at ghcr.io/joeferner/redis-commander:latest. (https://github.com/joeferner/redis-commander/pkgs/container/redis-commander)

Remark: new version are not published to Dockerhub right now.

Features

Web-UI to display and edit data within multiple different Redis servers. It can connect to Redis standalone server, Sentinel based setups and Redis Cluster.

It has support for the following data types to view, add, update and delete data:

  • Strings
  • Lists
  • Sets
  • Sorted Set
  • Streams (Basic support based on HFXBus project from https://github.com/exocet-engineering/hfx-bus, only view/add/delete data)
  • ReJSON documents (Basic support, only for viewing values of ReJSON type keys)

Usage

$ redis-commander --help
Options:
  --version                            Show version number                                                                                      [boolean]
  --redis-port                         The port to find redis on.                                                                                [number]
  --redis-host                         The host to find redis on.                                                                                [string]
  --redis-socket                       The unix-socket to find redis on.                                                                         [string]
  --redis-username                     The redis username.                                                                                       [string]
  --redis-password                     The redis password.                                                                                       [string]
  --redis-db                           The redis database.                                                                                       [number]
  --redis-optional                     Set to true if no permanent auto-reconnect shall be done if server is down.             [boolean] [default: false]
  --sentinel-port                      The port to find sentinel on.                                                                             [number]
  --sentinel-host                      The host to find sentinel on.                                                                             [string]
  --sentinels                          Comma separated list of sentinels with host:port.                                                         [string]
  --sentinel-name                      The sentinel group name to use.                                                                           [string]
  --sentinel-username                  The sentinel username to use.                                                                             [string]
  --sentinel-password                  The sentinel password to use.                                                                             [string]
  --clusters                           Comma separated list of redis cluster server with host:port.                                              [string]
  --is-cluster                         Flag to use parameter from redis-host and redis-port as Redis cluster member            [boolean] [default: false]
  --cluster-no-tls-validation          Flag to disable tls host name validation within cluster setups (needed for AWS)         [boolean] [default: false]
  --redis-tls                          Use TLS for connection to redis server. Required for TLS connections.                   [boolean] [default: false]
  --redis-tls-ca-cert                  Use PEM-style CA certificate key for connection to redis server. Requires "redis-tls=true"                [string]
  --redis-tls-ca-cert-file             File path to PEM-style CA certificate key for connection to redis server. Requires "redis-tls=true", Overrides
                                       "redis-tls-ca-cert" if set too.                                                                           [string]
  --redis-tls-cert                     Use PEM-style public key for connection to redis server. Requires "redis-tls=true"                        [string]
  --redis-tls-cert-file                File path to PEM-style public key for connection to redis server. Requires "redis-tls=true", Overrides
                                       "redis-tls-cert" if set too.                                                                              [string]
  --redis-tls-key                      Use PEM-style private key for connection to redis server. Requires "redis-tls=true"                       [string]
  --redis-tls-key-file                 File path PEM-style private key for connection to redis server. Requires "redis-tls=true", Overrides
                                       "redis-tls-key" if set too.                                                                               [string]
  --redis-tls-server-name              Server name to confirm client connection. Server name for the SNI (Server Name Indication) TLS extension. Requires
                                       "redis-tls=true"                                                                                          [string]
  --sentinel-tls                       Enable TLS for sentinel mode. If no special "sentinel-tls-*" option is defined the redis TLS settings are
                                       reused ("redis-tls-*"). Required for TLS sentinel connections.                          [boolean] [default: false]
  --sentinel-tls-ca-cert               Use PEM-style CA certificate key for connection to sentinel. Requires "sentinel-tls=true"                 [string]
  --sentinel-tls-ca-cert-file          File path to PEM-style CA certificate key for connection to sentinel. Requires "sentinel-tls=true", Overrides
                                       "sentinel-tls-ca-cert" if set too.                                                                        [string]
  --sentinel-tls-cert                  Use PEM-style public key for connection to sentinel. Requires "sentinel-tls=true"                         [string]
  --sentinel-tls-cert-file             File path to PEM-style public key for connection to sentinel. Requires "sentinel-tls=true", Overrides
                                       "sentinel-tls-cert" if set too.                                                                           [string]
  --sentinel-tls-key                   Use PEM-style private key for connection to sentinel. Requires "sentinel-tls=true"                        [string]
  --sentinel-tls-key-file              File path to PEM-style private key for connection to sentinel. Requires "sentinel-tls=true", Overrides
                                       "sentinel-tls-key" if set too.                                                                            [string]
  --sentinel-tls-server-name           Server name to confirm client connection. Server name for the SNI (Server Name Indication) TLS extension. Requires
                                       "sentinel-tls=true"                                                                                       [string]
  --insecure-certificate               Disable certificate check for all certificates (Redis, Sentinel, Cluster). Should not be used in
                                       production!                                                                            [boolean] [Standard: false]
  --noload, --nl                       Do not load connections from config.                                                                     [boolean]
  --clear-config, --cc                 Clear configuration file.                                                                                [boolean]
  --migrate-config                     Migrate old configuration file in $HOME to new style.                                                    [boolean]
  --test                               Test final configuration (file, env-vars, command line).                                                 [boolean]
  --open                               Open web-browser with Redis-Commander.                                                  [boolean] [default: false]
  --redis-label                        The label to display for the connection.                                               [string] [default: "local"]
  --read-only                          Start app in read-only mode.                                                            [boolean] [default: false]
  --http-auth-username, --http-u       The http authorisation username.                                                        [string] [default: "test"]
  --http-auth-password, --http-p       The http authorisation password.                                                            [string] [default: ""]
  --http-auth-password-hash, --http-h  The http authorisation password hash.                                                       [string] [default: ""]
  --address                            The address to run the server on.                                                    [string] [default: "0.0.0.0"]
  --port                               The port to run the server on.                                                            [number] [default: 8081]
  --url-prefix                         The url prefix to respond on.                                                               [string] [default: ""]
  --trust-proxy                        App is run behind proxy (enable Express "trust proxy").                                 [boolean] [default: false]
  --max-hash-field-size                The max number of bytes for a hash field before you must click to view it.                   [number] [default: 0]
  --nosave, --ns                       Do not save new connections to config file.                                             [boolean] [default: false]
  --no-log-data                        Do not log data values from redis store.                                                [boolean] [default: false]
  --folding-char, --fc                 Character to fold keys at for tree view.                                                   [string] [default: ":"]
  --root-pattern, --rp                 Default root pattern for redis keys.                                                       [string] [default: "*"]
  --use-scan, --sc                     Use SCAN instead of KEYS.                                                                [boolean] [default: true]
  --scan-count                         The size of each separate scan.                                                            [number] [default: 200]
  -h, -?, --help                       Show help                                                                                                [boolean]

The connection can be established either via direct connection to redis server or indirect via a sentinel instance. Most of this command line parameters map onto configuration params read from the config file - see docs/configuration.md and docs/connections.md.

Configuration

Redis Commander can be configured by configuration files, environment variables or using command line parameters. The different types of config values overwrite each other, only the last (most important) value is used.

For configuration files the node-config module (https://github.com/lorenwest/node-config) is used, with default to json syntax.

The order of precedence for all configuration values (from least to most important) is:

  • Configuration files

    default.json - this file contains all default values and SHOULD NOT be changed

    local.json - optional file, all local overwrites for values inside default.json should be placed here as well as a list of redis connections to use at startup

    local-<NODE_ENV>.json - Do not add anything else than connections to this file! Redis Commander will overwrite this whenever a connection is added or removed via user interface. Inside docker container this file is used to store all connections parsed from REDIS_HOSTS env var. This file overwrites all connections defined inside local.json

    There are some more possible files available to use - please check the node-config Wiki for a complete list of all possible file names (https://github.com/lorenwest/node-config/wiki/Configuration-Files)

  • Environment variables - the full list of env vars possible (except the docker specific ones) can be got from the file config/custom-environment-variables.json together with their mapping to the respective configuration key.

  • Command line parameters - Overwrites everything

To check the final configuration created from files, env-vars set and command line param overwrites start redis commander with additional param "--test". All invalid configuration keys will be listed in the output. The config test does not check if hostnames or ip addresses can be resolved.

More information can be found in the documentation at docs/configuration.md and docs/connections.md.

Environment Variables

These environment variables can be used starting Redis Commander as normal application or inside docker container (defined inside file config/custom-environment-variables.json) and at docs/configuration.md:

HTTP_USER
HTTP_PASSWORD
HTTP_PASSWORD_HASH
ADDRESS
PORT
READ_ONLY
URL_PREFIX
SIGNIN_PATH
ROOT_PATTERN
NOSAVE
NO_LOG_DATA
FOLDING_CHAR
VIEW_JSON_DEFAULT
USE_SCAN
SCAN_COUNT
FLUSH_ON_IMPORT
REDIS_CONNECTION_NAME
REDIS_LABEL
CLIENT_MAX_BODY_SIZE
BINARY_AS_HEX

Additional Docker Environment Variables

All environment variables listed at "Environment Variables" can be used running image with Docker. The following additional environment variables are available too (defined inside docker startup script):

HTTP_PASSWORD_FILE
HTTP_PASSWORD_HASH_FILE
REDIS_PORT
REDIS_HOST
REDIS_SOCKET
REDIS_USERNAME
REDIS_PASSWORD
REDIS_PASSWORD_FILE
REDIS_TLS
REDIS_TLS_CA_CERT
REDIS_TLS_CA_CERT_FILE
REDIS_TLS_CERT
REDIS_TLS_CERT_FILE
REDIS_TLS_KEY
REDIS_TLS_KEY_FILE
REDIS_TLS_SERVER_NAME
REDIS_DB
REDIS_HOSTS
REDIS_OPTIONAL
SENTINEL_PORT
SENTINEL_HOST
SENTINEL_NAME
SENTINEL_USERNAME
SENTINEL_PASSWORD
SENTINEL_PASSWORD_FILE
SENTINEL_TLS
SENTINEL_TLS_CA_CERT
SENTINEL_TLS_CA_CERT_FILE
SENTINEL_TLS_CERT
SENTINEL_TLS_CERT_FILE
SENTINEL_TLS_KEY
SENTINEL_TLS_KEY_FILE
SENTINEL_TLS_SERVER_NAME
SENTINELS
K8S_SIGTERM
CLUSTERS
IS_CLUSTER
CLUSTER_NO_TLS_VALIDATION

A (partial) description for the mapping onto the cli params and into the config files can be found at the docs/connections.md file.

The K8S_SIGTERM variable (default "0") can be set to "1" to work around kubernetes specifics to allow pod replacement with zero downtime. More information on how kubernetes handles termination of old pods and the setup of new ones can be found within the thread [kubernetes-retired/contrib#1140 (comment)]

Hosts can be optionally specified with a comma separated string by setting the REDIS_HOSTS environment variable.

After running the container, redis-commander will be available at localhost:8081.

Using TLS secured connections

Booth connections to the Redis server itself as well as to the Redis Sentinels (if used) can be configured to require TLS encryption. With the simples use case just set the environment vars REDIS_TLS=1 and (if sentinels are used) SENTINEL_TLS=1 to enable TLS without further checks and special configurations.

The corresponding command line parameters (starting Redis Commander locally without docker) are

--redis-tls --sentinel-tls

More complex use cases are documented in the docs/connections.md file at "Configure TLS Support".

Valid host strings (used for REDIS_HOSTS)

the REDIS_HOSTS environment variable is a comma separated list of host definitions, where each host should follow one of these templates:

hostname

label:hostname

label:hostname:port

label:hostname:port:dbIndex

label:hostname:port:dbIndex:password

Connection strings defined with REDIS_HOSTS variable do not support TLS connections. If remote redis server needs TLS write all connections into a config file instead of using REDIS_HOSTS (see docs/connections.md at the end within the more complex examples).

This environment variable REDIS_HOSTS does not support IPv6 addresses. It supports IPv4 or hostnames only due to ':' used as separator within IPv6 addresses and this fields here.

With docker-compose

version: '3'
services:
  redis:
    container_name: redis
    hostname: redis
    image: redis

  redis-commander:
    container_name: redis-commander
    hostname: redis-commander
    image: ghcr.io/joeferner/redis-commander:latest
    restart: always
    environment:
    - REDIS_HOSTS=local:redis:6379
    ports:
    - "8081:8081"

Without docker-compose

Simplest

If you're running redis on localhost:6379, this is all you need to get started.

docker run --rm --name redis-commander -d -p 8081:8081 \
  ghcr.io/joeferner/redis-commander:latest

Specify single host

docker run --rm --name redis-commander -d -p 8081:8081 \
  --env REDIS_HOSTS=10.10.20.30 \
  ghcr.io/joeferner/redis-commander:latest

Specify multiple hosts with labels

docker run --rm --name redis-commander -d -p 8081:8081 \
  --env REDIS_HOSTS=local:localhost:6379,myredis:10.10.20.30 \
  ghcr.io/joeferner/redis-commander:latest

Kubernetes

An example deployment can be found at k8s/redis-commander/deployment.yaml.

If you already have a cluster running with redis in the default namespace, deploy redis-commander with kubectl apply -f k8s/redis-commander. If you don't have redis running yet, you can deploy a simple pod with kubectl apply -f k8s/redis.

Alternatively, you can add a container to a deployment's spec like this:

containers:
- name: redis-commander
  image: ghcr.io/joeferner/redis-commander
  env:
  - name: REDIS_HOSTS
    value: instance1:redis:6379
  ports:
  - name: redis-commander
    containerPort: 8081

known issues with Kubernetes:

  • using REDIS_HOSTS works only with a password-less redis db. You must specify REDIS_HOST on a password protected redis db
  • using REDIS_HOSTS does not work with IPv6 addresses. For connections to IPv6 addresses either use REDIS_HOST and REDIS_PORT env var or a custom config/local.json configuration file mounted into the redis container.

Helm chart

You can install the application on any Kubernetes cluster using Helm. There is no helm repo available currently, therefore local checkout of helm sources inside this repo is needed:

helm -n myspace install redis-web-ui ./k8s/helm-chart/redis-commander

More Documentation about this Helm chart and its values.

OpenShift V3

To use the stock Node.js image builder do the following.

  1. Open Catalog and select the Node.js template
  2. Specify the name of the application and the URL to the redis-command github repository
  3. Click the advanced options link
  4. (optional) specify the hostname for the route - if one is not specified it will be generated
  5. In the Deployment Configuration section
    • Add REDIS_HOST environment variable whose value is the name of the redis service - e.g., redis
    • Add REDIS_PORT environment variable whose value is the port exposed of the redis service - e.g., 6379
    • Add value from secret generated by the redis template:
      • name: REDIS_PASSWORD
      • resource: redis
      • key: database-password
  6. (optional) specify a label such as appl=redis-commander-dev1
    • this label will be applied on all objects created allowing for easy deletion later via:
    oc delete all --selector appl=redis-commander-dev1

Helper Scripts

Generate BCrypted password hash

Redis commander allows setting either a plain text password for http authentication or a "bcrypt" password hash. To generate a hashed password the script bin/bcrypt-password.js can be used. The parameter "-p" to set password should be given.

Usage example:

$ git clone https://github.com/joeferner/redis-commander.git
$ cd redis-commander/bin
$ node bcrypt-password.js -p myplainpass
$2b$10BQPbC8dlxeEqB/nXOkyjr.tlafGZ28J3ug8sWIMRoeq5LSVOXpl3W

This generated hash can be set inside the config file as "server.httpAuth.passwordHash", as env var "HTTP_PASSWORD_HASH" or on the command line as --http-auth-password-hash. Running inside docker image a file containing this password hash can be set via env var HTTP_PASSWORD_HASH_FILE

Build images based on this one

To use this images as a base image for other images you need to call "apk update" inside your Dockerfile before adding other apk packages with "apk add foo". Afterwards, to reduce your image size, you may remove all temporary apk configs too again as this Dockerfile does.

redis-commander's People

Contributors

aamotharald avatar ajnasz avatar antoineleclair avatar asferas avatar blamoo avatar cargilltay avatar chrisregnier avatar dependabot[bot] avatar dev-trilobyte avatar evildevru avatar frx08 avatar hagai26 avatar jalessio avatar jkirkham-ratehub avatar joeferner avatar jsemig avatar jweyrich avatar nagyzekkyandras avatar nierob avatar ozomer avatar ramijebara avatar scotteadams avatar snyk-bot avatar sseide avatar stevenaldinger avatar tvernon avatar valesauer avatar vfedyk avatar voziv avatar zorac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

redis-commander's Issues

define character for keyname folding ( : )

It would be nice if one could specify which character to use for folding keynames in the treeview; i am working with an app that uses "-" instead of ":"...

where in the source can i try to change this behavior?

Add the ability to remove an element from a list by index

New feature suggestion: removing an element from a list by index.
Proposed solution would be to use LSET to rename the index to a unique Tombstone identifier and then using LREM to remove that unique element.
Would need to come up with a good unique identifier that would avoid collisions with production use.

redis-commander install problem

$ npm install -g redis-commander
npm http GET https://registry.npmjs.org/redis-commander
npm http 304 https://registry.npmjs.org/redis-commander
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/async
npm http GET https://registry.npmjs.org/ejs
npm http GET https://registry.npmjs.org/redis
npm http GET https://registry.npmjs.org/sf
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/inflection
npm http GET https://registry.npmjs.org/browserify
npm http GET https://registry.npmjs.org/readline-browserify/0.0.4
npm http GET https://registry.npmjs.org/cmdparser/0.0.3
npm http 304 https://registry.npmjs.org/optimist
npm http 304 https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/sf
npm http 304 https://registry.npmjs.org/ejs
npm http 304 https://registry.npmjs.org/redis
npm http 304 https://registry.npmjs.org/express
npm http 304 https://registry.npmjs.org/readline-browserify/0.0.4
npm http 304 https://registry.npmjs.org/browserify
npm http 304 https://registry.npmjs.org/inflection
npm http 304 https://registry.npmjs.org/cmdparser/0.0.3
npm http GET https://registry.npmjs.org/wordwrap
npm http GET https://registry.npmjs.org/connect
npm http GET https://registry.npmjs.org/mime/1.2.4
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/mkdirp/0.3.0
npm http GET https://registry.npmjs.org/detective
npm http GET https://registry.npmjs.org/deputy
npm http GET https://registry.npmjs.org/resolve
npm http GET https://registry.npmjs.org/nub
npm http GET https://registry.npmjs.org/commondir
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/http-browserify
npm http GET https://registry.npmjs.org/vm-browserify
npm http GET https://registry.npmjs.org/crypto-browserify
npm http 304 https://registry.npmjs.org/wordwrap
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/connect
npm http 304 https://registry.npmjs.org/mime/1.2.4
npm http 304 https://registry.npmjs.org/mkdirp/0.3.0
npm WARN package.json [email protected] No README.md file found!
npm http 304 https://registry.npmjs.org/detective
npm http 304 https://registry.npmjs.org/deputy
npm http 304 https://registry.npmjs.org/commondir
npm http 304 https://registry.npmjs.org/nub
npm http 304 https://registry.npmjs.org/resolve
npm http 304 https://registry.npmjs.org/coffee-script
npm http 304 https://registry.npmjs.org/http-browserify
npm http 304 https://registry.npmjs.org/crypto-browserify
npm http 304 https://registry.npmjs.org/vm-browserify
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/detective
npm http GET https://registry.npmjs.org/uglify-js
npm http GET https://registry.npmjs.org/concat-stream/0.0.8
npm http GET https://registry.npmjs.org/formidable
npm http 304 https://registry.npmjs.org/detective
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/concat-stream/0.0.8
npm http 304 https://registry.npmjs.org/uglify-js
npm http 304 https://registry.npmjs.org/formidable
npm http GET https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/esprima
/usr/local/share/npm/bin/redis-commander -> /usr/local/share/npm/lib/node_modules/redis-commander/bin/redis-commander.js
[email protected] /usr/local/share/npm/lib/node_modules/redis-commander
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

$ redis-commander --port 8081 --redis-host localhost
zsh: command not found: redis-commander

I don't really know what went wrong here... is that normal?

Multiple connections persist when using the Change Server button.

When using the Change Server button, A new connection is created and used, but the old connection is not closed properly, as noticed by examining the number of connected clients in the redis instance. This leads to many connected clients if the Change Server button is utilized multiple times during a single use of redis-commander, which could result in maxing out the number of connected clients.

Redis error Error: Ready check failed: ERR operation not permitted

I'm running redis-2.6.13 on CentOS 6.

I am seeing the following error when redis-commander is started.
How can I fix it? Thanks.

[root@centos63 redis-commander-master]# redis-commander --redis-password= -p 8888
path.existsSync is now called fs.existsSync.
listening on 8888
Redis error Error: Ready check failed: ERR operation not permitted
at RedisClient.on_info_cmd (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:319:35)
at Command.callback (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:367:14)
at RedisClient.return_error (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:502:25)
at RedisReplyParser. (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:262:14)
at RedisReplyParser.EventEmitter.emit (events.js:97:17)
at RedisReplyParser.send_error (/usr/local/lib/node_modules/redis-commander/node_modules/redis/lib/parser/javascript.js:266:14)
at RedisReplyParser.execute (/usr/local/lib/node_modules/redis-commander/node_modules/redis/lib/parser/javascript.js:125:22)
at RedisClient.on_data (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:478:27)
at Socket. (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:79:14)
at Socket.EventEmitter.emit (events.js:97:17)
at Socket. (stream_readable.js:720:14)
at Socket.EventEmitter.emit (events.js:94:17)
at emitReadable
(_stream_readable.js:392:10)
at emitReadable (_stream_readable.js:388:5)
at readableAddChunk (_stream_readable.js:150:9)
at Socket.Readable.push (_stream_readable.js:113:10)
at TCP.onread (net.js:515:21)
Redis Connection localhost:6379 Using Redis DB #0

<br> at end of line

When running a query that returns multiple items

zrange test -1 -1

The output displays a "
" at the end of line

slowlog get 2 command crashes app

edis error Error: node_redis command queue state error. If you can reproduce this, please report it.
at RedisClient.return_reply (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:634:15)
at RedisReplyParser. (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:265:14)
at RedisReplyParser.emit (events.js:67:17)
at RedisReplyParser.add_multi_bulk_reply (/usr/local/lib/node_modules/redis-commander/node_modules/redis/lib/parser/javascript.js:306:18)
at RedisReplyParser.send_reply (/usr/local/lib/node_modules/redis-commander/node_modules/redis/lib/parser/javascript.js:273:18)
at RedisReplyParser.execute (/usr/local/lib/node_modules/redis-commander/node_modules/redis/lib/parser/javascript.js:223:22)
at RedisClient.on_data (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:478:27)
at Socket. (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:79:14)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:367:14)

Consistent failure connecting to openredis

When I connect to openredis I have a connection for a few minutes, then redis-commander always exits with the following error:

getKeys Redis connection gone from close event.
Redis connection gone from close event.
loading keys by prefix ""
found 5 keys for ""
Using Redis DB #0
listening on  8081

events.js:71
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: listen EADDRINUSE
    at errnoException (net.js:769:11)
    at HTTPServer.Server._listen2 (net.js:909:14)
    at listen (net.js:936:10)
    at HTTPServer.Server.listen (net.js:985:5)
    at module.exports (/usr/local/lib/node_modules/redis-commander/lib/app.js:49:7)
    at startWebApp (/usr/local/lib/node_modules/redis-commander/bin/redis-commander.js:91:3)
    at /usr/local/lib/node_modules/redis-commander/bin/redis-commander.js:85:5
    at RedisClient.select (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:895:13)
    at try_callback (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:522:9)
    at RedisClient.return_reply (/usr/local/lib/node_modules/redis-commander/node_modules/redis/index.js:592:13)

Could be a reconnect enhancement issue

Browser side errors using, due to browserify?

When running in ubuntu I get a lot of client side errors:

such as:

- Uncaught Error: Cannot find module 'readline-browserify' 
- Uncaught Error: Cannot find module 'cmdparser' 
- Uncaught TypeError: Object #<Object> has no method 'createInterface' 

Pretty format or locate in tree

If you do a "get" command and the results are JSON. It would be nice to pretty print them on the console. It would also be nice to focus that item in the tree (but if the tree has 1000s of items opening that tree branch may be bad)

"Null" inserted when "more..." button is clicked

I'm encountering an error using tab completion of keys in the cli. When I click the "more..." button, "null" is inserted where my key partial previously was.

"GET [keypartial]" -> TAB -> "more..."

clicking branch doesn't load keys

I have a key like render/u:userid/y:2013/m:0/d:3

In the redis-commander gui it recognises there are 75 keys under 'render/u' which is correct

image

but clicking on the folder to expand the branch, just does nothing. The pane is blank and in console it is saying:

loading key "render/u"

But If I type keys render/u:* in the cli I get a list of the 75 keys

Any ideas?

Installation failure

False alarm: I was running on the wrong virtual environment. No way to delete an issue, one has started, though.

Support enter, to the end, to the start, disabled on the paging

For paging it would be nice to type a number and hit enter to go to index.
It would be nice to have a button to go to the start of the list as well as the end of the list
Also disable the various buttons when they are not available. ie the back button shouldn't work when the index = 0.

client temporarily uses an enormous amount of memory on initial load

I just set up a fresh and redis-commander 0.1.0 and pointed it at our database.

Looks great, except that when initially loading keys in a DB the client pauses for a while and chews up about 4GB of extra memory (in Firefox and Chrome). After the keys load, memory usage drops right back down and it again responds to input.

From that point on, everything's better (until you reload the page/refresh the keys)

Our database isn't huge, it only has 28K keys.

It may have to do with the large(?) number of keys that aren't folded; at least 10K appear in the root of the inspection tree.

What else would you like from me to diagnose this issue further?

Tree collapses on refresh

I believe this is not the intended/optimal behavior.

Each time I click refresh I have to manually expand the tree. This is very unpractical

[Error: ERR invalid DB index]

os:ubuntu 12.04
nodejs:0.8.14
Redis server v=2.6.0 sha=00000000:0 malloc=jemalloc-3.0.0 bits=32

when run the command
redis-commander --port 8081 --redis-host localhost

get error:
[Error: ERR invalid DB index]

restricted access

How do I restrict access if I'm deploying redis-commander to a remote host?

Bug with keys with a '/'

There is an issue with keys with a '/' because it conflicts with the routes when the AJAX methods are invoked. Very simple fix is to encodeURIComponent() on all places where a key is used in a GET or POST request.

JSON.parse('') will throw error , so please avoid it

when the data is '', JSON.parse will throw error

the file
/lib/util.js

exports.getConfig = function (callback) {
  fs.readFile(getUserHome() + "/.redis-commander", 'utf8', function (err, data) {
    if (err) {
      callback(err);
    } else {
//        if(data==''){
//            data="{}"
//        }
      var config = JSON.parse(data);
      callback(null, config);
    }
  });
};

NPM install doesn't work

Hi, the following doesn't work:
$ npm install -g redis-commander

.. but installing from the downloadable tarball works.

By the way - VERY NICE piece of app! Thank you!

Selecting a Database

Hi,
My redis usage involves databases, so

SELECT 1

is typically the first command I issue. Is there a way to do something like this with redis-commander.

Cheers,
Chris

error when using custom --redis-port

Hi,

the following command cannot connect to redis

redis-commander --redis-host localhost --redis-port 17379

I changed the default port in redis-command.js, but it still does not work. So I have to change the default port in node redis client module to make it work.

Thanks,
Rui

Connect to redis via UNIX-Socket

It is possible to configure redis to listen on a UNIX-Socket using the unixsocket in redis.conf.
Redis-command does only have the --redis-port and --redis-host options. Is it possible to use redis-command with a redis-server that is set up like that?

[Error: ERR invalid DB index]

I just installed redis-commander via

> npm install redis-commander -g

When I execute redis-commander, I get the error mentioned in the title:

> redis-commander 
[Error: ERR invalid DB index]

That's the whole error. How do I fix this?

In case it helps, here's the output of redis-cli info:

> redis-cli info

# Server
redis_version:2.6.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_mode:standalone
os:Darwin 12.2.1 x86_64
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:2552
run_id:cd922f9227359b71f64a8a33b6b7c2e325b86f1b
tcp_port:6379
uptime_in_seconds:5067
uptime_in_days:0
lru_clock:1607299

# Clients
connected_clients:4
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:1

# Memory
used_memory:1107744
used_memory_human:1.06M
used_memory_rss:1732608
used_memory_peak:1122976
used_memory_peak_human:1.07M
used_memory_lua:31744
mem_fragmentation_ratio:1.56
mem_allocator:libc

# Persistence
loading:0
rdb_changes_since_last_save:26
rdb_bgsave_in_progress:0
rdb_last_save_time:1358250075
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok

# Stats
total_connections_received:11
total_commands_processed:4997
instantaneous_ops_per_sec:0
rejected_connections:0
expired_keys:0
evicted_keys:0
keyspace_hits:21
keyspace_misses:674
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:512

# Replication
role:master
connected_slaves:0

# CPU
used_cpu_sys:13.78
used_cpu_user:11.44
used_cpu_sys_children:0.02
used_cpu_user_children:0.01

# Keyspace
db0:keys=2,expires=0

Auto Reconnect?

In development, sometimes I restart my redis server. When this happens, redis-commander exits.

It seems like a nice feature would be, at least as an option, have redis-commander stand by, periodically attempting to reconnect automatically. That way, I wouldn't have to specifically fire up the tool again every time.

I love this interface into redis, though. Thank you for sharing it, nearinfinity!

Adam

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.