microsoft / service-fabric

Service Fabric is a distributed systems platform for packaging, deploying, and managing stateless and stateful distributed applications and containers at large scale.
https://docs.microsoft.com/en-us/azure/service-fabric/
MIT License
3.02k stars 399 forks source link

Docker services not reachable inside liunux cluster #1089

Open jfalameda opened 3 years ago

jfalameda commented 3 years ago

Hi,

I deployed an app with multiple docker services on a SF linux cluster via docker-compose. Although I specified the service name, aliases and hostname on the docker compose, I cannot reach those services (from other docker services) using DNS resolution. Why is this happening? How would service discovery work in this case?

patient.dhcloud:
    ...
    ports:
      - "5010:5010"
    hostname: patient.dhcloud
    networks:
       default:    
          aliases:
           - patient.dhcloud

I tried running the following example (https://github.com/Azure-Samples/service-fabric-containers/tree/master/Linux/container-dns-sample) with no results, the services cannot speak to each other.

I tried using a single-node, 3-node cluster both on Ubuntu 18 and Ubuntu 16 on Azure with no luck.


Assignees: /cc @microsoft/service-fabric-triage

craftyhouse commented 3 years ago

Are you using sfctl similar to the example and providing the dns name similar to the example? "--dns-name pythonbackend.simplecontainerapp" from https://github.com/Azure-Samples/service-fabric-containers/blob/master/Linux/container-dns-sample/install.sh