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

TCP and UDP ports with the same number can not simultaneously be forwarded #5527

Closed
bitglue opened this issue Mar 27, 2015 · 1 comment · Fixed by #7365
Closed

TCP and UDP ports with the same number can not simultaneously be forwarded #5527

bitglue opened this issue Mar 27, 2015 · 1 comment · Fixed by #7365

Comments

@bitglue
Copy link

bitglue commented Mar 27, 2015

This appears to be a regression of #1108 and also described at https://groups.google.com/forum/#!msg/vagrant-up/zK578M3qnKw/k9dZkiQkzNcJ

$ vagrant --version
Vagrant 1.7.2
  config.vm.define 'statsite' do |statsite|
    statsite.vm.network 'forwarded_port', guest: 8125, host: 8125, protocol: 'udp'
    statsite.vm.network 'forwarded_port', guest: 8125, host: 8125, protocol: 'tcp'
    statsite.vm.provider 'docker' do |d|
      d.build_dir = 'dockerfiles/statsite'
      d.name = 'statsite'
      d.link 'carbon-cache:carbon'
    end
  end

results in

$ docker ps
CONTAINER ID  IMAGE         COMMAND               CREATED         STATUS         PORTS                                                      NAMES
81e1f44083f1  0d27e166f52b  "/usr/local/bin/stat  52 minutes ago  Up 52 minutes  8125/udp, 0.0.0.0:8125->8125/tcp                           statsite

If the order of the 'forwarded_port's is exchanged, then it will forward UDP but not TCP.

@sethvargo sethvargo added this to the 1.8 milestone Jul 10, 2015
@sethvargo
Copy link
Contributor

I think this is the same thing as #5602 actually

sethvargo added a commit that referenced this issue May 30, 2016
This commit changes the way ports are aggregated in the Docker provider.
Previously ports were aggregated by their "number", but that is not a
truly unique representation. Instead, the protocol is now taken into
account when generating the port map.

Fixes GH-5527
@sethvargo sethvargo modified the milestones: 1.8.2, 1.8.0 May 30, 2016
sethvargo added a commit that referenced this issue May 30, 2016
This commit changes the way ports are aggregated in the Docker provider.
Previously ports were aggregated by their "number", but that is not a
truly unique representation. Instead, the protocol is now taken into
account when generating the port map.

Fixes GH-5527
@hashicorp hashicorp locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants