im confuse with redis instalation. I've already tried uninstall redis with any tutorials, also trying uninstall manually. But, redis still used 6379 port.
dna@dna:~$ sudo netstat -tulnp | grep 6379
[sudo] password for dna:
tcp 0 0 0.0.0.0:6379 0.0.0.0:* LISTEN 22141/redis-server
tcp6 0 0 :::6379 :::* LISTEN 22141/redis-server
dna@dna:~$ apt-get autopurge redis-server
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
dna@dna:~$ sudo apt-get autopurge redis-server
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'redis-server' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
dna@dna:~$ sudo apt-get autopurge redis*
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package redis-stable
E: Unable to locate package redis-stable.tar.gz
E: Couldn't find any package by glob 'redis-stable.tar.gz'
E: Couldn't find any package by regex 'redis-stable.tar.gz'
dna@dna:~$ redis-cli
my docker apps used redis already stopped, also the redis image already removed too.
Here's my os:
dna@dna:~$ hostnamectl
Static hostname: dna
Icon name: computer-laptop
Chassis: laptop
Machine ID: -------
Boot ID: -------
Operating System: Linux Mint 21
Kernel: Linux 5.15.0-41-generic
Architecture: x86-64
Hardware Vendor: Lenovo
Hardware Model: -------
CodePudding user response:
You can find the PID that is listening on port 6379 with the following command: fuser -n tcp 6379
An example:
[root@server ~]# fuser -n tcp 22
22/tcp: 4837 34711
[root@server ~]#
If you cannot stop the service, you can kill it: kill -9 <pid>
CodePudding user response:
What’s the output of ps -auxf | grep -i redis
?
Perhaps another redis application is installed, what is the output of apt list installed | grep -i redis
?
Also, what is the output of systemctl | grep -i redis
If all that doesn't bring any valueable hints, try to install mlocate w apt install mlocate -y ; updatedb
.
Then perform a search for every redis file on disk:
locate -i redis
CodePudding user response:
u can try to login in as root,then unistall redis-server.Because the account dna is not access to read the file /var/lib/dpkg/lock-frontend