'python socket recvfrom is hanging from one client but not another
I have some python code getting data from a server. It runs on this older machine just fine but I put it on a newer machine (on the same network!) and the code seems to hang on the recvfrom for some reason? I am not sure where to look: checked firewalls make sure there is nothing wonky on this new machine vs the older one that works fine. Host names are the same, network seemingly seems to be connected the same. It just doesn't get any data like it connects but no data comes through:
self.hostname = "www.xyz.com"
self.portNumber = int(1235)
self.s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
self.host = socket.gethostbyname(self.hostname)
self.s.bind(("", self.portNumber))
print("binded")
print("about to recv")
data, address = self.s.recvfrom(1500)
print("recvd") ##dont see this line on new server
As per the print, it hangs on the recvfrom above when running from linux client B, yet if I run it on linux client A it runs fine does not hang on the recvfrom and spits out data in subsequent methods... I am not sure where to start trouble shooting this. Doesn't seem like a code issue, and guessing something with networking issue that something is not setup right on the new client to 'see' this data come across. Or the server has to be made aware of the client somehow? It too has no firewall that might be blocking or locking down to specific addresses. Three clients can see this data when this software runs and anything else doesn't (yet I will still see that 'binded' message I did a print on for sanity checking)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
