Notifications

161 views

Description

The ECC queue records created by the Help the Help Desk (HTHD) script are not being processed if Discovery property glide.discovery.hostname.include_domain=true.
A new Computer CI will be created, but with no details. The WMILoader ECC Queue input will remain in Ready state.

Steps to Reproduce

  1. Set glide.discovery.hostname.include_domain=true
  2. Re-run a WMILoader ECC Queue input that exhibits the issue

A CI may be created, but with no details.
The following exception will be seen in the node logs, and the syslog table.

java.lang.ClassCastException: org.mozilla.javascript.ConsString cannot be cast to java.lang.String
Caused by error in sys_trigger.face6f07db08330073a983243996196a at line 24
com.glideapp.ecc.WMILoader.adjustFieldValues(WMILoader.java:583)
com.glideapp.ecc.WMILoader.setValue(WMILoader.java:574)
com.glideapp.ecc.WMILoader.setValue(WMILoader.java:568)
com.glideapp.ecc.WMILoader.setBaseInfo(WMILoader.java:175)
com.glideapp.ecc.WMILoader.processWMI(WMILoader.java:151)
com.glideapp.ecc.WMILoader.load(WMILoader.java:101)
com.glideapp.ecc.WMILoader.load(WMILoader.java:80)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:292)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2585)
org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:42)
org.mozilla.javascript.gen.sys_trigger_face6f07db08330073a983243996196a_404._c_processPayload_1(sys_trigger.face6f07db08330073a983243996196a:24)
org.mozilla.javascript.gen.sys_trigger_face6f07db08330073a983243996196a_404.call(sys_trigger.face6f07db08330073a983243996196a)
org.mozilla.javascript.ScriptRuntime.doCall2(ScriptRuntime.java:2650)
org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2590)
org.mozilla.javascript.optimizer.OptRuntime.callName0(OptRuntime.java:74)
org.mozilla.javascript.gen.sys_trigger_face6f07db08330073a983243996196a_404._c_script_0(sys_trigger.face6f07db08330073a983243996196a:1)
org.mozilla.javascript.gen.sys_trigger_face6f07db08330073a983243996196a_404.call(sys_trigger.face6f07db08330073a983243996196a)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:563)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3428)
org.mozilla.javascript.gen.sys_trigger_face6f07db08330073a983243996196a_404.call(sys_trigger.face6f07db08330073a983243996196a)
org.mozilla.javascript.gen.sys_trigger_face6f07db08330073a983243996196a_404.exec(sys_trigger.face6f07db08330073a983243996196a)
com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:279)
com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:118)
com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:82)
com.glide.script.Evaluator.evaluatePossiblePrefixedString(Evaluator.java:204)
com.glide.job.RunScriptJob.evaluateScript(RunScriptJob.java:163)
com.glide.job.RunScriptJob.runScript(RunScriptJob.java:124)
com.glide.job.RunScriptJob.execute(RunScriptJob.java:88)
com.glide.schedule.JobExecutor.lambda$executeJob$171(JobExecutor.java:107)
com.glide.schedule.JobExecutor.executeJob(JobExecutor.java:110)
com.glide.schedule.JobExecutor.execute(JobExecutor.java:94)
com.glide.schedule.GlideScheduleWorker.executeJob(GlideScheduleWorker.java:236)
com.glide.schedule.GlideScheduleWorker.lambda$process$234(GlideScheduleWorker.java:165)
com.glide.worker.TransactionalWorkerThread.executeInTransaction(TransactionalWorkerThread.java:35)
com.glide.schedule.GlideScheduleWorker.process(GlideScheduleWorker.java:165)
com.glide.schedule.GlideScheduleWorker.run(GlideScheduleWorker.java:75)

Workaround

Apply either of these 2 workarounds: 

  1. Set Discovery system property glide.discovery.hostname.include_domain=false
    False is the default out-of-box setting, which HTHD is known to work with. However changing this value will also mean Discovery will no longer include the domain in CI names.
  2. Customise the "HostnameJS" Script Include. 

From: 

if (inc_domain == "true") 
return sysName + ( JSUtil.notNil(domainName) ? ('.' + domainName) : '' ); 

To: 

if (inc_domain == "true") 
return (sysName + ( JSUtil.notNil(domainName) ? ('.' + domainName) : '' ) +'').toString(); 

Related Problem: PRB1294994

Seen In

There is no data to report.

Fixed In

New York

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2019-05-21 11:41:50
Published:2019-03-15