Message329237
It seems that when the MacOS machine does not have a FQDN name manually configured using `scutil`, python will be fail to resolve domain names and timeout after ~30 seconds.
I mention that the DNS resolution works correctly on the machine and that the DHCP servers provides one ore more domains to be useles for resolution. Tools like nslookup or ping are not affected by this, only python (tried py27,34-36 and got same behavior).
Usually python user encounters errors like:
Traceback (most recent call last):
...
socket.gethostbyname(socket.gethostname())
gaierror: [Errno 8] nodename nor servname provided, or not known
One these machines `hostname` cli command returns a valid FQDN name like `foo.lan` but scutil will not return one:
```
sudo scutil --get HostName
HostName: not set
```
One temporary workaround is to manually run:
```
sudo scutil --set HostName `hostname`
```
This will set the hostname and python sockets functions will start to work (after few minutes as some caching is involved).
Still, we cannot expect users to run this command themselves. Even worse, they would have to re-run this each time the roam to another network that may have a different set of domains.
See: https://stackoverflow.com/questions/52602107 |
|
Date |
User |
Action |
Args |
2018-11-04 16:50:41 | ssbarnea | set | recipients:
+ ssbarnea, ronaldoussoren, ned.deily |
2018-11-04 16:50:41 | ssbarnea | set | messageid: <1541350241.71.0.788709270274.issue35164@psf.upfronthosting.co.za> |
2018-11-04 16:50:41 | ssbarnea | link | issue35164 messages |
2018-11-04 16:50:41 | ssbarnea | create | |
|