# LDAP Stopped Working (11.1)

**URL:** <https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583>\
**Category:** Help / Discuss\
**Tags:** ldap\
**Created:** [March 12, 2019, 4:07pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583 "2019-03-12T16:07:35Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 22, 2019, 2:29pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/21 "2019-03-22T14:29:13Z")

</div>

> [@laurin1](#):
>
> Happened again today.

Which error did you get ? You reported several very different things in that thread.

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 22, 2019, 2:45pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/22 "2019-03-22T14:45:12Z")

</div>

Created Jira Issue: [Loading...](https://jira.xwiki.org/browse/LDAP-70)

> Which error did you get ? You reported several very different things in that thread.

Do you mean the displayed error? The only thing we ever get in the UI is this:

![image](https://forum.xwiki.org/uploads/default/original/2X/e/ed32ec7aa15d786a2cd983da1722ab1614ed4a15.png)

In the logs, there have been no errors consistent (timing-wise) with the failure. I’ve posted several that occurred within days of the failure, and one that seems to happen during the restart of the service, but today this one does appear to have happened during the attempt to login and before the restart:

22-Mar-2019 09:12:13.967 SEVERE [[https://xwiki01.pridedallas.com:8443/xwiki/bin/view/Main/IT%20Department%20Contacts/](https://xwiki01.pridedallas.com:8443/xwiki/bin/view/Main/IT%20Department%20Contacts/)] org.apache.catalina.core.StandardHostValve.invoke Exception Processing /xwiki/bin/view/Main/IT%20Department%20Contacts/  
java.lang.NullPointerException  
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:245)  
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)  
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:595)  
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)  
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)  
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)  
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)  
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)  
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)  
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)  
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)  
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1457)  
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)  
at java.lang.Thread.run(Thread.java:748)

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 22, 2019, 3:04pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/23 "2019-03-22T15:04:57Z")

</div>

When you have “Invalid credential” the best would be to enable debug log to see exactly why the authentication failed and report this. The error you pasted does not really seems to have anything to do with the authenticator (but I have no idea what this error means, does not even seems to be related to XWiki in general).

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 22, 2019, 3:15pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/24 "2019-03-22T15:15:36Z")

</div>

> [@tmortagne](#):
>
> enable debug log

How do I do that? I looked at [https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Logging](https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Logging) and at [https://dev.xwiki.org/xwiki/bin/view/Community/Debugging](https://dev.xwiki.org/xwiki/bin/view/Community/Debugging), but I’m not clear what the “debug log” is or how to enable that. Do you mean using this method:

```
Debug mode

[Since 7.1]

It's possible to enable debug log by adding debug=true (as 
in http://127.0.0.1:8080/xwiki/bin/Main/WebHome?debug=true) to the URL. 
This provide various details 
on what exactly happens during the request.

```

Or by some other method?

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 25, 2019, 9:08am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/25 "2019-03-25T09:08:57Z")

</div>

> [@laurin1](#):
>
> Do you mean using this method:

Nop.

> [@laurin1](#):
>
> Or by some other method?

I’m referring to [https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/#HEnableLDAPdebuglog](https://extensions.xwiki.org/xwiki/bin/view/Extension/LDAP/Authenticator/#HEnableLDAPdebuglog).  
By default only INFO, WARNING and ERROR log is written but it’s possible to selectively enable DEBUG level in the context of the LDAP authentication to get a step by step detail about what exactly happen and what went wrong written in the log file.

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 25, 2019, 11:31am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/26 "2019-03-25T11:31:33Z")

</div>

Of course, I tried to do that via the Admin UI and the issue is occurring right now. ☹ I’ll enable and restart, but that means 3-5 days before it happens again. Will that cause a performance issue?

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 25, 2019, 11:34am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/27 "2019-03-25T11:34:52Z")

</div>

I can mean a pretty huge log file if there is a lot of users login in.

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 25, 2019, 11:35am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/28 "2019-03-25T11:35:10Z")

</div>

> [@tmortagne](#):
>
> For some reason the infinispan cache ended up in the bad state which very rarely happen but I did saw it in the past. I don’t think it has anything to do with 11.1 since Infinispan hasn’t been upgraded since 10.5.
> 
> Usually you don’t see it anymore after restarting XWiki.

I know it’s probably not related, but we are still getting that error from time to time:

23-Mar-2019 06:18:37.014 SEVERE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [org.xwiki.container.servlet.XWikiServletContextListener]  
org.infinispan.IllegalLifecycleStateException: ISPN000323: Cache ‘user.membership.members’ is in ‘TERMINATED’ state and so it does not accept new invocations. Either restart it or recreate the cache container.  
at org.infinispan.interceptors.InvocationContextInterceptor.handleAll(InvocationContextInterceptor.java:97)  
at org.infinispan.interceptors.InvocationContextInterceptor.handleDefault(InvocationContextInterceptor.java:79)  
at org.infinispan.commands.AbstractVisitor.visitClearCommand(AbstractVisitor.java:58)  
at org.infinispan.commands.write.ClearCommand.acceptVisitor(ClearCommand.java:44)  
at org.infinispan.interceptors.InterceptorChain.invoke(InterceptorChain.java:335)  
at org.infinispan.cache.impl.CacheImpl.clear(CacheImpl.java:591)  
at org.infinispan.cache.impl.CacheImpl.clear(CacheImpl.java:582)  
at org.xwiki.cache.infinispan.internal.InfinispanCache.removeAll(InfinispanCache.java:107)  
at org.xwiki.user.internal.group.AbstractGroupCache.removeAll(AbstractGroupCache.java:302)  
at org.xwiki.user.internal.group.AbstractGroupCache.dispose(AbstractGroupCache.java:323)  
at org.xwiki.component.embed.EmbeddableComponentManager.dispose(EmbeddableComponentManager.java:685)  
at org.xwiki.container.servlet.XWikiServletContextListener.contextDestroyed(XWikiServletContextListener.java:161)  
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4792)  
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5429)  
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)  
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1435)  
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1424)  
at java.util.concurrent.FutureTask.run(FutureTask.java:266)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)  
at java.lang.Thread.run(Thread.java:748)

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 25, 2019, 11:37am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/29 "2019-03-25T11:37:54Z")

</div>

This one is a different cache but it’s the same kind of issue it seems. Note that Infinispan has been upgraded in the currently being released 11.2, maybe it will help.

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 25, 2019, 11:51am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/30 "2019-03-25T11:51:21Z")

</div>

Created [XWIKI-16260](https://jira.xwiki.org/browse/XWIKI-16260)

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 25, 2019, 1:22pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/31 "2019-03-25T13:22:38Z")

</div>

Should I create a Jira issue for this? The exception is no thrown on every restart of Apache Tomcat:

25-Mar-2019 08:19:48.607 SEVERE [localhost-startStop-2] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [org.xwiki.container.servlet.XWikiServletContextListener]  
org.infinispan.IllegalLifecycleStateException: ISPN000323: Cache ‘user.membership.members’ is in ‘TERMINATED’ state and so it does not accept new invocations. Either restart it or recreate the cache container.  
…

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 26, 2019, 7:09pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/32 "2019-03-26T19:09:20Z")

</div>

I made this change. I’m seeing nothing in the logs, but the failure has not occurred. Shouldn’t I see something even without a failure?

![image](https://discourse.xwiki.org/uploads/default/original/2X/f/fde907183e1d94d28da2b3977d469cc3ac0eb7ec.png)

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 27, 2019, 7:41am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/33 "2019-03-27T07:41:02Z")

</div>

> [@laurin1](#):
>
> I made this change. I’m seeing nothing in the logs, but the failure has not occurred. Shouldn’t I see something even without a failure?

You definitely should see tons of LDAP log. Have you restarted ?

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 27, 2019, 10:16am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/34 "2019-03-27T10:16:11Z")

</div>

Yes.

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 27, 2019, 10:27am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/35 "2019-03-27T10:27:18Z")

</div>

And you are sure you have `xwiki.authentication.authclass=org.xwiki.contrib.ldap.XWikiLDAPAuthServiceImpl` in xwiki.cfg ?

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 27, 2019, 11:10am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/36 "2019-03-27T11:10:17Z")

</div>

![image](https://discourse.xwiki.org/uploads/default/original/2X/1/105661e367ad1cee74b6a3106ea436aab934b82f.png)

What log(s) should these non-failure debug messages show up in? Maybe I’m looking in the wrong ones (but I’ve scanned on current ones in here:

![image](https://discourse.xwiki.org/uploads/default/original/2X/8/81eeb4740d7f0137663877aaa53577d173e966a2.png)

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 27, 2019, 12:49pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/37 "2019-03-27T12:49:16Z")

</div>

In general you should have various log with “XWikiLDAPAuthServiceImpl” at the beginning (logback print the logger name for each log).

For example you should get somehting like the following log for every single page refresh:

> XWikiUser: XWiki.MyUser

And when a user actually authenticate you should get a lot of step by step debug log about what happen during that authentication. Here are some examples:

> Connection to LDAP server [host:port]"

> Binding to LDAP server with credentials login=[somedn]

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 27, 2019, 7:47pm UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/38 "2019-03-27T19:47:04Z")

</div>

> [@tmortagne](#):
>
> In general you should have various log with “XWikiLDAPAuthServiceImpl” at the beginning (logback print the logger name for each log).

Do you mean it will have “XWikiLDAPAuthServiceImpl” in the file name? I can’t find log files with that in the file name (and I’ve searched the entire drive). Where would those normally be created?

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 28, 2019, 8:33am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/39 "2019-03-28T08:33:27Z")

</div>

No, each log **line** is generally prefixed with the logger name.

---

<div class="post-metadata">

**Author:** ![laurin1](https://forum.xwiki.org/user_avatar/forum.xwiki.org/laurin1/32/9_2.png) [@laurin1](https://forum.xwiki.org/u/laurin1)\
**Post date:** [March 28, 2019, 11:16am UTC](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583/40 "2019-03-28T11:16:49Z")

</div>

Ok, well, I’ve searched every log and that is not showing up.

[Previous page](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583.md?page=1)

[Next page](https://forum.xwiki.org/t/ldap-stopped-working-11-1/4583.md?page=3)
