5
votes

Tried to start redis-server but got:

26195:C 27 Aug 17:05:11.684 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf

26195:M 27 Aug 17:05:11.684 * Increased maximum number of open files to 10032 (it was originally set to 1024).

26195:M 27 Aug 17:05:11.685 # Creating Server TCP listening socket *:6379: bind: Address already in use

Ran lsof -wni tcp:3000 and killed the local host and tried restarting redis-server again and got the same above error.

Tried: ps -aux | grep redis (output below), then sudo kill -9 6379

nick4896 12238 0.0 0.1 41432 9048 ? Sl Aug26 0:14 redis-server *:6379

nick4896 26304 0.0 0.0 21300 984 pts/21 S+ 17:08 0:00 grep --color=auto redis

And ran sudo service redis-server restart, and got:

Failed to restart redis-server.service: Unit redis-server.service not found.

Any ideas?

3
why are there no answers here?moeiscool

3 Answers

28
votes

The problem is that symlink redis-server.service to redis.service was deleted.
Command

sudo systemctl enable redis-server

creates the symlink:

Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.

1
votes

Came across this, I would suggest systemctl daemon-reload

0
votes

Not an answer, but to complete Igor Kavzov's answer, this is the code to enter at the terminal:

sudo ln /lib/systemd/system/redis.service  /etc/systemd/system/redis-server.service