• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Installed Redis but giving error

Tonies

New Pleskian
  • OS: ‪CentOS Linux 7.4.1708 (Core)‬
  • Product: Plesk Onyx 17.5.3 Update #44
Hi,

I have followed this article to install Redis: Instruction - How to install latest Redis server

I would like to use it with Magento 2 for caching.

After following the step by step guide above, I got this:

2018-04-13_032310.jpg


After configuring my Magento 2 site to use Redis, I attempted to restart Reds with:

Code:
service redis-server restart
Redirecting to /bin/systemctl restart redis-server.service
Failed to restart redis-server.service: Unit not found.

Code:
Job for redis_6379.service failed because the control process exited with error code. See "systemctl status redis_6379.service" and "journalctl -xe" for details.

I run
Code:
redis-server &
and got the following:

2018-04-13_032941.jpg


I pointed to the redis.conf to the location on my server but this didn't resolve anything.

I attempted to start Redis with the command:
Code:
systemctl start redis_6379
and it returned this error:
Code:
Job for redis_6379.service failed because the control process exited with error code. See "systemctl status redis_6379.service" and "journalctl -xe" for details.

So I then run command to check the status of Redis:

2018-04-13_033453.jpg


What did I do wrong and how can I fix, please? Can anyone point me in the right direction even?

Thanks.
 
Before starting redis service you need to enable it with

# systemctl enable redis_6379
 
Before starting redis service you need to enable it with

# systemctl enable redis_6379

Thanks for the reply.

I run the command as you have stated to enable the service:
Code:
# systemctl enable redis_6379

It did not like the command because apparently it is not a native service and this was the result:

Code:
redis_6379.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig redis_6379 on

Checking the status straight after, I got this:

Code:
# systemctl status redis_6379.service -l
● redis_6379.service - LSB: start and stop redis_6379
   Loaded: loaded (/etc/rc.d/init.d/redis_6379; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-04-12 21:33:58 CDT; 10h ago
     Docs: man:systemd-sysv-generator(8)

Apr 12 21:33:58 myserver.com systemd[1]: Starting LSB: start and stop redis_6379...
Apr 12 21:33:58 myserver.com redis_6379[5999]: Starting Redis server...
Apr 12 21:33:58 myserver.com redis_6379[5999]: 6000:C 12 Apr 21:33:58.036 # Fatal error, can't open config file 'redis.conf'
Apr 12 21:33:58 myserver.com systemd[1]: redis_6379.service: control process exited, code=exited status=1
Apr 12 21:33:58 myserver.com systemd[1]: Failed to start LSB: start and stop redis_6379.
Apr 12 21:33:58 myserver.com systemd[1]: Unit redis_6379.service entered failed state.
Apr 12 21:33:58 myserver.com systemd[1]: redis_6379.service failed.

It seems it does not load the config file, how can I make it use the redis.conf.

I searched online and found this link Redis, redis fatal error can't open config file but it is related to Windows and does not have much information to assist me.

Thanks for your advice in advance.
 
Last edited:
I resolved this flawlessly by following some of the configuration steps in this article and skipping the installation part as I had already installed Redis: How To Install and Configure Redis on Ubuntu 16.04 | DigitalOcean

For those that come across this thread please note that the above is for the UBUNTU system, just use your own system commands procedures to configure Redis, for example, to create a user and group etc.

Please note that if you have installed Redis from this article: Instruction - How to install latest Redis server

Skip the install part of the Digital Ocean article and go straight to the configuration part.

For Magento 2 users, use this article to configure it after going through the Redis configuration above: How to Install Redis Cache on Magento 2

Please run all tests as indicated in the Cloudways Guide to check Redis is up and running and working your Magento 2 site.

If you follow it as per the guides then you will have Redis up and running successfully and with Magento 2.
 
Back
Top