Closed renyuneyun closed 3 years ago
My bad. It's a firewall issue. After closing my firewall on the host, it works immediately.
I remember previously docker will automatically modify iptables rules, so I never tool much attention to that. But I'm using nftables now, which does not seem to work automatically for docker.
I'm using docker-compose to set up two containers, one is
fuseki
and the other is my application (app
). (I'm not very new to docker and docker-compose. Though I don't use them daily.)Accessing the fuseki container through port mapping
3030:3030
allows me to upload datasets to the container from my host. However, in the other containerapp
, trying to accessfuseki:3030
results in time out (I'm usingSPARQLWrapper
in Python). Using its IP address (172.21.0.2:3030
) has the same result.The
app
container can resolve thefuseki
container correctly. Runningimport socket; socket.gethostbyname('fuseki')
in Python returns the expected172.21.0.2
.Could this be due to any configuration in
fuseki
container?