Describe the bug I am running multiple users in ubuntu system. When I am trying to establish my client and server connection in one of the user than its showing client request from other Ubuntu user. Even when I am trying to remove all Redis client connections using

CLIENT KILL TYPE normal
CLIENT KILL TYPE slave
CLIENT KILL TYPE pubsub

It still show the other Ubuntu User client request. How can I stop this issue. Also I could not find any command which kills all the connections?

Comment From: oranagra

What do you mean by "showing client request"? Maybe give an example..

Comment From: starboyvarun

Hello @oranagra When i use

client list

id=174 addr=127.0.0.1:35030 fd=19 name= age=78243 idle=33 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=llen user=default
id=175 addr=127.0.0.1:35032 fd=20 name= age=78243 idle=33 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=rpush user=default
id=176 addr=127.0.0.1:35034 fd=21 name= age=78243 idle=33 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=llen user=default
id=177 addr=127.0.0.1:35036 fd=22 name= age=78243 idle=33 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=llen user=default
id=188 addr=127.0.0.1:37140 fd=29 name= age=4428 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=26 qbuf-free=32742 argv-mem=10 obl=0 oll=0 omem=0 tot-mem=61466 events=r cmd=client user=default
id=178 addr=127.0.0.1:35038 fd=23 name= age=78243 idle=33 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=llen user=default
id=179 addr=127.0.0.1:35040 fd=24 name= age=78243 idle=33 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=llen user=default
id=167 addr=127.0.0.1:35016 fd=10 name=controllerserver age=78247 idle=24 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=rpush user=default
id=168 addr=127.0.0.1:35018 fd=11 name=controllerserver age=78247 idle=41 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=info user=default
id=169 addr=127.0.0.1:35020 fd=12 name=controllerserver age=78247 idle=7 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=info user=default
id=170 addr=127.0.0.1:35022 fd=13 name=controllerserver age=78247 idle=18 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=info user=default
id=180 addr=127.0.0.1:35042 fd=25 name= age=78237 idle=23 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=rpush user=default
id=181 addr=127.0.0.1:35044 fd=26 name= age=78236 idle=23 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=rpush user=default
id=182 addr=127.0.0.1:35046 fd=27 name= age=78236 idle=23 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20520 events=r cmd=rpush user=default
id=171 addr=127.0.0.1:35024 fd=15 name= age=78247 idle=0 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=32768 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=61456 events=r cmd=llen user=default
id=172 addr=127.0.0.1:35026 fd=16 name= age=78247 idle=1 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=llen user=default
id=183 addr=127.0.0.1:35048 fd=9 name=controllerserver age=78236 idle=49 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default
id=184 addr=127.0.0.1:35050 fd=14 name=controllerserver age=78236 idle=45 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default
id=185 addr=127.0.0.1:35052 fd=18 name=controllerserver age=78236 idle=39 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default
id=186 addr=127.0.0.1:35054 fd=28 name=controllerserver age=78236 idle=18 flags=P db=0 sub=1 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20496 events=r cmd=ping user=default
id=173 addr=127.0.0.1:35028 fd=17 name= age=78247 idle=1 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=llen user=default
id=151 addr=127.0.0.1:34978 fd=8 name= age=78270 idle=71514 flags=N db=0 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=0 argv-mem=0 obl=0 oll=0 omem=0 tot-mem=20504 events=r cmd=client user=default

In redis-cli I am being showed the list from other Ubuntu user in that same system. I am not able to create client-server connection in my particular Ubuntu user because i have been shown 50-70 around client lists.

Comment From: zuiderkwast

Hi @starboyvarun! Redis is not aware of OS users. It will show all connected clients. In your list, none of the connections use Redis authentication (AUTH or HELLO command) so all of them are user=default.

Comment From: oranagra

i'm still not sure i understand the problem here. but as @zuiderkwast mentioned, you might be mixing between OS users, and Redis users (created with Redis ACLs)

Comment From: starboyvarun

@zuiderkwast If Redis is not aware of OS users. And yes all of them are user=default. But what can I do to stop all connected clients .You understood my problem can you suggest me a solution. Thank You.

Comment From: zuiderkwast

So you want to kill all clients. It's strange that CLIENT KILL TYPE normal doesn't work.

Have you tried CLIENT KILL USER default?

Comment From: starboyvarun

@zuiderkwast it works. It prints

(integer) 22

but when i write client list again.It shows all the clients even with USER=default. I am not able to understand where these client list is running.Even after killing all those in client list its again showing. Can this happen some files is creating clients automatically on background even when i close them ?

Comment From: zuiderkwast

I am not able to understand where these client list is running.Even after killing all those in client list its again showing.

I don't understand this either.

Can this happen some files is creating clients automatically on background even when i close them ?

Maybe. In your CLIENT LIST output, most of them show age=78243 or similar. That is seconds. It is 21 hours. If they are killed and created again, the age would be less. If they are not killed, I would expect CLIENT KILL to return an error instead of a number. Maybe there is a bug in client kill...(?)

Comment From: starboyvarun

No most of them is showing age= 2 only one or two are showing age=12851 and age=14770 . Yes I guess its a bug can you open a fork to fix this. And can you also tell me where this code is written so I can try fixing it. Thank you.

Comment From: zuiderkwast

Aha, after you killed them, two seconds later you call CLIENT LIST again and they show age=2. It seems like the killed clients reconnected again. Maybe you have some process in your system that does this. Some of them show name=controllerserver. Maybe it can indicate what software does this.

CLIENT LIST and CLIENT KILL are implemented in clientCommand() in src/networking.c

Comment From: starboyvarun

@zuiderkwast Yes some of them show name =controllerserver. I have already checked it but I could not find out. But I guess there should be some function defined so Redis work independently with multiple user setup. I will try defining it in clientCommand(). Thanks.