Err Unknown command scan, redis-cli - redis

Installed the redis on ubuntu using
https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04
redis-server -v gives
Redis server v=4.0.9 sha=00000000:0 malloc=jemalloc-3.6.0 bits=64 build=76095d16786fbcba
redis-cli -v gives
redis-cli 4.0.9
While redis-cli info gives
redis_version:2.4.6
redis_git_sha1:26cdd13a
redis_git_dirty:0
arch_bits:64
multiplexing_api:winsock2
gcc_version:4.6.1
When run the scan command redis-cli scan 0 it gives error
(error) ERR unknown command 'scan'
Learned that scan only works on redis version 2.8+, so tried to update redis sudo apt install redis-server but it says
redis-server is already the newest version (5:4.0.9-1ubuntu0.1).
How can we run the SCAN command?

Problem is with your previous version of Cli: https://redis.io/commands/scan
upgrade your cli version to 2.8.0 or higher
I got the same issue due to install redis(2.4.0) on window 10 and donwload ubuntu from windows store and install latest version of redis(5.0.2) in Ubuntu but still redis-cli showed 2.4.6
To resolve this problem just uninstall redis-server from window and restart redis-server on Ubuntu

Related

Redis create-cluster create script increases the cpu usage to 100%

I want to give a try to the create-cluster script given in the redis documentation.
I did as the documentation indicates:
./create-cluster start
./create-cluster create
After the ./create-cluster create command, my computer CPU is going indefinitely to 100% of usage.
./create-cluster stop
When stopping the cluster instances, the CPU usage is back to normal usage.
What is going on? What can I do in the configuration to solve this?
My operating system is a Windows 10 version 21H2.
I installed the WSL Ubuntu 20.04 and run redis on it.
I installed the apt-get redis-server package.
didi#CHOUCHOU:~$ redis-server --version
Redis server v=6.2.6 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=9c9e426e2f96cc51
didi#CHOUCHOU:~$ redis-cli --version
redis-cli 6.2.6
I downloaded from github the create-cluster script.
https://raw.githubusercontent.com/redis/redis/6.2/utils/create-cluster/create-cluster

Redis start server if installed via snap

I am new to redis and I've just installed it using snap craft. All tutorials say that i can start redis server by typing redis-server in terminal. But for me it says that Command 'redis-server' not found. Is the process different if installed from snap?
Start Redis server:
sudo snap start redis
To run redis-cli copy it to /usr/local/bin/:
sudo cp /snap/redis/138/usr/bin/redis-cli
redis-cli

Redis running version unmatch actual version

Ubuntu 18.04
My Redis-Server Version:
Redis server v=5.0.5 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=71f661bb00c4db91
My Redis-Cli Version:
redis-cli 5.0.5
However, my redis is running on 4.0.9, so please let me know how can I change the configure and make my redis running on 5.0. Thank you.
127.0.0.1:6379> info
# Server
redis_version:4.0.9
I found there are two versions of Redis-server in my environment, and after uninstalling the unmatched running version, it works properly.

Installing Apache OpenWhisk using docker-compose on Amazon Linux instance gets stuck at "waiting for the Whisk invoker to come up..."

I am trying to install openwhisk for dev mode using docker compose on Amazon Linux EC2 Instance. I am following this link for doing so https://github.com/apache/incubator-openwhisk -> Get Started.
Although, it has worked for me before once, in this installation, I am facing an issue. These are the steps I followed:
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo chkconfig docker on
sudo yum install -y python-pip
sudo pip install docker-compose
This step is because open whisk is using sudo for docker-compose, and based on previous steps, sudo docker-compose -v gives a command not found.
sudo cp /usr/local/bin/docker-compose /bin
sudo yum install -y git
cd ~
git clone https://github.com/apache/incubator-openwhisk-devtools.git
cd incubator-openwhisk-devtools/docker-compose
sudo make quick-start
Update: The problem is that the make command gets stuck at the stage where it is waiting for invokers.
I have not made any changes to any source code, nor I did any other steps before this on the instance. It was a freshly created instance.
Am I missing something in OpenWhisk or EC2 or the combination of both? Any help would be great.
Update: I tried the docker-compose method for installing open whisk on Amazon Linux 1, Amazon Linux 2, Ubuntu 16.04 as well as Ubuntu 14.04. On all platforms, it got stuck at sudo make quick-start where it is waiting for invokers.
Update: Instead of using python-pip for docker-compose installation, used the command from docker website as well.
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
if docker-compose command is not found it means you didn't install docker-compose correctly.
I don't think you can install docker-compose as a python library using pip
See the instructions here https://docs.docker.com/compose/install/#install-compose
someting like
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
Or take a look at https://medium.com/#khandelwal12nidhi/docker-setup-on-aws-ec2-instance-c670ff3d5f1b

Running redis on MacOS - ping works without redis-server

I have just installed redis on MacOS. I'm following through the standard intro process. It says that in order start the DB I should call
$ redis-server
It also says that in order to confirm the server is running I should do the following:
$ redis-cli ping
PONG
I notice that I can ping the redis-cli as above and still get PONG back, even if I haven't executed redis-server. Does this mean that redis is running even if I don't exec redis-server?
If that is the case, how do I start and stop the local db?
Though you did not say, I guess you installed Redis using homebrew.
You can check what services you have started with homebrew using:
brew services list
Then you can use:
brew services start redis
and:
brew services stop redis