Hi,
Until starting the work to build an XWiki cluster, I have a single instance 12.10.9 Docker image (with some minor tweaks) running in Kubernetes as a Deployment
. I mount the xwiki.properties
and xwiki.cfg
files from a ConfigMap
into the /etc/xwiki/
directory for the pod/container. This is in AWS using GP2 persistent volume for perm data. That is all working fine.
I’m now switching to running XWiki in a cluster but the second instance in the cluster fails to start properly. I’ll include details of what I’ve done and the errors/exceptions I’m seeing. Any help would be appreciated, and thanks in advance.
So far, I’ve done the following:
- Switch to a
StatefulSet
. - Set up and use AWS EFS for a shared perm data dir.
- I’ve created a “tcp-k8s.xml” file that I’ve put into
WEB-INF/observation/remote/jgroups/
- This has the extra bit that enables KUBE_PING as per GitHub - jgroups-extras/jgroups-kubernetes: JGroups discovery protocol for Kubernetes.
- Added the Jar file for
org.jgroups.kubernetes:jgroups-kubernetes:1.0.16.Final
to theWEB-INF/lib/
to enable support for KUBE_PING- I chose 1.0.16 as that appeared to match the JGroups version in XWiki 12.10.9.
- Updated
xwiki.properties
to add the following:observation.remote.enabled=true
observation.remote.channels=tcp-k8s
- Currently sticking with integrated Solr until I have the rest of the cluster running properly (…which according to the Performance seciton https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Clustering/ should be ok). I’ll then move to an external Solr.
When the first instance comes up, it appears to be ok judging by:
...other logs...
-------------------------------------------------------------------
GMS: address=xwiki-0-32014, cluster=event, physical address=127.0.0.1:7800
-------------------------------------------------------------------
2021-09-27 09:05:04,141 [OfficeProcessThread-0] INFO .o.r.i.j.JGroupsNetworkAdapter - Channel [tcp-k8s] started
...other logs...
When the second instance comes up, I get the exceptions below.
2021-09-27 11:18:56,914 [localhost-startStop-1] ERROR .o.i.DefaultObservationManager - Failed to lookup listeners
org.xwiki.component.manager.ComponentLookupException: Failed to lookup component with type [interface org.xwiki.observation.EventListener] and hint [MentionsCreatedEventListener]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:245)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceList(EmbeddableComponentManager.java:225)
at org.xwiki.observation.internal.DefaultObservationManager.initializeListeners(DefaultObservationManager.java:166)
at org.xwiki.observation.internal.DefaultObservationManager.getListenersByEvent(DefaultObservationManager.java:132)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:283)
at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4763)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.mentions.internal.DefaultMentionsEventExecutor] identified by type [interface org.xwiki.mentions.internal.MentionsEventExecutor] and hint [default]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstanceMap(EmbeddableComponentManager.java:242)
... 20 common frames omitted
Caused by: org.xwiki.component.phase.InitializationException: Failed to initialize the queue
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:96)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
... 24 common frames omitted
Caused by: java.lang.IllegalStateException: The file is locked: nio:/usr/local/xwiki/data/mentions/mvqueue [1.4.200/7]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950)
at org.h2.mvstore.FileStore.open(FileStore.java:172)
at org.h2.mvstore.MVStore.<init>(MVStore.java:381)
at org.h2.mvstore.MVStore.open(MVStore.java:502)
at org.xwiki.mentions.internal.async.DefaultMentionsBlockingQueueProvider.initBlockingQueue(DefaultMentionsBlockingQueueProvider.java:69)
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:94)
... 28 common frames omitted
2021-09-27 11:18:56,924 [localhost-startStop-1] ERROR .o.i.DefaultObservationManager - Failed to lookup the Event Listener [MentionsUpdatedEventListener] corresponding to the Component registration event for [org.xwiki.mentions.internal.listeners.MentionsUpdatedEventListener]. Ignoring the event
org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.mentions.internal.listeners.MentionsUpdatedEventListener] identified by type [interface org.xwiki.observation.EventListener] and hint [MentionsUpdatedEventListener]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
at org.xwiki.observation.internal.DefaultObservationManager.onEventListenerComponentAdded(DefaultObservationManager.java:383)
at org.xwiki.observation.internal.DefaultObservationManager.onComponentEvent(DefaultObservationManager.java:354)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:299)
at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4763)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.mentions.internal.DefaultMentionsEventExecutor] identified by type [interface org.xwiki.mentions.internal.MentionsEventExecutor] and hint [default]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
... 19 common frames omitted
Caused by: org.xwiki.component.phase.InitializationException: Failed to initialize the queue
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:96)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
... 23 common frames omitted
Caused by: java.lang.IllegalStateException: The file is locked: nio:/usr/local/xwiki/data/mentions/mvqueue [1.4.200/7]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950)
at org.h2.mvstore.FileStore.open(FileStore.java:172)
at org.h2.mvstore.MVStore.<init>(MVStore.java:381)
at org.h2.mvstore.MVStore.open(MVStore.java:502)
at org.xwiki.mentions.internal.async.DefaultMentionsBlockingQueueProvider.initBlockingQueue(DefaultMentionsBlockingQueueProvider.java:69)
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:94)
... 27 common frames omitted
2021-09-27 11:18:56,934 [localhost-startStop-1] ERROR .o.i.DefaultObservationManager - Failed to lookup the Event Listener [MentionsCreatedEventListener] corresponding to the Component registration event for [org.xwiki.mentions.internal.listeners.MentionsCreatedEventListener]. Ignoring the event
org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.mentions.internal.listeners.MentionsCreatedEventListener] identified by type [interface org.xwiki.observation.EventListener] and hint [MentionsCreatedEventListener]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
at org.xwiki.observation.internal.DefaultObservationManager.onEventListenerComponentAdded(DefaultObservationManager.java:383)
at org.xwiki.observation.internal.DefaultObservationManager.onComponentEvent(DefaultObservationManager.java:354)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:299)
at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4763)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.mentions.internal.DefaultMentionsEventExecutor] identified by type [interface org.xwiki.mentions.internal.MentionsEventExecutor] and hint [default]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
... 19 common frames omitted
Caused by: org.xwiki.component.phase.InitializationException: Failed to initialize the queue
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:96)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
... 23 common frames omitted
Caused by: java.lang.IllegalStateException: The file is locked: nio:/usr/local/xwiki/data/mentions/mvqueue [1.4.200/7]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950)
at org.h2.mvstore.FileStore.open(FileStore.java:172)
at org.h2.mvstore.MVStore.<init>(MVStore.java:381)
at org.h2.mvstore.MVStore.open(MVStore.java:502)
at org.xwiki.mentions.internal.async.DefaultMentionsBlockingQueueProvider.initBlockingQueue(DefaultMentionsBlockingQueueProvider.java:69)
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:94)
... 27 common frames omitted
2021-09-27 11:18:56,945 [localhost-startStop-1] ERROR .o.i.DefaultObservationManager - Failed to lookup the Event Listener [MentionsApplicationReadyEventListener] corresponding to the Component registration event for [org.xwiki.mentions.internal.listeners.MentionsApplicationReadyEventListener]. Ignoring the event
org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.mentions.internal.listeners.MentionsApplicationReadyEventListener] identified by type [interface org.xwiki.observation.EventListener] and hint [MentionsApplicationReadyEventListener]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
at org.xwiki.observation.internal.DefaultObservationManager.onEventListenerComponentAdded(DefaultObservationManager.java:383)
at org.xwiki.observation.internal.DefaultObservationManager.onComponentEvent(DefaultObservationManager.java:354)
at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:299)
at org.xwiki.component.internal.StackingComponentEventManager.sendEvent(StackingComponentEventManager.java:151)
at org.xwiki.component.internal.StackingComponentEventManager.flushEvents(StackingComponentEventManager.java:92)
at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:124)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4763)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1177)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1925)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.xwiki.component.manager.ComponentLookupException: Failed to lookup component [org.xwiki.mentions.internal.DefaultMentionsEventExecutor] identified by type [interface org.xwiki.mentions.internal.MentionsEventExecutor] and hint [default]
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:204)
at org.xwiki.component.embed.EmbeddableComponentManager.getDependencyInstance(EmbeddableComponentManager.java:406)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:355)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
... 19 common frames omitted
Caused by: org.xwiki.component.phase.InitializationException: Failed to initialize the queue
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:96)
at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:365)
at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:451)
at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:201)
... 23 common frames omitted
Caused by: java.lang.IllegalStateException: The file is locked: nio:/usr/local/xwiki/data/mentions/mvqueue [1.4.200/7]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950)
at org.h2.mvstore.FileStore.open(FileStore.java:172)
at org.h2.mvstore.MVStore.<init>(MVStore.java:381)
at org.h2.mvstore.MVStore.open(MVStore.java:502)
at org.xwiki.mentions.internal.async.DefaultMentionsBlockingQueueProvider.initBlockingQueue(DefaultMentionsBlockingQueueProvider.java:69)
at org.xwiki.mentions.internal.DefaultMentionsEventExecutor.initialize(DefaultMentionsEventExecutor.java:94)
... 27 common frames omitted