Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discovery is not working when using docker stack deploy #113

Closed
abdurrahmanbmf opened this issue Sep 4, 2018 · 3 comments
Closed

Discovery is not working when using docker stack deploy #113

abdurrahmanbmf opened this issue Sep 4, 2018 · 3 comments
Labels

Comments

@abdurrahmanbmf
Copy link

Discovery works when using docker run on host or by using docker-compose up but does not work when using docker stack deploy. I tried deploying it with the default/bridge and the overlay networks.

Please let me know if I am missing something.

Similar docker-compose.yml

version: "3" 
services:   
    service1:
        image: image1
        deploy:
            replicas: 1
            resources:
                limits:
                    cpus: "0.1"
                    memory: 256M
            restart_policy:
                condition: on-failure
        ports:
            - "4040:3838"
            - "5556:5555"
       #networks:
         #   - webnet 
        environment:
            - HTTP
    service2:
        image: image2  
        deploy:
            placement:
                constraints: [node.role == manager]
            replicas: 1
            resources:
                limits:
                    cpus: "0.1"
                    memory: 256M
            restart_policy:
                condition: on-failure
        ports:
            - "4848:3838"
            - "5557:5555"
      #networks:
         #   - webnet 
        environment:
            - HTTP
# networks: tried both default and with overlay
       # - webnet #load-balanced network

Logs service 1(central):

2018-09-04T23:30:41.093205600Z 
Hello! I'm sockend#bc7cc279-f6b8-454c-995f-e52553321c4c 
========================
2018-09-04T23:30:41.093262200Z 
23:30:41 - info: [start.js:149] ✔ Express server 76bcb20b332e listening on port 3838 in development mode.
2018-09-04T23:30:41.689495400Z 
Hello! I'm central#9d8b840b-efe9-4484-b8bf-da1c5adc4507 on 8000 
========================
2018-09-04T23:30:41.689551100Z 
2018-09-04T23:30:41.692409500Z 
Hello! I'm status publisher#02b760ff-adb7-4e87-a65d-eed3a0026585 on 8002 
========================
2018-09-04T23:30:41.692448400Z 
Sockend > service.online central#9d8b840b-efe9-4484-b8bf-da1c5adc4507 on 8000
2018-09-04T23:30:41.992450100Z 
Hello! I'm sockendSub#6aa15b3b-15df-4b85-8201-586ede90fe43 
========================
2018-09-04T23:30:41.992492000Z 
Sockend > monitor.online monitor#f797a225-c8ea-4fa5-be8e-fc626eeef23a on 8001
Sockend > service.online sockendSub#6aa15b3b-15df-4b85-8201-586ede90fe43
sockend > service.online status publisher#02b760ff-adb7-4e87-a65d-eed3a0026585 on 8002
2018-09-04T23:30:41.992514600Z 
Hello! I'm sockendSub#2e082ac8-d8bd-4d67-8e28-a7a7c6f4737a 
========================
2018-09-04T23:30:41.992531600Z 
sockend > service.online sockendSub#2e082ac8-d8bd-4d67-8e28-a7a7c6f4737a
central > monitor.online monitor#f797a225-c8ea-4fa5-be8e-fc626eeef23a on 8001
central > service.online sockendSub#6aa15b3b-15df-4b85-8201-586ede90fe43
status publisher > service.online sockendSub#2e082ac8-d8bd-4d67-8e28-a7a7c6f4737a
sockendSub > service.online Sockend#02ed8087-75ef-46b4-b9e4-4f49b3299456
central > service.online Sockend#02ed8087-75ef-46b4-b9e4-4f49b3299456
status publisher > service.online sockend#bc7cc279-f6b8-454c-995f-e52553321c4c
sockendSub > service.online sockend#bc7cc279-f6b8-454c-995f-e52553321c4c
sockendSub > service.online central#9d8b840b-efe9-4484-b8bf-da1c5adc4507 on 8000
sockendSub > monitor.online monitor#f797a225-c8ea-4fa5-be8e-fc626eeef23a on 8001
sockendSub > service.online status publisher#02b760ff-adb7-4e87-a65d-eed3a0026585 on 8002

Logs service 2(client):

Hello! I'm Sockend#100105b9-3f61-4221-b0d9-7b1cf28c4ff4
========================


Hello! I'm sockend#a36ca750-c2b7-48cc-bce8-363957dbbcf8
========================

undefined
23:30:19 - info: [start.js:150] ✔ Express server 53b98246eaad listening on port 3838 in development mode.

Hello! I'm client#a379f262-5e53-4fe0-9802-aa5eb5bf7223 on 8000
========================


Hello! I'm status publisher#0bb366eb-992d-42f0-bc01-fef249463de8 on 8002
========================

Sockend > service.online client#a379f262-5e53-4fe0-9802-aa5eb5bf7223 on 8000

Hello! I'm sockendSub#c97d8981-9dd9-4d52-9ad0-6d51484abae3
========================

Sockend > monitor.online monitor#ee730a72-cf5d-414f-b258-1f884e24dfa3 on 8001
Sockend > service.online sockendSub#c97d8981-9dd9-4d52-9ad0-6d51484abae3
sockend > service.online status publisher#0bb366eb-992d-42f0-bc01-fef249463de8 on 8002

Hello! I'm sockendSub#39ab675b-2e76-40e8-ac5c-4d24a4eea731
========================

sockend > service.online sockendSub#39ab675b-2e76-40e8-ac5c-4d24a4eea731
client> monitor.online monitor#ee730a72-cf5d-414f-b258-1f884e24dfa3 on 8001
client> service.online sockendSub#c97d8981-9dd9-4d52-9ad0-6d51484abae3
status publisher > service.online sockendSub#39ab675b-2e76-40e8-ac5c-4d24a4eea731
sockendSub > service.online Sockend#100105b9-3f61-4221-b0d9-7b1cf28c4ff4
client> service.online Sockend#100105b9-3f61-4221-b0d9-7b1cf28c4ff4
status publisher > service.online sockend#a36ca750-c2b7-48cc-bce8-363957dbbcf8
sockendSub > service.online sockend#a36ca750-c2b7-48cc-bce8-363957dbbcf8
sockendSub > service.online client#a379f262-5e53-4fe0-9802-aa5eb5bf7223 on 8000
sockendSub > monitor.online monitor#ee730a72-cf5d-414f-b258-1f884e24dfa3 on 8001
sockendSub > service.online status publisher#0bb366eb-992d-42f0-bc01-fef249463de8 on 8002
@drubin
Copy link
Contributor

drubin commented Sep 7, 2018

Docker Swarm's default network does not support multicast network. moby/libnetwork#552

You can try the custom weave net plugin moby/libnetwork#552 (comment)

#80 and #55

@rafaismyname
Copy link

So cote won't also work for AWS's ECS neither Fargate?

@dashersw
Copy link
Owner

@rafaismyname you can always use the redis fallback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants