SemanticComputing / fuseki-docker

Apache Jena Fuseki with SeCo extensions
MIT License
33 stars 15 forks source link

Not accessable from docker network #8

Closed renyuneyun closed 3 years ago

renyuneyun commented 3 years ago

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 container app, trying to access fuseki:3030 results in time out (I'm using SPARQLWrapper in Python). Using its IP address (172.21.0.2:3030) has the same result.

The app container can resolve the fuseki container correctly. Running import socket; socket.gethostbyname('fuseki') in Python returns the expected 172.21.0.2.

Could this be due to any configuration in fuseki container?

renyuneyun commented 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.