Closed prsr55 closed 3 weeks ago
Update: If I change the IP to 0.0.0.0
on teh server, I was able to receive a UDP packet from the sample python programs (though interestingly if I change it back to localhost and back to 0.0.0.0
, it doesn't work unless i vagrant reload). No luck with nc
, I will try a fixed IP for the vagrant Vm and report back https://developer.hashicorp.com/vagrant/docs/networking/private_network
For anyone else that has this issue, I also did the following:
config.vm.network "private_network", type: "dhcp"
in my vagrantfileeth1
in ip addr show
from within my ubuntu VM
Debug output
https://gist.github.com/prsr55/f49ef54c6be337efc72159295f6a0ba5
Expected behavior
UDP client requests on host (macOS, Apple Silicon) should be able to hit UDP server in vagrant provisioned Ubuntu 22.04 ARM VM
Actual behavior
Reproduction information
Here is the sample server and client that I ran in the combinations above. Code taken from https://wiki.python.org/moin/UdpCommunication#Receiving
udpClient.py
:udpServer.py
:I also tried sending from my macOS host with the following in the terminal:
Vagrant version
Vagrant 2.4.1 (matches latest version I see for arm64 at the time of this post from https://developer.hashicorp.com/vagrant/downloads)
Host operating system
macOS Sonoma 14.4.1
Guest operating system
Steps to reproduce
python3 udpServer.py
python3 udpClient.py
, or try with thenc
commandsI've tried with various combinations of the ports listed below. The UDP port always fails.
I'm not sure if it matters but I noticed if I switch from my 'Standard' macOS user to my sudo user to list all the open ports, I still see the ports listed as open, even after I
vagrant halt
. Is that expected behavior (see ports 5000, 14500, 17001, 18001, which are all in my vagrant file, still show as open)? Or if I've already donevagrant halt
, but try and re-use one of hte ports below in my python server, I get an error that that port is in use already (commands taken from https://stackoverflow.com/questions/4421633/who-is-listening-on-a-given-tcp-port-on-mac-os-x?newreg=17ce3002e2e94e86a88ced5fa1a23f5f):Vagrantfile