SEVERE: Manager [localhost#/]: Unable to receive message through TCP channel
I am currently in the process of setting up a tomcat 6 clustered environment, liferay 6.0.6.
4 nodes with session replication. No sticky session.

So following the guide supplied on this site i did the following :

webapps/conf/context.xml added : <Context distributable="true">
webapps/ROOT/WEB-INF/web.xml added : <distributable /> to the top of the file, after the first bracket.
I also added distributable to all my custom portlets web.xml.
In setenv.sh : -Djava.net.preferIPv6Addresses=false -Djava.net.preferIPv4Stack=true

In webapps/conf/server.xml

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcatA" />

tomcatA/B/C/D accross the nodes.

    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
        channelSendOptions="8">
        <Manager className="org.apache.catalina.ha.session.DeltaManager"
            expireSessionsOnShutdown="false" notifyListenersOnReplication="true" />
        <Channel className="org.apache.catalina.tribes.group.GroupChannel">
            <Membership className="org.apache.catalina.tribes.membership.McastService"
                address="228.0.0.10" port="45564" frequency="500" dropTime="3000" />
            <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                address="auto" port="4000" autoBind="100" selectorTimeout="5000"
                maxThreads="6" />
            <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
                <Transport
                    className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" timeout="30000" />
            </Sender>
            <Interceptor
                className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector" />
                <Interceptor
                className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor" />
        </Channel>
        <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
            filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.css;.*\.txt;" />
        <ClusterListener
            className="org.apache.catalina.ha.session.ClusterSessionListener" />
    </Cluster>

At startup each node detects each other and it seems to work. However , when someone tries to modify the webcontent we get an error:

    SEVERE: Manager [localhost#/]: Unable to receive message through TCP channel
    java.lang.IllegalStateException: setAttribute: Session already invalidated
        at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1326)
        at org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:594)
        at org.apache.catalina.ha.session.DeltaRequest.execute(DeltaRequest.java:164)
        at org.apache.catalina.ha.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1487)
        at org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1437)
        at org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1171)
        at org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:92)
        at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:901)
        at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:882)
        at org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:269)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
        at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:110)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
            at org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:241)
        at org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:225)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:188)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:91)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
    
my liferay-ext.properties :
    
 

       
    
    cluster.link.autodetect.address=www.google.com:80
    lucene.replicate.write=true
    cluster.link.enabled=true
    
    net.sf.ehcache.configurationResourceName=/cache/hibernate-clustered.xml
    ehcache.multi.vm.config.location=/cache/liferay-multi-vm-clustered.xml
    

Ive also created a jsp on all nodes 

    
    <td>
      Session ID</td>
    <td><%= session.getId() %></td>
    <% session.setAttribute("abc","abc"); %>
    </tr>
    <tr>
    <td>
      Created on</td>
      <td><%= new java.util.Date(session.getCreationTime()).toString() %></td>
    </tr>
    </table>
    </body>
    </html>

With the same user i can switch servers and the session seems to be replicated without problems. However i still get the stacktrace when i go modify something in liferay.

Ive been stuck for a while now.
We have checked that all servers and JVM times are synched correctly with the NTP server.
No ports are blocked. The server does not have access to the internet.
They are all running on VM.

Anybody has any ideas what im doing wrong ??

thank you.







SEVERE: Manager [localhost#/]: Unable to receive message through TCP channel
===

I am currently in the process of setting up a tomcat 6 clustered environment, liferay 6.0.6.
4 nodes with session replication. No sticky session.

So following the guide supplied on this site i did the following :

webapps/conf/context.xml added : <Context distributable="true">
webapps/ROOT/WEB-INF/web.xml added : <distributable /> to the top of the file, after the first bracket.
I also added distributable to all my custom portlets web.xml.
In setenv.sh : -Djava.net.preferIPv6Addresses=false -Djava.net.preferIPv4Stack=true

In webapps/conf/server.xml

    <Engine name="Catalina" defaultHost="localhost" jvmRoute="tomcatA" />

tomcatA/B/C/D accross the nodes.

    <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"
        channelSendOptions="8">
        <Manager className="org.apache.catalina.ha.session.DeltaManager"
            expireSessionsOnShutdown="false" notifyListenersOnReplication="true" />
        <Channel className="org.apache.catalina.tribes.group.GroupChannel">
            <Membership className="org.apache.catalina.tribes.membership.McastService"
                address="228.0.0.10" port="45564" frequency="500" dropTime="3000" />
            <Receiver className="org.apache.catalina.tribes.transport.nio.NioReceiver"
                address="auto" port="4000" autoBind="100" selectorTimeout="5000"
                maxThreads="6" />
            <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter">
                <Transport
                    className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" timeout="30000" />
            </Sender>
            <Interceptor
                className="org.apache.catalina.tribes.group.interceptors.TcpFailureDetector" />
                <Interceptor
                className="org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor" />
        </Channel>
        <Valve className="org.apache.catalina.ha.tcp.ReplicationValve"
            filter=".*\.gif;.*\.js;.*\.jpg;.*\.png;.*\.css;.*\.txt;" />
        <ClusterListener
            className="org.apache.catalina.ha.session.ClusterSessionListener" />
    </Cluster>

At startup each node detects each other and it seems to work. However , when someone tries to modify the webcontent we get an error:

    SEVERE: Manager [localhost#/]: Unable to receive message through TCP channel
    java.lang.IllegalStateException: setAttribute: Session already invalidated
        at org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1326)
        at org.apache.catalina.ha.session.DeltaSession.setAttribute(DeltaSession.java:594)
        at org.apache.catalina.ha.session.DeltaRequest.execute(DeltaRequest.java:164)
        at org.apache.catalina.ha.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1487)
        at org.apache.catalina.ha.session.DeltaManager.messageReceived(DeltaManager.java:1437)
        at org.apache.catalina.ha.session.DeltaManager.messageDataReceived(DeltaManager.java:1171)
        at org.apache.catalina.ha.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java:92)
        at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:901)
        at org.apache.catalina.ha.tcp.SimpleTcpCluster.messageReceived(SimpleTcpCluster.java:882)
        at org.apache.catalina.tribes.group.GroupChannel.messageReceived(GroupChannel.java:269)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
        at org.apache.catalina.tribes.group.interceptors.TcpFailureDetector.messageReceived(TcpFailureDetector.java:110)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
        at org.apache.catalina.tribes.group.ChannelInterceptorBase.messageReceived(ChannelInterceptorBase.java:79)
            at org.apache.catalina.tribes.group.ChannelCoordinator.messageReceived(ChannelCoordinator.java:241)
        at org.apache.catalina.tribes.transport.ReceiverBase.messageDataReceived(ReceiverBase.java:225)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.drainChannel(NioReplicationTask.java:188)
        at org.apache.catalina.tribes.transport.nio.NioReplicationTask.run(NioReplicationTask.java:91)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
    
my liferay-ext.properties :
    
 

       
    
    cluster.link.autodetect.address=www.google.com:80
    lucene.replicate.write=true
    cluster.link.enabled=true
    
    net.sf.ehcache.configurationResourceName=/cache/hibernate-clustered.xml
    ehcache.multi.vm.config.location=/cache/liferay-multi-vm-clustered.xml
    

Ive also created a jsp on all nodes 

    
    <td>
      Session ID</td>
    <td><%= session.getId() %></td>
    <% session.setAttribute("abc","abc"); %>
    </tr>
    <tr>
    <td>
      Created on</td>
      <td><%= new java.util.Date(session.getCreationTime()).toString() %></td>
    </tr>
    </table>
    </body>
    </html>

With the same user i can switch servers and the session seems to be replicated without problems. However i still get the stacktrace when i go modify something in liferay.

Ive been stuck for a while now.
We have checked that all servers and JVM times are synched correctly with the NTP server.
No ports are blocked. The server does not have access to the internet.
They are all running on VM.

Anybody has any ideas what im doing wrong ??

thank you.






