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

Allow the ability to specify UDP or TCP for service discovery metadata #244

Open
brendangibat opened this issue Sep 9, 2015 · 4 comments

Comments

@brendangibat
Copy link

I'm exposing ports 9200 / TCP and UDP for an ElasticSearch container, specifying the service name for the port doubles the consul entries for DNS resolution. I would like the ability to do something such as SERVICE_9200_UDP_IGNORE / SERVICE_9200_TCP_IGNORE or SERVICE_9200_UDP_NAME = "udp-service".

@stvdilln
Copy link

I'm having same issue with Elastic search and port 9300 being open for both TCP and UDP when I use ephemeral ports:
registry.service.consul:5001/dy-kibana:1 ... 10.10.1.36:32774->9300/udp, 10.10.1.36:32781->9300/tcp ip-10-10-1-36/dy-kibana
So for port 9300 I have 32774 for UDP traffic and 32781 for TCP
(I think this ultimately is going to keep elastic search from working and I'm going to have to pin down ports and skip ephemeral, see moby/moby#4635 ).

This propogates into regstrator as:
[centos@ip-10-10-1-36 ~]$ dig +noall +short dy-kibana-9300.service.consul SRV 1 1 32774 consul_0.node.dc1.consul. 1 1 32781 consul_0.node.dc1.consul.

So what is in consul doesn't tell me which one is TCP and UDP.

I think the fault is more of docker assigning different port to port 9300, but trying to dynamically query what port 9300/tcp is impossible. I'm probably doing to just pick some hard coded ports and move on, but I seem to keep running to reasons why container instances need to be pinned to a docker host or a specific port (I'm trying to run this container in a swarm cluster, and getting the IP address to advertise is a pain that I though I could solve by querying consul).

@skippy
Copy link

skippy commented Nov 24, 2015

@brendangibat I'm having a similar issue where I want to be able to specify SERVICE_655_TCP_CHECK_SCRIPT but not UDP (as in this case it would be redundant). that would be quite useful

@pmundt
Copy link
Contributor

pmundt commented Sep 22, 2019

@brendangibat I just needed to do the same thing and was surprised to find this feature missing, so I've gone ahead and implemented this (please refer to PR #668). As this is almost 4 years later, I suspect you may not need the feature anymore, however..

@pmundt
Copy link
Contributor

pmundt commented Sep 22, 2019

Also forgot to mention, I've also uploaded a new docker image with this PR included already, which you can pull from adaptant/registrator should this be useful for anyone needing this functionality now.

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

4 participants