You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2006/11/02 22:37:08 UTC

DO NOT REPLY [Bug 40881] New: - Unable to receive message through TCP channel -> Nullpointer

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881

           Summary: Unable to receive message through  TCP channel ->
                    Nullpointer
           Product: Tomcat 5
           Version: 5.5.20
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina:Cluster
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: paul.hettl@mindmatics.com


- Message replication failes on the replciated node on creation of
  a new session (login via form authentication).

-  async cluster configruation is active

- 2 cluster nodes

- statup executed one by one, the second node was added after the first was up fully

- is fully reproducable

Error LOG:
----------------------------------------------------

Unable to receive message through  TCP channel
 java.lang.NullPointerException
        at
org.apache.catalina.cluster.session.DeltaRequest.execute(DeltaRequest.java:176)
        at
org.apache.catalina.cluster.session.DeltaManager.handleSESSION_DELTA(DeltaManager.java:1573)
        at
org.apache.catalina.cluster.session.DeltaManager.messageReceived(DeltaManager.java:1522)
        at
org.apache.catalina.cluster.session.DeltaManager.messageDataReceived(DeltaManager.java:1271)
        at
org.apache.catalina.cluster.session.ClusterSessionListener.messageReceived(ClusterSessionListener.java
:85)
        at
org.apache.catalina.cluster.tcp.SimpleTcpCluster.receive(SimpleTcpCluster.java:1167)
        at
org.apache.catalina.cluster.tcp.ClusterReceiverBase.messageDataReceived(ClusterReceiverBase.java:426)
        at
org.apache.catalina.cluster.io.ObjectReader.execute(ObjectReader.java:107)
        at
org.apache.catalina.cluster.tcp.TcpReplicationThread.drainChannel(TcpReplicationThread.java:138)
        at
org.apache.catalina.cluster.tcp.TcpReplicationThread.run(TcpReplicationThread.java:69)



cluster confirguation:
----------------------------------------------------
   <Cluster  className="org.apache.catalina.cluster.tcp.SimpleTcpCluster"
                                         doClusterLog="true"
                                         clusterLogName="clusterlog"
                                         useDirtyFlag="true"
                                         expireSessionsOnShutdown="false"
                                         notifyListenersOnReplication="true"
                                        
managerClassName="org.apache.catalina.cluster.session.DeltaManager"
                                        >
               <Membership 
className="org.apache.catalina.cluster.mcast.McastService"
                                                          mcastAddr="228.0.0.4"
                                                          mcastPort="45552"
                                                          mcastFrequency="500"
                                                          mcastDropTime="3000"/>
               <Receiver
className="org.apache.catalina.cluster.tcp.ReplicationListener"
                              tcpListenAddress="auto"
                              tcpListenPort="4001"
                              tcpSelectorTimeout="100"
                              tcpThreadCount="6" />

<!--
               <Sender
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                             replicationMode="pooled"
                             ackTimeout="15000"
                             waitForAck="false" />
-->
        <Sender
                       
className="org.apache.catalina.cluster.tcp.ReplicationTransmitter"
                        replicationMode="asynchronous"
                        doProcessingStats="true"
                        doWaitAckStats="true"
                        waitForAck="true"
                        ackTimeout="30000"
                        resend="true"
                        keepAliveTimeout="320000"
                        keepAliveMaxRequestCount="-1" />

               <Valve className="org.apache.catalina.cluster.tcp.ReplicationValve"
                             
filter=".*\.gif;.*\.js;.*\.css;.*\.png;.*\.jpeg;.*\.jpg;.*\.htm;.*\.html;.*\.txt;"
                              primaryIndicator="true" />

         <!--
                  <Deployer               
className="org.apache.catalina.cluster.deploy.FarmWarDeployer"
                                            tempDir="${catalina.base}/war-temp"
                                          deployDir="${catalina.base}/war-deploy/"
                                           watchDir="${catalina.base}/war-listen/"
                                       watchEnabled="true"/>
          -->
      </Cluster>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881





------- Additional Comments From paul.hettl@mindmatics.com  2006-11-03 05:29 -------
Created an attachment (id=19079)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19079&action=view)
DeltaRequest (5.5.20)

use java serialisation

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881





------- Additional Comments From paul.hettl@mindmatics.com  2006-11-03 05:30 -------
Created an attachment (id=19080)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19080&action=view)
added

added util class for java serialisation. old code is still as comment availbale

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881





------- Additional Comments From paul.hettl@mindmatics.com  2006-11-04 01:06 -------
(In reply to comment #9)

I use an own realm, simlarf to jdbc realm, that creats a principal that is 
serializable and only derived from from java.security.Principal.

As we also use caucho (resin) the have the authentication modules implemented 
to be independet from the application server type.

The realm supports a unix crypt password encryption.

I would recomment strongly to make the cluster feature independet from the 
GenericPrincipal as it is to string coupled to tomcat this way.

Why don't keep both option or adding a serilaizer factory with a configuration
property in the server.xml to choose the serilaizer class ?






-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881





------- Additional Comments From paul.hettl@mindmatics.com  2006-11-03 05:32 -------
Created an attachment (id=19082)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19082&action=view)
binary of the cluster  module sources

- binary of the cluster  module sources
- complied Win XP, JDK 1.5.0_05
- including the 4 patches found as sources


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881


paul.hettl@mindmatics.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From paul.hettl@mindmatics.com  2006-11-03 05:26 -------
The problem is caused by the interlan implementaion of tomcat's cluster
replciation  DeltaSession. The cluster works only with Principal object derived
from the "org.apache.catalina.realm.GenericPrincipal".

I use an one principal implementation, just as implementation of
java.security.Principal. This avoid any conatiner specific dependencies in the
web applications and works around serval problems with the out of the box
principals of tomcat.

To get rid of the bug, i changed the cluster.session code to get rid of the
SerializablePrincipal  class. To my readings this class is not very well 
designed. The optimised serilaisation can also be places in the implmenetion of
the principal interface ( read/write object) method of java serialisation.

As quick work around, find the changed classes in the attachment:
CHANGED: SimpleTcpReplicationManager
	 DeltaSession
ADDED:   PrincipalIO



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881





------- Additional Comments From paul.hettl@mindmatics.com  2006-11-03 05:30 -------
Created an attachment (id=19081)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19081&action=view)
SimpleTcpReplicationManager  (5.5.20)

use java serilaisation

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881


pr@objektpark.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Additional Comments From pr@objektpark.de  2006-11-03 11:35 -------
Hups, I need info and bug is not closed.
Sorry!


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881


pr@objektpark.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From pr@objektpark.de  2006-11-03 11:34 -------
I have deeper looked at your patch. Arrg!
Not every Principal that we used implements the java.io.Serializable. Which realm you used?

Peter



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881





------- Additional Comments From pr@objektpark.de  2006-11-03 11:26 -------
Please produce a really patch and don't send complete patch files.

Then it is easier to help you,

Peter

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 40881] - Unable to receive message through TCP channel -> Nullpointer

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40881>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40881





------- Additional Comments From paul.hettl@mindmatics.com  2006-11-03 05:28 -------
Created an attachment (id=19078)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19078&action=view)
DeltaSession  patched (5.5.20) 

use plain java serialisation

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org