Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Tomcat Cluster: "You do not have permission to access this resource" error Tim Solka May 25, 2013 8:34 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Juan Gonzalez May 25, 2013 1:44 PM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Tim Solka May 26, 2013 3:24 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Juan Gonzalez May 26, 2013 3:37 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Tim Solka May 26, 2013 4:06 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Juan Gonzalez May 26, 2013 4:31 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Tim Solka May 26, 2013 4:34 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Juan Gonzalez May 26, 2013 4:50 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Tim Solka May 26, 2013 5:01 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Tim Solka May 26, 2013 5:33 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Juan Gonzalez May 26, 2013 5:37 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Tim Solka May 26, 2013 8:22 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Juan Gonzalez May 26, 2013 8:24 AM
RE: Tomcat Cluster: "You do not have permission to access this resource" er Tim Solka May 26, 2013 8:46 AM
Tim Solka
Tomcat Cluster: "You do not have permission to access this resource" error
May 25, 2013 8:34 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

Hi,

I wanted to cluster a JSF portlet in Liferay using Liferay 6.1 CE bundled with Tomcat. So I got 2 LIferay instances connected with the same database and accessible via a Load Balancer configured for sticky sessions.
But if I change the server ( by shutting down the one I'm working on) I get the error "You do not have permission to access this resource".
So I guess the session replication is not working.

Any idea what I could do?

Following the relevant configs:
cluster part in server.xml
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="6">
<Manager className="org.apache.catalina.ha.session.BackupManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true" mapSendOptions="6"/>
<Channel className="org.apache.catalina.tribes.group.GroupChannel">
<Membership className="org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/>
<Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="5000" selectorTimeout="100" maxThreads="6"/>
<Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
<Transport className="org.apache.catalina.tribes.transport.nio.PooledParallelSender"/>
</Sender>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor"/>
<Interceptor className="org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor"/>
</Channel>
<Valve className="org.apache.catalina.ha.tcp.ReplicationValve" filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.htm;.*\.html;.*\.css;.*\.txt;"/>
<ClusterListener className="org.apache.catalina.ha.session.ClusterSessionListener"/>
</Cluster>


portal-ext.properties
jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc:postgresql://192.168.0.102:5432/liferaycloud
jdbc.default.username=liferayuser
jdbc.default.password=liferay

jdbc.default.maxPoolSize=100
jdbc.default.minPoolSize=10
jdbc.default.numHelperThreads=10

net.sf.ehcache.configurationResourceName=/ehcache/hibernate-clustered.xml
ehcache.multi.vm.config.location=/ehcache/liferay-multi-vm-clustered.xml
cluster.link.enabled=true
cluster.link.autodetect.address=192.168.0.102:5432


If I add a page in Liferay it shows up on the other server, so the LIferay clustering seems to work.
Juan Gonzalez
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 25, 2013 1:44 PM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2947

Join Date: October 28, 2008

Recent Posts

So seems cluster link and Liferay Cache is working, but replicated session are not.

Did you set <distributable/> in Liferay web.xml file?
Tim Solka
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 3:24 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

I set the distributable-tag in my jsf-app, do I have to do that in liferay to? If yes could you please give me the exact location of that file?

I guess after adding this restarting the server should be enough, correct?
Juan Gonzalez
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 3:37 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2947

Join Date: October 28, 2008

Recent Posts

I guess you have to, yep.

That file should be in Liferay WAR in WEB-INF, same as any J2EE web app.

/WEB-INF/web.xml

Yes, after changing it you'd only have to restart and you're done.
Tim Solka
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 4:06 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

Ok, but I have the bundled version. Do I have to download the Liferay-war-file now and copy it to the \deploy folder?

Or do I have to install Liferay manually on a fresh tomcat?

I was hoping for a way without having to redeploy Liferay, is that possible?
Juan Gonzalez
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 4:31 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2947

Join Date: October 28, 2008

Recent Posts

What bundled version do you have?
Tim Solka
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 4:34 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

The name of the zip file is:
liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558
Juan Gonzalez
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 4:50 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2947

Join Date: October 28, 2008

Recent Posts

Ok, web.xml should be here:

<LIFERAY>/tomcat-7.0.27/webapps/ROOT/WEB-INF/web.xml
Tim Solka
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 5:01 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

Will try and report back!

Thank you very much!
Tim Solka
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 5:33 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

I get no error anymore, but when I change the server (by shutting one down) I get a new JSESSIONID assigned so I can't test if the replication works.

Any idea how to keep the JSESSIONID? Does that mean the session is not replicated?
Juan Gonzalez
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 5:37 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2947

Join Date: October 28, 2008

Recent Posts

Yes, session replicationj could be not working properly.

You can download clusterjsp sample so you can test if session is replicated:

https://community.jboss.org/servlet/JiveServlet/download/588259-27006/clusterjsp.war
Tim Solka
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 8:22 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

Since the Jboss test app you posted isn't a portlet I installed the tomcat manager app and checked the sessions there. It doesn't show the session of the other nodes, so I guess session replication is really not working.

Any idea why and how I can fix this? Multicast, ping etc work fine.
Juan Gonzalez
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 8:24 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2947

Join Date: October 28, 2008

Recent Posts

Sorry, I can't help you much there. Just check you tomcat config in apache forums to see how people are enabling Tomcat clustering and session replication.
Tim Solka
RE: Tomcat Cluster: "You do not have permission to access this resource" er
May 26, 2013 8:46 AM
Answer

Tim Solka

Rank: New Member

Posts: 13

Join Date: May 3, 2013

Recent Posts

Ok no problem.

Thank you very much, setting the distributable-tag in Liferay was worth to mention. Haven't seen this anywhere in the docs.