Details
-
Bug
-
Status: Closed
-
Resolution: No Longer Reproducible
-
6.2.X EE, 7.0.0 DXP SP2, Master
-
None
-
1.5
-
3
Description
Steps to reproduce - environment setup
- Download and install attached login-liferay.zip script:
- Unzip file to a empty folder
- Install node.js and npm if necessary
- Execute npm install
- Configure Liferay cluster with two tomcat nodes.
- Edit $TOMCAT_HOME/conf/server.xml of each node and configure the tcp ports to "8080" and "8180"
- Activate session replication at tomcat level:
- Edit $TOMCAT_HOME/conf/server.xml of each node and inside Engine tag, add following text:
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
- Edit $TOMCAT_HOME/conf/context.xml of each node and inside Context tag, add following text:
<Manager className="org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/>
- Edit $TOMCAT_HOME/webapps/ROOT/WEB-INF/web.xml and immediately following the <web-app> tag, add the tag <distributable />
- Edit $TOMCAT_HOME/conf/logging.properties and add the following lines.
##CLUSTER LOG 5cluster.org.apache.juli.AsyncFileHandler.level = FINER 5cluster.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs 5cluster.org.apache.juli.AsyncFileHandler.prefix = cluster. # just the clustering logs - all others are stock logging.properties org.apache.catalina.tribes.MESSAGES.level = FINE org.apache.catalina.tribes.MESSAGES.handlers = 5cluster.org.apache.juli.AsyncFileHandler org.apache.catalina.tribes.level = FINE org.apache.catalina.tribes.handlers = 5cluster.org.apache.juli.AsyncFileHandler org.apache.catalina.ha.level = FINE org.apache.catalina.ha.handlers = 5cluster.org.apache.juli.AsyncFileHandler org.apache.catalina.ha.deploy.level = INFO org.apache.catalina.ha.deploy.handlers = 5cluster.org.apache.juli.AsyncFileHandler
- Also add 5cluster.org.apache.juli.AsyncFileHandler to handlers line at the beggining of the file.
- Edit $TOMCAT_HOME/conf/server.xml of each node and inside Engine tag, add following text:
Steps to reproduce - using login-liferay.zip script
- Start first tomcat node
- Verify you can login from browser using URL: http://localhost:8080/web/guest
- In a new console, execute login-liferay script, in order to generate new sessions and force replication to second node
- 6.2.x:
node login-liferay.js -u [email protected] -p test --url "http://localhost:8080/web/guest" --num_threads 6 --num_executions 1000 --version 62
- 7.0.x / master:
node login-liferay.js -u [email protected] -p test --url "http://localhost:8080/web/guest" --num_threads 6 --num_executions 1000 --version 70
- 6.2.x:
- Start second tomcat node:
- Correct behavior: First node starts successfully
- Wrong behavior: Second node starts but following error is continuously displayed
05:56:33,399 ERROR [localhost-startStop-1][BasePortalLifecycle:47] java.lang.IllegalStateException: getAttribute: Session already invalidated java.lang.IllegalStateException: getAttribute: Session already invalidated at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1190) at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:103) at com.liferay.chat.internal.events.SessionDestroyAction.run(SessionDestroyAction.java:38) at com.liferay.portal.kernel.events.SessionAction.processLifecycleEvent(SessionAction.java:28) at com.liferay.portal.events.EventsProcessorUtil.process(EventsProcessorUtil.java:98) at com.liferay.portal.events.EventsProcessorUtil.process(EventsProcessorUtil.java:67) at com.liferay.portal.servlet.PortalSessionDestroyer.doPortalInit(PortalSessionDestroyer.java:133) at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44) at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:50) at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:902) at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:410) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4997) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) 05:56:33,408 ERROR [localhost-startStop-1][MainServlet:413] java.lang.IllegalStateException: Unable to initialize portal java.lang.IllegalStateException: Unable to initialize portal at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:49) at com.liferay.portal.kernel.util.PortalLifecycleUtil.flushInits(PortalLifecycleUtil.java:50) at com.liferay.portal.servlet.MainServlet.initPlugins(MainServlet.java:902) at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:410) at javax.servlet.GenericServlet.init(GenericServlet.java:158) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1238) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1151) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4997) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:585) at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1794) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalStateException: getAttribute: Session already invalidated at org.apache.catalina.session.StandardSession.getAttribute(StandardSession.java:1190) at org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessionFacade.java:103) at com.liferay.chat.internal.events.SessionDestroyAction.run(SessionDestroyAction.java:38) at com.liferay.portal.kernel.events.SessionAction.processLifecycleEvent(SessionAction.java:28) at com.liferay.portal.events.EventsProcessorUtil.process(EventsProcessorUtil.java:98) at com.liferay.portal.events.EventsProcessorUtil.process(EventsProcessorUtil.java:67) at com.liferay.portal.servlet.PortalSessionDestroyer.doPortalInit(PortalSessionDestroyer.java:133) at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44) ... 20 more
- Correct behavior: First node starts successfully
Attachments
Issue Links
- Discovered while testing
-
LPS-70074 java.lang.NoClassDefFoundError is thrown during Liferay startup in case of having a tomcat cluster with session replication activated
- Closed