Try ERPNext Buy Support Partners Foundation

Error 111 connecting to localhost

Hello,

I am having problems again with my backups.

They were working before, but several weeks ago I noticed that I wasn’t receiving the email informing me of the success of the backup every night.

Now, when I go to my logs, workbeat.error.log is full of: ERROR/MainProcess] beat: Connection error: Error 111 connecting to localhost:6379. Connection refused…
every few seconds.

And worker.error.log, full of: ERROR/MainProcess] consumer: Cannot connect to redis://localhost:6379//: Error 111 connecting to localhost:6379. Connection refused
also every few seconds.

I restarted frappe without any error, checked and restarted lsf, but I don’t know what else could I check.

Can be the localhost in redis configuration the cause? In any case I am not able to find where that is.

Thanks in advance for any help and kind regards from Spain,

Seems that your redis is not running.

Hi pdvyas,

Thank you for your answer.

My knowledge of Linux is limited. If I do:

ps aux | grep redis

I get:

as root: root 23640 0.0 0.2 1896 588 pts/0 R+ 01:43 0:00 grep redis
as erpnext: erpnext 23561 0.0 0.2 1896 592 pts/0 R+ 01:44 0:00 grep redis

Which I really don’t understand. Does this mean it is not running?

Thanks and regards

Run this as root

service redis-server start

Post output of the following after running above command

service redis-server status
1 Like

Hi BhupeshGupta,

Many thanks for your help!

I did as you suggested as root, and here are the results:

~# service redis-server start
Starting redis-server: redis-server.
~# service redis-server status
redis-server is not running

So it seems efectively is not working…

How could I check what’s wrong?

Thanks and kind regards,

Post the output of following

cat /var/log/redis/redis-server.log

Hi BhupeshGupta,

The result:

[2077] 11 Feb 10:11:29 # Warning: 32 bit instance detected but no memory limit set. Setting 3.5 GB maxmemory limit with ‘noeviction’ policy now.
[2077] 11 Feb 10:11:29 * Server started, Redis version 2.4.14
[2077] 11 Feb 10:11:29 # WARNING overcommit_memory 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.
[2077] 11 Feb 10:11:29 # Short read or OOM loading DB. Unrecoverable error, aborting now.
[28188] 13 Feb 09:09:18 # Warning: 32 bit instance detected but no memory limit set. Setting 3.5 GB maxmemory limit with ‘noeviction’ policy now.
[28188] 13 Feb 09:09:18 * Server started, Redis version 2.4.14
[28188] 13 Feb 09:09:18 # WARNING overcommit_memory 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.
[28188] 13 Feb 09:09:18 # Short read or OOM loading DB. Unrecoverable error, aborting now.

Is what the log says what I should do?

That is very kind how you are helping, thank you!

Looks like you have to remove the dump.rdb file (it’s the redis persistence file)

Try

rm /var/lib/redis/redis.rdb
service redis-server start
service redis-server status
1 Like

Hi pdvyas,

Many thanks! I deleted dump.rdb in /var/lib/redis/, and after starting redis service, it appears as running on its state.

Thank you pdvyas and BhupeshGupta for your kind help!!

Kind regards from Spain,

2 Likes

We are having a REDIS problem when attempting to send outgoing maill. Error message displayed is:

File “/xxxxxxxxx//frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py”, line 436, in connect
raise ConnectionError(self._error_message(e))
ConnectionError: Error 111 connecting to localhost:6379. Connection refused.
Report this issue

I have determined that the REDIS service is running on port 6379:

Anybody else resolved this issue?

Hi,

I had done as pdvyas and BhupeshGupta had suggested and I solved it.

I can’t give you more details as I don’t remember, but basically was a file that was blocking everything.

I hope you can solve it, and I am sorry I can not be more useful.

Kind regards,

Alb

Hello Guys,

I still getting same issue “Error 111 connecting to localhost:13000. Connection refused.”

Please help us.

Thanks

i had the same issue try to start bench on another terminal

and it will work

2 Likes

Try running the bench in one terminal using bench start
and in another terminal use the command ‘bench migrate’ or bench update
this will keep the reddis running

1 Like

I HAVE THE SAME PROBLEM. DID YOU SOLVE IT ?