Failed to resolve .local hostname after upgrade to macOS Sierra

I recently upgraded to macOS Sierra and I can no longer resolve my .local hostnames.

I tried to restore the httpd.conf and httpd-vhosts.conf files, but that did not help.

I can, however, reach my web server using the IP address, but not with the name .local hostname. If I ping IP, it works fine, but pinging the hostname gives "Unknown host". Running "host mymac.local" gives Host server.local not found: 3 (NXDOMAIN).

I also tried setting computer_name, HostName and LocalHostName using scutil.

Obviously, rebooting didn't help either.

Does anyone face the same problem or have an idea of ​​how this can be solved? Thank you very much, very grateful!

+5
source share
2 answers

Here is a solution that works for me on Mac OS Sierra.

  • Open system settings
  • Open Sharing
  • Click the computer name "edit ..."
  • Check 'Use dynamic global hostname'
  • Check "Advertise Domain Services With Bonjour"
  • Enable file sharing

See attached image

+6
source

Open the system settings, and in the "Sharing" section, enable one of the services.

I’m not sure why this works, but I assume that this is due to the resolution of the Bonjour name, which is only allowed when at least one of the services starts.

Alternatively, add it to the / etc / hosts file.

+3
source

Source: https://habr.com/ru/post/1258161/


All Articles