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

map error on rest api when docker-link is processing new node #8

Closed
BrianAdams opened this issue Nov 29, 2015 · 4 comments
Closed

map error on rest api when docker-link is processing new node #8

BrianAdams opened this issue Nov 29, 2015 · 4 comments
Assignees

Comments

@BrianAdams
Copy link
Contributor

I am simply using docker-compose to bring up some existing docker images. Is that pull path for the service supposed to be passed all the way though to the rest api? I'm getting the error you see below

time="2015-11-29T05:46:39Z" level=info msg="creating [/bin/consul/consultest_consulserverBootstrap_1] with 192.168.99.100:32827 -> 8500"
time="2015-11-29T05:46:39Z" level=info msg="creating service [/bin/consul] on port 8500/tcp"
time="2015-11-29T05:46:39Z" level=info msg="creating [/bin/consul/consultest_consulserverBootstrap_1] with 192.168.99.100:32828 -> 8400"
time="2015-11-29T05:46:39Z" level=info msg="creating service [/bin/consul] on port 8400/tcp"
time="2015-11-29T05:46:39Z" level=info msg="creating [/bin/consul/consultest_consulserverBootstrap_1] with 192.168.99.100:32798 -> 53"
time="2015-11-29T05:46:39Z" level=info msg="creating service [/bin/consul] on port 53/udp"
time="2015-11-29T05:46:39Z" level=warning msg="no public ports were processed for [/bin/consul/consultest_consulserverBootstrap_1]"
time="2015-11-29T05:46:39Z" level=error msg="error(s) while processing container a69c28bcf5e8ce2dc78adab990d7386ab8ebe6393eb1a07514fa3fe7473a113b: [got unknown error from http://192.168.99.100:4672/service/bin/consul: map[error:endpoint information is missing] got unknown error from http://192.168.99.100:4672/service/bin/consul: map[error:endpoint information is missing] got unknown error from http://192.168.99.100:4672/service/bin/consul: map[error:endpoint information is missing]]"

@kobolog
Copy link
Owner

kobolog commented Nov 29, 2015

I guess the choice of auto-naming mechanics backfired here :/ What happens is that docker-link expects service names to be path-components, not paths – i.e. without slashes. So when your service "/bin/consul" starts, docker-link requests a new service to be created on GORB, but the endpoint it hits ends up being /service/bin/consul – from GORB's perspective, service name here is "bin" and "consul" is a backend.

I can make a quick fix by replacing all "/" with dashes, for example. Another problem here is that docker-link doesn't expect containers to expose multiple ports. I'll fix this by treating different exposed ports of a container as different virtual services.

This project is very new and initially it was written as a demo for DockerCon, so pardon the appearances and bugs =)

@kobolog kobolog self-assigned this Nov 29, 2015
@kobolog kobolog added the bug label Nov 29, 2015
@BrianAdams
Copy link
Contributor Author

Thanks! Totally expected in a new project.

On Sun, Nov 29, 2015 at 12:12 PM, Andrey Sibiryov notifications@github.com
wrote:

I guess the choice of auto-naming mechanics backfired here :/ What happens
is that docker-link expects service names to be path-components, not paths
– i.e. without slashes. So when your service "/bin/consul" starts,
docker-link requests a new service to be created on GORB, but the endpoint
it hits ends up being /service/bin/consul – from GORB's perspective,
service name here is "bin" and "consul" is a backend.

I can make a quick fix by replacing all "/" with dashes, for example.
Another problem here is that docker-link doesn't expect containers to
expose multiple ports. I'll fix this by treating different exposed ports of
a container as different virtual services.

This project is very new and initially it was written as a demo for
DockerCon, so pardon the appearances and bugs =)


Reply to this email directly or view it on GitHub
#8 (comment).

kobolog pushed a commit that referenced this issue Nov 30, 2015
Specifically, replace all forward slashes with dashes in container
path and mix in the port number & protocol to construct the future
virtual service name.

Should resolve most of the issue #8.
kobolog pushed a commit that referenced this issue Nov 30, 2015
This resolves the rest of issue #8.
@kobolog
Copy link
Owner

kobolog commented Nov 30, 2015

@BrianAdams I think this should fix your issue. Please try it out!

@BrianAdams
Copy link
Contributor Author

Yep that seems to be working. I have multiple services on port 8500 and they are now responding :-).

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

No branches or pull requests

2 participants