Can you please share the server-side error? This client-side error is not something we can use, unfortunately.
NBB and Redis on a Remote Server
For my current project, I'm trying to configure NBB to speak to a redis server that is also hosted in the same Digital Ocean region.
Server with NodeBB is trying to contact server w/ redis configured to run on a non-default port over private networking.
I edited redis config on second server to use a password, bound to the private networking address of the other server, and to operate on this non-default port.
I restarted redis server to reload the config
Still, NodeBB returns with it being unable to connect (connection refused)
Since it's pretty late, would someone mind pointing out what I've overlooked?
Edit: No cookies awarded - julian came by first.
Seems the issue with connecting to the DB server is the private IP provided by Digital Ocean.
No matter what IP that I bind the redis-server on droplet 3 (DB Server) to, public IP of server or private networking IP, the connection is refused. However when it is configured to listen on 0.0.0.0, I am able to access this DB remotely from droplet 2 (App server) and configure NodeBB and use the system.
I plan on seeing if I need to manually open a port, but for the time being, it's nice to see everything operating together so I can take some snaps
@Ted, if your redis on a separate server is bound to localhost, then there is no way you can connect to it because it's not listening on the private ethernet interface!
So if eth0 is default, and eth1 is the private, then set the
bind_addressto your private IP.
I should be more clear since I'm awake now
Looking back, I seriously needed some caffeine as that is one garbled partially incorrect mess.
Tried binding to solely the private IP - no avail.
With the DB server bound to 0.0.0.0 - All systems are a go.
Decided it was best to snapshot everything before I started forcing them to talk and be friendly.
Coffee Edit for @julian:
The server actually running NodeBB is accessing the server I'm using for redis over private networking, just fine. The server running redis is currently bound to 0.0.0.0 This setup works, full NodeBB functionality. It's getting these two servers to communicate to each over when both are trying to refer to each other with private IP's (binding redis to the private IP of the server running NodeBB) that I encounter an issue.
Bloody hell, I'm an idiot.
The server running redis needed to be bound in its config file to it's private IP, not the private IP of the server that would be accessing it.
Heheh glad you figured it out. I went through my fair share of that when I was playing around with
bind_addressin MySQL back in the day
@julian It seemed pretty straight forward in my mind is the worst part.
Yup, I want this server to be this other server's pathetic little slave and take orders all day...Wha?.....It's rebelling!
It's hard to beat the incorrect logic of something you know absolutely should work as you're telling it to.