I’ve got an issue with connecting to my FDB instance (running in Docker, Ubuntu) on a Debian host (server).
I am trying to connect via ‘fdbcli’ from my local machine (not the one running Docker). It says ‘The database is unavailable’ and ‘status’ does not work (‘unknown’ fields).
Docker is forwarding the :4500 port from the container to outside.
I can use ‘fdbcli’ from debian to access FDB in the container since i used the /usr/lib/foundationdb/make_public.py script.
(Using ‘fdbcli’ with a fdb.cluster-file with either 127.0.0.1 or the public IP of the Debian server)
But connecting from my local machine is not possible with the public IP of the Debian server.
Using ‘fdbcli’ gives ‘The database is unavailable’.
Using ‘status’ within gives ‘Using cluster file `fdb.cluster’. Unable to communicate with the cluster controller at 172.17.0.3:4500 to get status.’
So it seems to use the local-docker-network address…
But, ‘curl IP :4500’ gives a result, even if it’s not a pretty one - so it definitely is reachable.
Does someone know why this is?
I saw #365 but that does not change a thing since I used the make_public script before anyway. I think it does pretty much the same thing, doesn’t it?
Same problem here… was the source of the problem found?
FDB isn’t great at crossing NAT’d network boundaries. I’d recommend running your docker containers with host networking if you’re looking to connect to them from outside of the docker network.
Concretely, FDB assumes that IPs are reachable from all clients and servers, and thus stores and shares IPs for service discovery. It appears that Tim was able to have fdbcli connect to the coordinator, but when fdbcli received the information about the cluster controller from the coordinator, it used the docker-internal IPs.
Thanks for the quick reply, it makes sense, the problem is that running the docker image with “network host” gives the following error when starting foundationdb server
Invalid cluster file /var/fdb/fdb.cluster: 2104 Connection string invalid
and the image doesn’t even start, I image this is because the
fdb.cluster is being setup up with
172.17.0.2 which is not being found with this docker setup.
The image gets shutdown immediately, this log message can be seen in the docr lokegs, so it’s not even possible to change the fdb.cluster file. I would imagine that there should be a way to work this way, since there is am oficial foundationdb docker image since at least 7 month ago