LDAP Error

Hello,

I am setting up LDAP from Lucee to Active Directory for Mura CMS login and when I login I am getting the following error. Does anyone have any insight into why I would be getting this? I am not getting an LDAP connection error, this happens after I try and login.

500 Error
Error Instance Code: 470BE96A-A0DA-40CA-9DD5A9E5E1D52563
Error Time: {ts ‘2021-08-11 09:01:22’}
variable [RESULT] doesn’t exist
Code:0
Type:expression
lucee.runtime.exp.ExpressionException: variable [RESULT] doesn’t exist
at lucee.runtime.type.scope.UndefinedImpl.getCollection(UndefinedImpl.java:432)
at modules.ldap.model.handlers.handler_cfc$cf$8k.udfCall(/muraWRM/modules/ldap/model/handlers/handler.cfc:105)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:784)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1744)
at modules.ldap.model.handlers.handler_cfc$cf$8k.udfCall(/muraWRM/modules/ldap/model/handlers/handler.cfc:18)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:784)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1744)
at modules.ldap.model.handlers.handler_cfc$cf$8k.udfCall(/muraWRM/modules/ldap/model/handlers/handler.cfc:120)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1925)
at lucee.runtime.tag.Invoke.doComponent(Invoke.java:209)
at lucee.runtime.tag.Invoke.doEndTag(Invoke.java:186)
at plugin.pluginmanager_cfc$cf.udfCall3_000047_000049(/mura/plugin/pluginManager.cfc:1729)
at plugin.pluginmanager_cfc$cf.udfCall3_000047(/mura/plugin/pluginManager.cfc:1716)
at plugin.pluginmanager_cfc$cf.udfCall3(/mura/plugin/pluginManager.cfc:1564)
at plugin.pluginmanager_cfc$cf.udfCall(/mura/plugin/pluginManager.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:797)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:864)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1763)
at plugin.pluginmanager_cfc$cf.udfCall3(/mura/plugin/pluginManager.cfc:1240)
at plugin.pluginmanager_cfc$cf.udfCall(/mura/plugin/pluginManager.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1744)
at user.userutility_cfc$cf.udfCall1(/mura/user/userUtility.cfc:53)
at user.userutility_cfc$cf.udfCall(/mura/user/userUtility.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.type.scope.UndefinedImpl.callWithNamedValues(UndefinedImpl.java:797)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithNamedValues(VariableUtilImpl.java:864)
at lucee.runtime.PageContextImpl.getFunctionWithNamedValues(PageContextImpl.java:1763)
at user.userutility_cfc$cf.udfCall1(/mura/user/userUtility.cfc:119)
at user.userutility_cfc$cf.udfCall(/mura/user/userUtility.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1744)
at login.loginmanager_cfc$cf.udfCall2(/mura/login/loginManager.cfc:316)
at login.loginmanager_cfc$cf.udfCall(/mura/login/loginManager.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1744)
at admin.core.controllers.clogin_cfc$cf.udfCall(/muraWRM/admin/core/controllers/clogin.cfc:34)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.callWithNamedValues(UDFImpl.java:207)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:685)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.callWithNamedValues(ComponentImpl.java:1925)
at lucee.runtime.tag.Invoke.doComponent(Invoke.java:209)
at lucee.runtime.tag.Invoke.doEndTag(Invoke.java:186)
at admin.framework_cfc$cf.udfCall6(/admin/framework.cfc:1308)
at admin.framework_cfc$cf.udfCall(/admin/framework.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:784)
at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:785)
at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1744)
at admin.framework_cfc$cf.udfCall2(/admin/framework.cfc:517)
at admin.framework_cfc$cf.udfCall(/admin/framework.cfc)
at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:106)
at lucee.runtime.type.UDFImpl._call(UDFImpl.java:344)
at lucee.runtime.type.UDFImpl.call(UDFImpl.java:217)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:684)
at lucee.runtime.ComponentImpl._call(ComponentImpl.java:572)
at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1911)
at lucee.runtime.listener.ModernAppListener.call(ModernAppListener.java:437)
at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:216)
at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2457)
at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2447)
at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2418)
at lucee.runtime.engine.Request.exe(Request.java:44)
at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1179)
at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:1125)
at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:97)
at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:432)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.base/java.lang.Thread.run(Thread.java:834)

Column: 0
ID: ??
Line: 105
Raw Trace: modules.ldap.model.handlers.handler_cfc$cf$8k.udfCall(/muraWRM/modules/ldap/model/handlers/handler.cfc:105)
Template: C:\inetpub\wwwroot\CMSSite\modules\ldap\model\handlers\handler.cfc
Type: cfml

Column: 0
ID: ??
Line: 18
Raw Trace: modules.ldap.model.handlers.handler_cfc$cf$8k.udfCall(/muraWRM/modules/ldap/model/handlers/handler.cfc:18)
Template: C:\inetpub\wwwroot\CMSSite\modules\ldap\model\handlers\handler.cfc
Type: cfml

Column: 0
ID: ??
Line: 120
Raw Trace: modules.ldap.model.handlers.handler_cfc$cf$8k.udfCall(/muraWRM/modules/ldap/model/handlers/handler.cfc:120)
Template: C:\inetpub\wwwroot\CMSSite\modules\ldap\model\handlers\handler.cfc
Type: cfml

Column: 0
ID: ??
Line: 1729
Raw Trace: plugin.pluginmanager_cfc$cf.udfCall3_000047_000049(/mura/plugin/pluginManager.cfc:1729)
Template: C:\inetpub\wwwroot\CMSSite\core\mura\plugin\pluginManager.cfc
Type: cfml

Column: 0
ID: ??
Line: 1716
Raw Trace: plugin.pluginmanager_cfc$cf.udfCall3_000047(/mura/plugin/pluginManager.cfc:1716)
Template: C:\inetpub\wwwroot\CMSSite\core\mura\plugin\pluginManager.cfc
Type: cfml

Column: 0
ID: ??
Line: 1564
Raw Trace: plugin.pluginmanager_cfc$cf.udfCall3(/mura/plugin/pluginManager.cfc:1564)
Template: C:\inetpub\wwwroot\CMSSite\core\mura\plugin\pluginManager.cfc
Type: cfml

Column: 0
ID: ??
Line: 1240
Raw Trace: plugin.pluginmanager_cfc$cf.udfCall3(/mura/plugin/pluginManager.cfc:1240)
Template: C:\inetpub\wwwroot\CMSSite\core\mura\plugin\pluginManager.cfc
Type: cfml

Column: 0
ID: ??
Line: 53
Raw Trace: user.userutility_cfc$cf.udfCall1(/mura/user/userUtility.cfc:53)
Template: C:\inetpub\wwwroot\CMSSite\core\mura\user\userUtility.cfc
Type: cfml

Column: 0
ID: ??
Line: 119
Raw Trace: user.userutility_cfc$cf.udfCall1(/mura/user/userUtility.cfc:119)
Template: C:\inetpub\wwwroot\CMSSite\core\mura\user\userUtility.cfc
Type: cfml

Column: 0
ID: ??
Line: 316
Raw Trace: login.loginmanager_cfc$cf.udfCall2(/mura/login/loginManager.cfc:316)
Template: C:\inetpub\wwwroot\CMSSite\core\mura\login\loginManager.cfc
Type: cfml

Column: 0
ID: ??
Line: 34
Raw Trace: admin.core.controllers.clogin_cfc$cf.udfCall(/muraWRM/admin/core/controllers/clogin.cfc:34)
Template: C:\inetpub\wwwroot\CMSSite\admin\core\controllers\clogin.cfc
Type: cfml

Column: 0
ID: ??
Line: 1308
Raw Trace: admin.framework_cfc$cf.udfCall6(/admin/framework.cfc:1308)
Template: C:\inetpub\wwwroot\CMSSite\admin\framework.cfc
Type: cfml

Column: 0
ID: ??
Line: 517
Raw Trace: admin.framework_cfc$cf.udfCall2(/admin/framework.cfc:517)
Template: C:\inetpub\wwwroot\CMSSite\admin\framework.cfc
Type: cfml

Don’t forget to tell us about your stack!

OS: Windows Server 2019
Java Version: Open JDK 11.0.7.0
Tomcat Version: Tomcat 9
Lucee Version: 5.3.8.189

Hi @Gavinr98, welcome to the community. This looks like an cfml exception in MuraCMS code, but I really can’t tell. You might have better chance to resolve the issue if you ask the team behind MuraCMS directly.

Thanks you! I have already reached out to support, they were the ones that gave me the code for the LDAP connection, unfortunately they have not been much help.

@Gavinr98

This maybe a dumb question, but did you try to login via command line from the server having the issue?

Login to LDAP from the command line? No, I have not tried that.

either use ldp.exe or use ldapsearch.

I perfer the ldap search method, which is

ldapsearch -H ldaps://yourDC.domainname.TLD -x -W -D "user@domainname.TLD" \ 
    -b "dc=domainname,dc=TLD" "(sAMAccountName=user)"

I have no problem connecting the LDAP from the server.

If you are not getting an error logging in, you need to dig into how the service is connecting to the ADS or ldap(s) server.

This I would check next
Did the server in question have any new “windows patches” installed
Did the ADS Server have any “patches installed”
What does Event viewer show
What does Apache / IIS logs show
If those lead to dead ends, then I would look at the code that is being called and try to create a quick and dirty manual login
Code Example, here

What errors are thrown, did it require any additional java classes?

What happens if you try cfldap directly?
<cftry> <CFLDAP ACTION="QUERY" SERVER="my.ldapserver.local" PORT="389" START="ou=users,ou=General,dc=MyCompany,dc=local" USERNAME="MyDomain\#form.logonName#" PASSWORD="#form.password#" NAME="checkPassword" filter="sAMAccountName=#form.logonName#" ATTRIBUTES="*" SCOPE="SubTree" MAXROWS="1"> <cfset client.username = form.logonName /> <cfcatch type="any"> <cflocation url="login.cfm?msg=Your logon failed please try again"/> </cfcatch> </cftry>

I tried the following form to test and when using this, it worked fine. I copied the code and used it in the .cfc file and I still get the same error?

When I look back at your error, this does stick out

variable [RESULT] doesn’t exist
Code:0
Type:expression
lucee.runtime.exp.ExpressionException: variable [RESULT] doesn’t exist
at lucee.runtime.type.scope.UndefinedImpl.getCollection(UndefinedImpl.java:432)
at modules.ldap.model.handlers.handler_cfc$cf$8k.udfCall(/muraWRM/modules/ldap/model/handlers/handler.cfc:105)

I would do a scope dump at line 104.