Docker Community Forums

Share and learn in the Docker community.

Services accessing other stacks


(Lee Hull) #1

I have the following

HelloWorld (stack)
hello-world-green
hello-world-blue
hello-world-lb (load balancer)

HelloWorld-Service (stack)
hello-world
hello-world-lb (load balancer) 8080

I’m trying to see if hello-world in HelloWorld-Service can talk to hello-world-lb in HelloWorld stack

I’ve tried pinging hello-world-lb.helloworld like https://docs.docker.com/docker-cloud/apps/service-links/#/discovering-services-or-containers-on-another-stack says but getting a bad address when attempting to ping

I’ve tried putting both on same server, originally on 2 different servers


(LRubin) #2

I’m curious - what happens here when you add an extra/different character to the end of one of the hello-world-lb services?


(Lee Hull) #3

I’ve tried renaming the services without any special characters, still nothing

helloworld.helloworldlb
helloworldlb.helloworld

Both do not work if accessing them from another stack


(Lee Hull) #4

My scenario is

HelloWorld-UAT stack is located on AWS server called host01
Contains 2 services, hello-world and hello-world-lb

HelloWorld stack is located on AWS server called host02
Contains 3 services, helloworldblue, helloworldgreen, helloworldlb

I can access helloworldlb from its url, but if says HelloWorld-UAT wants to call it, I don’t exactly know its public URL or maybe does not have a public url, how can HelloWorld-UAT call HelloWorld

When I try to terminal into helloworld-uat and ping helloworldlb.helloworld, it says bad address

Do I need to link the stacks together?
I am assuming since both are in docker cloud, they should be able to access each other using . or vise-versa


(LRubin) #5

Hi, sorry for the misunderstanding, I’d originally meant for you to rename the lbs something like helloworld-lb1 and helloworld-lb2 - the dash character shouldn’t make any difference.

I’m actually having a hard time keeping straight which thing is pointing where - it might help troubleshooting to give the items in each stack more clearly different names.