Assets Discovery is not collecting data for MacOS devices during scan
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Assets Discovery is not collecting data for MacOS devices during scan.
Environment
Discovery tool version 7.0.5 and above.
Diagnosis
Assets Discovery is not collecting data for MacOS devices during scan.
The scan is executed over target machines but no data is collected. The Discovery tool logs thrown the following message for one affected MacOS target host:
[Error] Error: Mandatory Hostname missing for: MacOS IP address
By changing the Discovery instance log level to DEBUG from the common tab, we also see the following trace:
[Debug] Result: Host MacBook-Pro-test not found: 2(SERVFAIL)
Cause
The default scan patterns for MacOS target hosts require that each Mac’s hostname must be resolvable via DNS.
By logging over one of the MacOS target machines it is possible to launch the following command over the terminal:
hostname -s
The above command is the same that the Discovery pattern for scanning MacOS machines will executes and on a machine where DNS correctly resolves the IP address, it will return the hostname of the MacOS device.
On a MacOS machine where the hostname is not correctly bind to IP address in DNS we would get error such Host not found: 2(SERVFAIL).
Solution
Make sure that the hostnames for the MacOS devices are resolved by the DNS by checking that your network's DNS servers correctly resolve the IP address of the MacOS device to its hostname.