help!! httpsession replicate problem
badicao Sep 20, 2004 4:30 AMi setup up two jboss cluster server,version jboss3.2release3,but always have replication httpsession error,like below.really need ur help.tks.
(1)console error :
16:28:22,062 WARN [InstantSnapshotManager] Failed to replicate sessionID:KYVjtida0YS00krx
yui1cA**
javax.ejb.EJBException: Exception in setHttpSession: java.lang.NullPointerException
at org.jboss.ha.httpsession.server.ClusteredHTTPSessionService.setHttpSession(Clus
teredHTTPSessionService.java:117)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja
va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatche
r.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy102.setHttpSession(Unknown Source)
at org.jboss.web.tomcat.session.ClusterManager.storeSession(ClusterManager.java:61
5)
at org.jboss.web.tomcat.session.InstantSnapshotManager.snapshot(InstantSnapshotMan
ager.java:39)
at org.jboss.web.tomcat.session.ClusteredSessionValve.invoke(ClusteredSessionValve
.java:89)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe
xt(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNe
xt(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.jav
(2)jk workers.properties:
worker.list=loadbalancer
# Set properties for worker1
worker.worker1.type=ajp13
worker.worker1.host=192.168.0.63
worker.worker1.port=8009
worker.worker1.lbfactor=1
worker.worker1.local_worker=1
# Set properties for worker2
worker.worker2.type=ajp13
worker.worker2.host=192.168.0.92
worker.worker2.port=8009
worker.worker2.lbfactor=1
worker.worker2.local_worker=1
# Set properties for lb which use worker1 and worker2
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=worker1,worker2
worker.loadbalancer.sticky_session=1
worker.loadbalancer.local_worker_only=1
(3)cluster-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ===================================================================== -->
<!-- -->
<!-- Sample Clustering Service Configuration -->
<!-- -->
<!-- ===================================================================== -->
<!-- ==================================================================== -->
<!-- Cluster Partition: defines cluster -->
<!-- ==================================================================== -->
<!-- Name of the partition being built -->
DefaultPartition
<!-- Determine if deadlock detection is enabled -->
False
<!-- The JGroups protocol configuration -->
<!-- UDP: if you have a multihomed machine,
set the bind_addr attribute to the appropriate NIC IP address -->
<!-- UDP: On Windows machines, because of the media sense feature
being broken with multicast (even after disabling media sense)
set the loopback attribute to true -->
<UDP mcast_addr="192.168.0.0" mcast_port="45566"
ip_ttl="64" ip_mcast="true"
mcast_send_buf_size="150000" mcast_recv_buf_size="80000"
ucast_send_buf_size="150000" ucast_recv_buf_size="80000"
loopback="true" />
<PING timeout="2000" num_initial_members="3"
up_thread="true" down_thread="true" />
<MERGE2 min_interval="5000" max_interval="10000" />
<FD shun="true" up_thread="true" down_thread="true"
timeout="2500" max_tries="5" />
<VERIFY_SUSPECT timeout="3000" num_msgs="3"
up_thread="true" down_thread="true" />
<pbcast.NAKACK gc_lag="50" retransmit_timeout="300,600,1200,2400,4800"
up_thread="true" down_thread="true" />
<pbcast.STABLE desired_avg_gossip="20000"
up_thread="true" down_thread="true" />
<UNICAST timeout="5000" window_size="100" min_threshold="10"
down_thread="true" />
<FRAG frag_size="8192"
down_thread="true" up_thread="true" />
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true" />
<pbcast.STATE_TRANSFER up_thread="true" down_thread="true" />
<!-- ==================================================================== -->
<!-- HA Session State Service for SFSB -->
<!-- ==================================================================== -->
jboss:service=DefaultPartition
<!-- Name of the partition to which the service is linked -->
DefaultPartition
<!-- JNDI name under which the service is bound -->
/HASessionState/Default
<!-- Max delay before cleaning unreclaimed state.
Defaults to 30*60*1000 => 30 minutes -->
0
<!-- ==================================================================== -->
<!-- HA JNDI -->
<!-- ==================================================================== -->
jboss:service=DefaultPartition
<!-- Name of the partition to which the service is linked -->
DefaultPartition
<!-- bind address of HA JNDI RMI endpoint -->
${jboss.bind.address}
<!-- RmiPort to be used by the HA-JNDI service
once bound. 0 => auto. -->
0
<!-- Port on which the HA-JNDI stub is made available -->
1100
<!-- Backlog to be used for client-server RMI
invocations during JNDI queries -->
50
<!-- Multicast Address and Group used for auto-discovery -->
192.168.0.0
1102
<!-- IP Address to which should be bound: the Port, the RmiPort and
the AutoDiscovery multicast socket. -->
<!-- Client socket factory to be used for client-server
RMI invocations during JNDI queries -->
<!--attribute name="ClientSocketFactory">custom</attribute-->
<!-- Server socket factory to be used for client-server
RMI invocations during JNDI queries -->
<!--attribute name="ServerSocketFactory">custom</attribute-->
${jboss.bind.address}
<!--
0
custom
custom
-->
<!-- ==================================================================== -->
<!-- Distributed cache invalidation -->
<!-- ==================================================================== -->
jboss:service=DefaultPartition
jboss.cache:service=InvalidationManager
jboss.cache:service=InvalidationManager
DefaultPartition
DefaultJGBridge