Error=“redis connection error: dial tcp -myip-:6379: connect: connection refused”

Hi there!

I got problems when I try to remove a device or any other data (user, profile, etc). I mean, testing the web application (lora app server) I create few devices and gateways (with random parameters) in order to know how the platform works. However, when I try to remove a device or any other data, I got the following error:

rpc error: code = Unknown desc = redis connection error: dial tcp -MYIP-:6379: connect: connection refused (code: 2)

Trying to remove a gateway or organization, I got the same error. I guess it should be something related to permissions, but actually I have been looking for hours without any clue about what it is…

The log (lora-app-server) shows the following:
mar 05 09:17:05 iotserver lora-app-server[10548]: time=“2019-03-05T09:17:05+01:00” level=error msg=“send gateway ping error: stor
e mic lookup error: set mic lookup error: redis connection error: dial tcp -myip-:6379: connect: connection refused”

And the log of loraserver shows the following:
r 05 09:17:34 iotserver loraserver[10679]: time=“2019-03-05T09:17:34+01:00” level=error msg=“gateway/mqtt: acquire uplink paylo
ad lock error” error=“redis connection error: dial tcp -myip-:6379: connect: connection refused”

Looks like a redis issue…but no idea about what it is…

Any thoughts? :smiley:

Thanks in advance!

edit: kind a weird, because If i create a new user/organization, I can remove them…but cannot remove the already created them -_-

Take a second look again at error=“redis connection error: dial tcp -myip-:6379: connect: connection refused”, I believe the issue is quite clear :wink:

1 Like

is not clear to me :smiley:

I have changed -myip- for the real server ip, for security reasons…not sure if what you refer to…or any other clear error I did not see it? =)

Please check on what interface Redis listen?
In default cfg 127.0.0.1:
image

Hi Bondar!

Thanks for your message. I have check /etc/redis/redis.conf and that part is as follows:

Screenshot_20190305_101029

Should I change it for my server ip (has specific domain name)?

change to bind 0.0.0.0
image

And dont forget to restart redis server

God bless you mate! :smiley:

works like a charm! =)

thanks!

How to restart redis? i can’t using ```
sudo systemctl restart redis
command… please help me

systemctl restart redis-server

Hello,

I am newbie I have the same error but this solution doesn’t work in my case. Can you afford me another solution?

In a device, in the “Activation” field I am getting “redis connection error: dial tcp [::1]:6379: connect: connection refused (code: 2)” and in the “Device data” field a message appera like in a loop that says “Not connected to websocket API”.

Thank you!

1 Like

I can’t use systemctl restart redis-server command it says systemctl command not found. I am using loraserver gateway OS on raspberry pi