'Failed to start Advanced key-value store.redis-server.service: Control process exited, code=exited status=1
redis-server wont work in the server i have nginx, apache, php and mysql

is there any package can cause the problem below
PS: this error when i'm installing BBB
https://github.com/bigbluebutton/bbb-install
redis-server.service: Control process exited, code=exited status=1 Failed to start Advanced key-value store.
--
-- The result is failed.
Apr 05 12:28:44 ns3081715 systemd[1]: redis-server.service: Unit entered failed state.
Apr 05 12:28:44 ns3081715 systemd[1]: redis-server.service: Failed with result 'exit-code'.
Apr 05 12:28:44 ns3081715 systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
Apr 05 12:28:44 ns3081715 systemd[1]: Stopped Advanced key-value store.
-- Subject: Unit redis-server.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit redis-server.service has finished shutting down.
Apr 05 12:28:44 ns3081715 systemd[1]: Starting Advanced key-value store...
-- Subject: Unit redis-server.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit redis-server.service has begun starting up.
Apr 05 12:28:44 ns3081715 run-parts[19223]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example
Apr 05 12:28:44 ns3081715 redis-server[19239]: *** FATAL CONFIG FILE ERROR ***
Apr 05 12:28:44 ns3081715 redis-server[19239]: Reading the configuration file, at line 108
Apr 05 12:28:44 ns3081715 redis-server[19239]: >>> 'logfile /var/log/redis/redis-server.log'
Apr 05 12:28:44 ns3081715 redis-server[19239]: Can't open the log file: Permission denied
Apr 05 12:28:45 ns3081715 systemd[1]: redis-server.service: Control process exited, code=exited status=1
Apr 05 12:28:45 ns3081715 systemd[1]: Failed to start Advanced key-value store.
-- Subject: Unit redis-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit redis-server.service has failed.
--
-- The result is failed.
Apr 05 12:28:45 ns3081715 systemd[1]: redis-server.service: Unit entered failed state.
Apr 05 12:28:45 ns3081715 systemd[1]: redis-server.service: Failed with result 'exit-code'.
Apr 05 12:28:45 ns3081715 systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
Apr 05 12:28:45 ns3081715 systemd[1]: Stopped Advanced key-value store.
-- Subject: Unit redis-server.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit redis-server.service has finished shutting down.
Apr 05 12:28:45 ns3081715 systemd[1]: Starting Advanced key-value store...
-- Subject: Unit redis-server.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit redis-server.service has begun starting up.
Apr 05 12:28:45 ns3081715 run-parts[19251]: run-parts: executing /etc/redis/redis-server.pre-up.d/00_example
Apr 05 12:28:45 ns3081715 redis-server[19270]: *** FATAL CONFIG FILE ERROR ***
Apr 05 12:28:45 ns3081715 redis-server[19270]: Reading the configuration file, at line 108
Apr 05 12:28:45 ns3081715 redis-server[19270]: >>> 'logfile /var/log/redis/redis-server.log'
Apr 05 12:28:45 ns3081715 redis-server[19270]: Can't open the log file: Permission denied
Apr 05 12:28:45 ns3081715 systemd[1]: redis-server.service: Control process exited, code=exited status=1
Apr 05 12:28:45 ns3081715 systemd[1]: Failed to start Advanced key-value store.
-- Subject: Unit redis-server.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit redis-server.service has failed.
--
-- The result is failed.
Apr 05 12:28:45 ns3081715 systemd[1]: redis-server.service: Unit entered failed state.
Apr 05 12:28:45 ns3081715 systemd[1]: redis-server.service: Failed with result 'exit-code'.
other log
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit redis-server.service has failed.
> --
> -- The result is failed. Apr 05 12:38:23 ns3081715 systemd[1]: redis-server.service: Unit entered failed state. Apr 05 12:38:23
> ns3081715 systemd[1]: redis-server.service: Failed with result
> 'exit-code'. Apr 05 12:38:23 ns3081715 systemd[1]:
> redis-server.service: Service hold-off time over, scheduling restart.
> Apr 05 12:38:23 ns3081715 systemd[1]: Stopped Advanced key-value
> store.
> -- Subject: Unit redis-server.service has finished shutting down
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit redis-server.service has finished shutting down. Apr 05 12:38:23 ns3081715 systemd[1]: Starting Advanced key-value store...
> -- Subject: Unit redis-server.service has begun start-up
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit redis-server.service has begun starting up. Apr 05 12:38:23 ns3081715 run-parts[20653]: run-parts: executing
> /etc/redis/redis-server.pre-up.d/00_example Apr 05 12:38:23 ns3081715
> redis-server[20669]: *** FATAL CONFIG FILE ERROR *** Apr 05 12:38:23
> ns3081715 redis-server[20669]: Reading the configuration file, at line
> 108 Apr 05 12:38:23 ns3081715 redis-server[20669]: >>> 'logfile
> /var/log/redis/redis-server.log' Apr 05 12:38:23 ns3081715
> redis-server[20669]: Can't open the log file: Permission denied Apr 05
> 12:38:23 ns3081715 systemd[1]: redis-server.service: Control process
> exited, code=exited status=1 Apr 05 12:38:23 ns3081715 systemd[1]:
> Failed to start Advanced key-value store.
> -- Subject: Unit redis-server.service has failed
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit redis-server.service has failed.
> --
> -- The result is failed. Apr 05 12:38:23 ns3081715 systemd[1]: redis-server.service: Unit entered failed state. Apr 05 12:38:23
> ns3081715 systemd[1]: redis-server.service: Failed with result
> 'exit-code'. Apr 05 12:38:23 ns3081715 systemd[1]:
> redis-server.service: Service hold-off time over, scheduling restart.
> Apr 05 12:38:23 ns3081715 systemd[1]: Stopped Advanced key-value
> store.
> -- Subject: Unit redis-server.service has finished shutting down
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit redis-server.service has finished shutting down. Apr 05 12:38:23 ns3081715 systemd[1]: redis-server.service: Start request
> repeated too quickly. Apr 05 12:38:23 ns3081715 systemd[1]: Failed to
> start Advanced key-value store.
> -- Subject: Unit redis-server.service has failed
> -- Defined-By: systemd
> -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
> --
> -- Unit redis-server.service has failed.
> --
> -- The result is failed. Apr 05 12:38:24 ns3081715 sshd[20498]: Failed password for root from 218.65.30.46 port 47702 ssh2 Apr 05 12:38:24
> ns3081715 sshd[20498]: Received disconnect from 218.65.30.46 port
> 47702:11: [preauth] Apr 05 12:38:24 ns3081715 sshd[20498]:
> Disconnected from 218.65.30.46 port 47702 [preauth] Apr 05 12:38:24
> ns3081715 sshd[20498]: PAM 2 more authentication failures; logname=
> uid=0 euid=0 tty=ssh ruser= rhost=218.65.30.46 user=root Apr 05
> 12:38:24 ns3081715 sshd[20540]: Failed password for root from
> 217.61.5.246 port 42706 ssh2 Apr 05 12:38:24 ns3081715 sshd[20540]: Received disconnect from 217.61.5.246 port 42706:11: disconnected by
> user [preauth] Apr 05 12:38:24 ns3081715 sshd[20540]: Disconnected
> from 217.61.5.246 port 42706 [preauth] Apr 05 12:38:24 ns3081715
> sshd[20540]: PAM 1 more authentication failure; logname= uid=0 euid=0
> tty=ssh ruser= rhost=217.61.5.246 user=root Apr 05 12:38:25 ns3081715
> sshd[20680]: pam_unix(sshd:auth): authentication failure; logname=
> uid=0 euid=0 tty=ssh ruser= rhost=218.65.30.46 user=root
Solution 1:[1]
I just bumped into the same issue with a fresh install of redis 5.0.3 from debian 10.1 packages repository.
For me the solution was to give access to the config file (read) and the log file (read-write) to user redis.
chown -R redis:redis /var/log/redis
chmod -R u+rwX,g+rwX,u+rx /var/log/redis
chmod +r /etc/redis/redis.conf
Solution 2:[2]
I've had the same issue a while on an ubuntu 16.04. It had happened after an update of the redis-server package.
The service was failing to start but running the server manually with
/usr/bin/redis-server /etc/redis/redis.conf
would let is start.
/var/log/redis/redis.log wouldn't provide useful information about it.
What I did was (being on ubutu 16.04) to remove redis-server and all its config files
sudo apt-get --purge remove redis-server
there was a leftover file dumb.rdb in /etc/redis so just to be sure :
sudo rm -rf /etc/redis/dump.rdb
then reinstall redis-server
sudo apt-get update
sudo apt-get install redis-server
and that solved it for me.
Bear in mind though that was just on my system. Apparently the redis server failing to start bug can be due to many conditions on different systems, some of those being for example :
- A non demonized service on archlinux
- A misconfigured runtime directory in the archlinus distribution package
- A stale NFS mount on a debian distro
You mileage may vary there.
In any case trying a reinstall, or even a downgrade to the previous version can't hurt :)
edit : corrected a typo
Solution 3:[3]
Redis was working fine and then I started to get this error
redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2021-07-19 09:43:47 EEST; 10s ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Process: 161736 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf (code=exited, status=1/FAILURE)
Then, I tried to run the command directly (This command can show you the problem in most cases)
/usr/bin/redis-server /etc/redis/redis.conf
It turned out that Redis can not find the log file
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 171
>>> 'logfile /var/log/redis/redis-server.log'
Can't open the log file: No such file or directory
The solution was simple:
sudo mkdir -p /var/log/redis/ && sudo touch /var/log/redis/redis-server.log && sudo chown redis:redis /var/log/redis/redis-server.log
Solution 4:[4]
For me the solution was:
sudo ps aux | grep redis
Then I've killed the redis-server PID:
sudo kill 7453
And finally:
sudo service redis start
Solution 5:[5]
Changes to redis.conf Make the below changes to redis.conf file to re-start the Redis Server. Edit the redis.conf file by executing the below command
nano /etc/redis/redis.conf
Change the line bind 127.0.0.1::1 to 127.0.0.1 Change the line supervised no to spervised systemd
Save the changes and close the file. The next step is to start Redis server. Execute the bellow commands to start the Redis server and create necessary symlinks for Redis service.
systemctl enable redis-server systemctl daemon-reload
Now you are all set and you can validate it by checking the status of the service by executing the command systemctl status redis.
Solution 6:[6]
There's a pitfall when changing default paths and file locations in /etc/redis/redis.conf. It took me an evening to find that read-write permissions of a system service do not only depend on the file-system permissions, but also on permissions granted in the unit file of the service itself:
If you need to relocate log file and database somewhere outside of the default locations, you need to adjust the ReadWriteDirectories directive in /lib/systemd/system/redis-server.service according your needs.
Don't forget to run systemctl daemon-reload and you should be fine to systemctl start redis-server
A package update will likely break the fix, if the unit file is replaced.
Solution 7:[7]
I had to run redis with /usr/bin/redis-server /etc/redis/redis.conf
I said that there was a configuration error (typo ..)
I could fix it, now it works
Solution 8:[8]
If you have redis.service running, the port 6379 gets occupied and the mentioned error might happen.
So disable the default redis serive:
sudo systemctl stop redis
sudo systemctl restart redis-server
sudo systemctl status redis-server
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mhoareau |
| Solution 2 | Community |
| Solution 3 | MohKoma |
| Solution 4 | Is Ma |
| Solution 5 | anas shah |
| Solution 6 | Bernie |
| Solution 7 | france1 |
| Solution 8 | Alireza Kavian |
