Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Discovery is not working with Shazzam having empty values in the port_probe_spec parameter - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Discovery is not working with Shazzam having empty values in the port_probe_spec parameter
KB0714757

Discovery is not working with Shazzam having empty values in the port_probe_spec parameter


1892 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

Symptoms


Discovery is not working with Shazzam having empty values in the port_probe_spec parameter. To validate this issue, please run the following background script:

var gr = new GlideRecord('discovery_function_def'); 
gr.addQuery('name', 'All'); 
gr.query(); 
if (!gr.next()) { 
gs.print("Unable to read record discovery_function_def ALL record"); 
} else { 
var svcs = gr.functionality.getGlideList().getValues(); 
gs.print("Count " + svcs.size()); 
gs.print("discovery_function_def ALL record functionality values (s/b ArrayList of discovery port probe sys_ids: " + new JSON().encode(DiscoveryPortProbe.getFromArrayList(svcs))); 
}

 The above script should return an output similar to the result below:

[{"active":true,"classificationPriority":1,"classy":"discovery_classy_windows","conditional":false,"description":"Windows WMI","discoverCIs":true,"discoverIPs":true,"name":"wmi","scanner":"GenericTCP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"epmap","port":"135","protocol":"TCP","serviceName":"Microsoft RPC (WMI, DCOM)","sysID":"e44d59f7c0a801640088884e03a72724","valid":true}],"supplementary":false,"sysID":"9802b18f0a0a0703009d322d5b5540e5","triggersProbeID":"b11360600a0a0ba500c41bcbae55c5c4","valid":true},{"active":true,"classificationPriority":3,"classy":"discovery_classy_snmp","conditional":false,"description":"Simple Network Mangement Protocol","discoverCIs":true,"discoverIPs":true,"name":"snmp","scanner":"SNMP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"snmp","port":"161","protocol":"UDP","serviceName":"Simple Network Management Protocol","sysID":"e43c4f2bc0a8016401d0a692b7e91069","valid":true}],"supplementary":false,"sysID":"9803b0150a0a07030014493c58138458","triggersProbeID":"930a60500a0a0b61006f83edd300f689","valid":true},{"active":true,"classificationPriority":2,"classy":"discovery_classy_unix","conditional":false,"description":"Secure Shell Login","discoverCIs":true,"discoverIPs":true,"name":"ssh","scanner":"BannerTCP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"ssh","port":"22","protocol":"TCP","serviceName":"Secure Shell Service","sysID":"e433b32ec0a80164002cb4913c42fdfe","valid":true}],"supplementary":false,"sysID":"97ff2abd0a0a070300b7f37daa11a241","triggersProbeID":"10e0eebd0a0a0b4f61f46a5027df7fb6","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_proc","conditional":false,"description":"Web Servers","discoverCIs":true,"discoverIPs":true,"name":"http","scanner":"HTTP","script":"function(cidata, result, scanner, status, midServer, sensor) {\n    // our default values...\n    var httpdType = \"\";\n    var httpdVersion = \"\";\n    \n    // if we got a Server option back, process it...\n    if (scanner.contents.Server) {\n        // get only the stuff before the first space (if there is one), and make that our type...\n        var spaceParts = /^([^ ]+)( .*)?$/.exec(scanner.contents.Server);\n        if (spaceParts)\n            httpdType = spaceParts[1];\n        \n        // now see if we have a version, after a slash...\n        var versionParts = /^([^\\/ ]+)(\\/(.*))$/.exec(httpdType);\n        if (versionParts) {\n            httpdType = versionParts[1];\n            httpdVersion = versionParts[3];\n        }\n    }\n    \n    // now update or insert our IP service record...\n    var name = httpdType + ' ' + httpdVersion;\n    var svcSysID = g_disco_functions.getService(80).sys_id;\n    \n    updateCIData(cidata, name, svcSysID);\n    \n    sensor.suppressProbe();\n    \n    function updateCIData(cidata, name, svcSysID) {\n\t// see if other port probe might've added this already\n\t\tvar rl = cidata.getRelatedListInstance('cmdb_ip_service_ci', 'ci');\t\t\n\t\tif (rl == null) {\n\t        rl = new CIRelatedList('cmdb_ip_service_ci', 'ci');\n\t        cidata.addRelatedList(rl);\n\t\t}\n\n        var rec = {};\n        rec[ 'description' ] = name;\n        rec[ 'service'     ] = svcSysID;\n        rl.addRec(rec);\n    }\n}","serviceRegistryQueries":[],"services":[{"creates":"cmdb_ci_web_server","description":null,"name":"http","port":"80","protocol":"TCP","serviceName":"HyperText Transfer Protocol","sysID":"e433d6bdc0a8016400081f03a8dd1536","valid":true}],"supplementary":false,"sysID":"980365530a0a070300b473edf16f8ce0","triggersProbeID":"","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_proc","conditional":true,"description":"WINS Name Resolver","discoverCIs":true,"discoverIPs":true,"name":"wins","scanner":"NBT","script":"function(cidata, result, scanner, status, midServer, sensor) {\n    var resolvedHostname = scanner.hostName;\n    var sourceAddress = result.ip;\n    var resolvedDomain = scanner.domainName;\n\n    handleScanCI(cidata, resolvedHostname, sourceAddress, resolvedDomain);\n        \n    function handleScanCI(cidata, resolvedHostname, sourceAddress, resolvedDomain) {\n        if (!JSUtil.nil(resolvedHostname)) {\n            var hn = new HostnameJS();\n\t\t\t\n\t\t\tvar dl = sensor.getLogger();\n\t\t\tdl.setSource(\"wins Port Probe script\");\n\t\t\thn.setLogger(dl);\t\t\t\n\t\t\t\n            cidata.getData()['name'] = hn.format(resolvedHostname);\n        }\n        if (!JSUtil.nil(resolvedDomain)) {\n            cidata.getData()['os_domain'] = resolvedDomain;\n        }\n    }\n}\n","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"ms-nb-ns","port":"137","protocol":"UDP","serviceName":"NetBIOS Name Service","sysID":"09e9d79f0ab3015000ac88704e680ad4","valid":true}],"supplementary":false,"sysID":"09fba0bb0ab301500069fa474f89e935","triggersProbeID":"","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_proc","conditional":true,"description":"Domain Name Resolver","discoverCIs":true,"discoverIPs":true,"name":"dns","scanner":"DNS","script":"function(cidata, result, scanner, status, midServer, sensor) {\n    var resolvedHostname = scanner.hostName;\n    var sourceAddress = result.ip;\n\n    if (!JSUtil.nil(resolvedHostname))\n        cidata.getData()['dns_name'] = resolvedHostname;\n\n    handleScanCI(cidata, resolvedHostname, sourceAddress);\n\n    function handleScanCI(cidata, resolvedHostname, sourceAddress) {\n        var trusted = JSUtil.toBoolean(gs.getProperty(\"glide.discovery.hostname.dns_nbt_trusted\", \"false\"));\n        var haveNow = !JSUtil.nil(cidata.getData()['name']);\n        var haveDNS = !JSUtil.nil(resolvedHostname);\n\n        if (!haveDNS)\n            return;\n\n        if (haveNow && !trusted)\n            return;\n\n        var hn = new HostnameJS();\t\n\t\t\n\t\tvar dl = sensor.getLogger();\n\t\tdl.setSource(\"DNS Port Probe script\");\n\t\thn.setLogger(dl);\n\t\t\t\t\n        cidata.getData()['name'] = hn.format(resolvedHostname);\n        var dname = hn.getDomainName();\n        if (JSUtil.notNil(dname))\n            cidata.getData()['dns_domain'] = dname;\n    }\n}\n","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"dns","port":"53","protocol":"TCP/UDP","serviceName":"Domain Name Service","sysID":"e6401808c0a8020700ff8f2cff0ab87f","valid":true}],"supplementary":false,"sysID":"09fac5b40ab30150005055effbf8c808","triggersProbeID":"","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_scan_app","conditional":false,"description":"Finds network printers","discoverCIs":false,"discoverIPs":true,"name":"printer","scanner":"GenericTCP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"printer","port":"515","protocol":"TCP","serviceName":"printer","sysID":"db8636b90ab3015500b029144c7dff06","valid":true},{"creates":null,"description":null,"name":"hp-pdl-datastr","port":"9100","protocol":"TCP","serviceName":"hp-pdl-datastr","sysID":"db869bdd0ab3015500b054fc079f4c71","valid":true}],"supplementary":false,"sysID":"db8730390ab30155008b397e89991e18","triggersProbeID":"","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_scan_app","conditional":false,"description":"OS/X computers","discoverCIs":false,"discoverIPs":true,"name":"osx","scanner":"GenericTCP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"afp","port":"548","protocol":"TCP","serviceName":"Apple File Protocol","sysID":"db9840e10ab3015500f5e3fe8f78da42","valid":true}],"supplementary":false,"sysID":"db98c3450ab3015500665f9fd3f8016c","triggersProbeID":"","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_snmp","conditional":false,"description":"IP Phones","discoverCIs":false,"discoverIPs":true,"name":"ip_phone","scanner":"GenericTCP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"sip","port":"5060","protocol":"TCP","serviceName":"SIP (Session Initiation Protocol)","sysID":"dc0c50d60ab30155006ffaf81c6ce2fe","valid":true}],"supplementary":false,"sysID":"dc0cf75f0ab301550060d9ee5ddad04d","triggersProbeID":"","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_proc","conditional":false,"description":"Service Location Protocol","discoverCIs":true,"discoverIPs":false,"name":"slp","scanner":"SLP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"slp","port":"427","protocol":"TCP/UDP","serviceName":"Service Location Protocol (SLP)","sysID":"f8014e8137331000627d8c00dfbe5dbf","valid":true}],"supplementary":false,"sysID":"b0018e8137331000627d8c00dfbe5d26","triggersProbeID":"","valid":true},{"active":true,"classificationPriority":4,"classy":"discovery_classy_cim","conditional":false,"description":"WBEM (CIM)","discoverCIs":true,"discoverIPs":true,"name":"wbem","scanner":"GenericTCP","script":"function(cidata, result, scanner, status, midServer, sensor) { \n\tif (!gs.nil(scanner.contents.InteropSchemaNamespace)) \n\t\tcidata.getData().interopNamespace = scanner.contents.InteropSchemaNamespace;\n} ","serviceRegistryQueries":[{"_serviceTypes":["service:wbem"],"_sysID":"8f54500337602000c7608c00dfbe5d48"}],"services":[{"creates":null,"description":null,"name":"wbem_https","port":"5989","protocol":"TCP","serviceName":"Web-Based Enterprise Management (WBEM)","sysID":"4b429d5937631000627d8c00dfbe5de3","valid":true}],"supplementary":true,"sysID":"bb551dbd37331000627d8c00dfbe5d89","triggersProbeID":"5355955237402000627d8c00dfbe5ddf","valid":true},{"active":true,"classificationPriority":10,"classy":"discovery_classy_appl","conditional":false,"description":"vCenter Server Appliance Web user interface HTTPS","discoverCIs":true,"discoverIPs":false,"name":"vmapp","scanner":"BannerTCP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"vmapp_https","port":"5480","protocol":"TCP","serviceName":"vCenter Appliance Web Interface","sysID":"306ff342ef02010098d5925495c0fb95","valid":true},{"creates":null,"description":null,"name":"vmapp6_https","port":"9443","protocol":"TCP","serviceName":"vCenter Appliance Web Interface","sysID":"bc8c822a533102008f7969652ec58776","valid":true}],"supplementary":false,"sysID":"a8efbf02ef02010098d5925495c0fb5c","triggersProbeID":"1e4b29618f071200c2fe0b5437bdee19","valid":true},{"active":true,"classificationPriority":-1,"classy":"discovery_classy_windows","conditional":false,"description":"Windows Remote Management","discoverCIs":true,"discoverIPs":true,"name":"winrm","scanner":"HTTP","script":"","serviceRegistryQueries":[],"services":[{"creates":null,"description":null,"name":"winrm_ssl","port":"5986","protocol":"TCP","serviceName":"WinRM SSL","sysID":"099c4ca4972231002367955fda297511","valid":true},{"creates":null,"description":null,"name":"winrm","port":"5985","protocol":"TCP","serviceName":"WinRM","sysID":"e56c4ca4972231002367955fda297530","valid":true}],"supplementary":false,"sysID":"74cc4ca4972231002367955fda297589","triggersProbeID":"b11360600a0a0ba500c41bcbae55c5c4","valid":true}]

Release


Any 

Cause


Possible change made to the "AbstractDBObject" script include.

Resolution


Go to System Definition -> Script includes -> AbstractDBObject

Check if this script include has been changed and revert it back to OOTB (default).

Additional Information


If reverting the AbstractDBObject script include doesn't resolve this issue, please contact Support for assistance.


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

Attachments

Attachments

No attachments found

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.