If the MID Server selector is called with an FQDN, which is not in the IP Address to DNS Name [cmdb_ip_address_dns_name] table, rather than an IP address, the operation fails. When this failure occurs, there is no attempt to resolve the FQDN in the customer environment (e.g. by querying a DNS server), and the system typically throws a BadArgumentException.

One known use case is the discovery of a vCenter server using the Cloud Discovery application.

Note: The cmdb_ip_address_dns_name table defines many-to-many relationships between records in the IP Address [cmdb_ci_ip_address] and DNS Name [cmdb_ci_dns_name] tables.



Steps to Reproduce

Known use case:

Using the Cloud Discovery application, discover a vCenter server where:

  • The only known address is an FQDN, rather than an IP address.
  • The FQDN does not have an entry in the cmdb_ip_address_dns_name table.

Result:  The MID Selector operation fails


Alternatively, there are simple steps to reproduce outside of any application:

  1. Login with a user that has the admin role.
  2. Navigate to System Definition > Scripts - Background.
  3. Enter the following code:

    var ms = new SNC.MidSelector();
    var targets = ['']; //An FQDN that is not in cmdb_ip_address_dns_name
    gs.print(ms.selectAnyMidServer('Discovery', targets, null));

  4. Click Run script.
        Result:  The BadArgumentException error appears in the script result page.



If possible, provide an IP address to the MID Selector.  Otherwise, manually populate records to ensure the MID Selector can resolve the FQDN:

  1. Add records in the cmdb_ci_ip_address and cmdb_ci_dns_name tables
  2. Add a record in the cmdb_ip_address_dns_name table pointing to the other two records.


Related Problem: PRB1241798

Seen In

There is no data to report.

Fixed In


Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:34:23