Redis cache server error

Hi Guys ,

I have installed recently ERPNext following the below Reference

After completing the post installation steps like Company setup and such i am getting the following error

Redis cache server not running. Please contact Administrator / Tech support

Your support to resolve this issue will be highly appreciated

I have tried

But it was unsuccessful

-ST

@subinson

Which OS did you use? Did you also use --setup-production?

-Anand.

Hi @anand ,

I am currently running on Ubuntu Below are the distribution details

Distributor ID : Ubuntu
Description : Ubuntu 12.04.4 LTS
Release : 12.04
Codename : precise

Yes , i did run the --setup-production statement during the installation

What’s the output of supervisorctl status (run as root or sudo)

HI @pdvyas ,

Please see below the output .

frappe:frappe-web RUNNING pid 1907, uptime 2:22:11
frappe:frappe-worker RUNNING pid 1903, uptime 2:22:12
frappe:frappe-workerbeat RUNNING pid 1910, uptime 2:22:11
redis-cache FATAL Exited too quickly (process log may have details)

Thanks In Advance

Can you check the process output in frappe-bench/logs, try to remove the offending line from the config and also report back the line?

Also, to test run sudo supervisorctl restart redis-cache

Are you also running bench start?

Please find Result for Bench Start

erpnext@ERPNext:~$ bench start
03:27:45 workerbeat.1 | started with pid 2631
03:27:45 web.1 | started with pid 2632
03:27:45 worker.1 | started with pid 2634
03:27:45 redis_async_broker.1 | started with pid 2636

03:27:45 redis_cache.1 | started with pid 2637

> 03:27:45 redis_cache.1        | process terminated

03:27:45 system | sending SIGTERM to all processes
03:27:45 system | sending SIGTERM to pid 2631
03:27:45 system | sending SIGTERM to pid 2632
03:27:45 system | sending SIGTERM to pid 2634
03:27:45 system | sending SIGTERM to pid 2636

> 03:27:45 redis_cache.1        | *** FATAL CONFIG FILE ERROR ***

03:27:45 workerbeat.1 | process terminated
03:27:45 web.1 | process terminated
03:27:45 worker.1 | process terminated

> 03:27:45 redis_async_broker.1 | process terminated

> 03:27:45 redis_cache.1        | Reading the configuration file, at line 6
> 03:27:45 redis_cache.1        | >>> 'save ""'
> 03:27:45 redis_cache.1        | Bad directive or wrong number of arguments
> 03:27:45 redis_async_broker.1 | [2639] 18 Aug 03:27:45 * Server started, Redis v                                                                                        ersion 2.2.12
> 03:27:45 redis_async_broker.1 | [2639] 18 Aug 03:27:45 # WARNING overcommit_memo                                                                                        ry is set to 0! Background save may fail under low memory condition. To fix this                                                                                         issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run                                                                                         the command 'sysctl vm.overcommit_memory=1' for this to take effect.
> 03:27:45 redis_async_broker.1 | [2639] 18 Aug 03:27:45 * The server is now ready                                                                                         to accept connections on port 12311
> 03:27:45 redis_async_broker.1 | [2639] 18 Aug 03:27:45 - 0 clients connected (0                                                                                         slaves), 790544 bytes in use

Result for sudo supervisorctl restart redis-cache

> redis-cache: ERROR (not running)
> redis-cache: ERROR (abnormal termination

@subinson

You should either

  1. use production setup using gunicorn and nginx
  2. or dev setup using bench start, but never both.

I was just asking because if bench start is running, there would be conflict.

@anand So what do you suggest now ?

As @pdvyas suggested, go to frappe-bench folder and run:
cat config/redis_cache.conf and paste the output here.

In the mean time, I am trying to reproduce this error on ubuntu 12.04.

Hello,

I have the same error when I run

administrator@debian7:~/frappe-bench$ sudo supervisorctl status
frappe:frappe-web                RUNNING    pid 4010, uptime 0:00:11
frappe:frappe-worker             RUNNING    pid 4009, uptime 0:00:11
frappe:frappe-workerbeat         RUNNING    pid 4011, uptime 0:00:11
redis-async-broker               RUNNING    pid 4012, uptime 0:00:11
redis-cache                      FATAL      Exited too quickly (process log may have details)

I am running Debian 7, and it stopped working correctly after my last bench-update 3 days ago…

Thank you for pointing me in the right direction with your previous posts.
In case anyone hits this error, here is what solved the problem in my installation.

Check the redis-cache log with:

tail -n50 /home/frappe/frappe-bench/logs/redis-cache.error.log

Brings up this error:

FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 6 >>> ‘save “”’ Bad directive or wrong number of arguments

Now edit the redis_cache.conf with:

nano /home/frappe/frappe-bench/config/redis_cache.conf

Remove line 6: save “”

sudo supervisorctl status

frappe:frappe-web RUNNING pid 21320, uptime 0:42:54
frappe:frappe-worker RUNNING pid 21319, uptime 0:42:54
frappe:frappe-workerbeat RUNNING pid 21327, uptime 0:42:54
node-socketio RUNNING pid 21344, uptime 0:42:53
redis-async-broker RUNNING pid 21336, uptime 0:42:54
redis-cache FATAL Exited too quickly (process log may have details)

sudo supervisorctl reload
sudo supervisorctl status

frappe:frappe-web RUNNING pid 22460, uptime 0:00:02
frappe:frappe-worker RUNNING pid 22459, uptime 0:00:02
frappe:frappe-workerbeat RUNNING pid 22461, uptime 0:00:02
node-socketio RUNNING pid 22463, uptime 0:00:02
redis-async-broker RUNNING pid 22462, uptime 0:00:02
redis-cache RUNNING pid 22464, uptime 0:00:02

Problem solved.

Interestingly, this problem does not appear on our productive instance of erpnext.
Is the save “” directive a config option from a previous version of redis? Are we running soon into this issue when upgrading the productive system?

Hope this helps someone.

6 Likes

Thank you for this! Worked with v6 too!

Thank you thank you!