ERROR: Connection refused
ryancwalsh opened this issue · 5 comments
Your tool is awesome, and I've been using it for a while now, and I really appreciate it.
Recently I created a second server, also running Redis.
(phpRedisAdmin is installed on the first one, not the second.)
I wanted to edit the config of phpRedisAdmin to allow me to view and manage that second server too.
Unfortunately, when I choose that server from the dropdown, the page just says:
ERROR: Connection refused [tcp://157.245.xxx.xx:6379]
So I thought maybe I needed to edit the firewall of the new server (to allow connections on this port from the IP of my first server), but it had no obvious effect.
So I figured I also needed to edit the redis.conf of the new server to change the "bind" line to bind not just to 127.0.0.1 but also to the IP of my first server.
But that didn't seem to work either and for some reason caused problems within the second server itself.
It seems highly likely that there is no "issue" with phpRedisAdmin, so please forgive me posting here to ask you.
But I just wonder if you have any advice about what I could look into. Thanks.
So I figured I also needed to edit the redis.conf of the new server to change the "bind" line to bind not just to 127.0.0.1 but also to the IP of my first server.
No, no. You can't set the redis server to bind to a remote ip address.
Redis only binds to localhost (127.0.0.1) by default to allow local connections only.
If you want to allow access from other machines, you will have 2 options:
- remove the bind option in the config file (it will listen on all adapters)
- set bind to an ip address of one of your local adapters (usually the address you use to connect to the machine)
Traffic to redis is not encrypted, so make sure you know what you are doing.
Thank you so much for your response! :-)
Traffic to redis is not encrypted, so make sure you know what you are doing.
Nope, I unfortunately don't know what I'm doing... and I do want to keep these servers secure.
I don't understand your second option (even after googling about redis and local adapters).
As for your first option, I wouldn't want to remove the bind
line in the config unless I felt confident that I was securing the Redis server sufficiently in another way (and I don't know if my ufw
firewall is enough).
Any further hints would be much appreciated. Thanks! :-)
Ok, drop me an email. You can find it in my profile. Not sure, if we should use @erikdubbelboer's issue tracker for that. Anyway, I can help you out tomorrow. I'm currently a bit busy and have an appointment this evening. (So unless you are in Toronto and care for a beer, it'll have to wait.)
Thanks @tessus!
I'm closing this issue as it doesn't seem this is related to phpRedisAdmin. If you can't get this fixed please let me know and I'll see what I can do.
From an email conversation with @tessus , it seems like installing phpRedisAdmin on the second machine too would be the easiest approach.
Otherwise I could explore https://www.digitalocean.com/docs/networking/private-networking/ or https://www.digitalocean.com/community/tutorials/how-to-encrypt-traffic-to-redis-with-stunnel-on-ubuntu-16-04
Thanks, @tessus !