Session not replicated in JBoss 3.2.6
cristibuta May 12, 2005 4:57 AMHello everybody,
I hope somebody can help me solve this problem.
I'm using Jboss 3.2.6 in a clustered environment. I have 2 JBoss 3.2.6 instances running on 2 different computers, with the IPs 192.168.1.2 and 192.168.1.254.
I start them using "./run.sh -b 192.168.1.254 -c all", and with "./run.sh -b 192.168.1.254 -c all", and I have the following output:
./run.sh -b 192.168.1.254 -c all ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /home/nethost/progs/jboss-3.2.6 JAVA: /usr/java/j2sdk1.4.2_04/bin/java JAVA_OPTS: -server -Dprogram.name=run.sh CLASSPATH: /home/nethost/progs/jboss-3.2.6/bin/run.jar:/usr/java/j2sdk1.4.2_04/lib/tools.jar ========================================================================= 11:33:45,122 INFO [Server] Starting JBoss (MX MicroKernel)... 11:33:45,124 INFO [Server] Release ID: JBoss [WonderLand] 3.2.6 (build: CVSTag=JBoss_3_2_6 date=200410140106) 11:33:45,125 INFO [Server] Home Dir: /home/nethost/progs/jboss-3.2.6 11:33:45,125 INFO [Server] Home URL: file:/home/nethost/progs/jboss-3.2.6/ 11:33:45,125 INFO [Server] Library URL: file:/home/nethost/progs/jboss-3.2.6/lib/ 11:33:45,127 INFO [Server] Patch URL: null 11:33:45,127 INFO [Server] Server Name: all 11:33:45,128 INFO [Server] Server Home Dir: /home/nethost/progs/jboss-3.2.6/server/all 11:33:45,128 INFO [Server] Server Home URL: file:/home/nethost/progs/jboss-3.2.6/server/all/ 11:33:45,128 INFO [Server] Server Data Dir: /home/nethost/progs/jboss-3.2.6/server/all/data 11:33:45,129 INFO [Server] Server Temp Dir: /home/nethost/progs/jboss-3.2.6/server/all/tmp 11:33:45,129 INFO [Server] Server Config URL: file:/home/nethost/progs/jboss-3.2.6/server/all/conf/ 11:33:45,130 INFO [Server] Server Library URL: file:/home/nethost/progs/jboss-3.2.6/server/all/lib/ 11:33:45,130 INFO [Server] Root Deployment Filename: jboss-service.xml 11:33:45,134 INFO [Server] Starting General Purpose Architecture (GPA)... 11:33:45,724 INFO [ServerInfo] Java version: 1.4.2_04,Sun Microsystems Inc. 11:33:45,724 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.4.2_04-b05,Sun Microsystems Inc. 11:33:45,725 INFO [ServerInfo] OS-System: Linux 2.6.10-1.771_FC2,i386 11:33:46,290 INFO [Server] Core system initialized 11:33:52,804 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml 11:33:53,033 INFO [WebService] Using RMI server codebase: http://192.168.1.254:8083/ 11:33:54,335 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/192.168.1.254, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076 11:34:03,472 INFO [RARMetaData] Loading JBoss Resource Adapter for JDBC 2 XA drivers 11:34:03,473 INFO [RARMetaData] Required license terms present. See deployment descriptor. 11:34:06,971 INFO [DefaultPartition] Initializing 11:34:07,129 INFO [UDP] unicast sockets will use interface 192.168.1.254 11:34:07,138 INFO [UDP] socket information: local_addr=192.168.1.254:32995 (additional data: 18 bytes), mcast_addr=228.1.2.5:45566, bind_addr=/192.168.1.254, ttl=32 sock: bound to 192.168.1.254:32995, receive buffer size=110592, send buffer size=110592 mcast_recv_sock: bound to 192.168.1.254:45566, send buffer size=110592, receive buffer size=110592 mcast_send_sock: bound to 192.168.1.254:32996, send buffer size=110592, receive buffer size=110592 11:34:07,141 INFO [STDOUT] ------------------------------------------------------- GMS: address is 192.168.1.254:32995 (additional data: 18 bytes) ------------------------------------------------------- 11:34:09,172 INFO [DefaultPartition] Number of cluster members: 1 11:34:09,172 INFO [DefaultPartition] Other members: 0 11:34:09,172 INFO [DefaultPartition] Fetching state (will wait for 60000 milliseconds): 11:34:09,185 INFO [DefaultPartition] New cluster view for partition DefaultPartition (id: 0, delta: 0) : [192.168.1.254:1099] 11:34:09,187 INFO [DefaultPartition] I am (192.168.1.254:1099) received membershipChanged event: 11:34:09,187 INFO [DefaultPartition] Dead members: 0 ([]) 11:34:09,187 INFO [DefaultPartition] New Members : 0 ([]) 11:34:09,187 INFO [DefaultPartition] All Members : 1 ([192.168.1.254:1099]) 11:34:09,269 INFO [HANamingService] Listening on /192.168.1.254:1100 11:34:09,274 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /192.168.1.254:1102, group=230.0.0.4, HA-JNDI address=192.168.1.254:1100 11:34:13,268 INFO [interceptors] InterceptorManager started with 0 SIs, 0 CIs and 2 IORIs 11:34:13,444 INFO [orb] ORB run 11:34:13,603 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E300000000000020000000000000068000102000000000E3139322E3136382E312E323534000DC8000000114A426F73732F4E616D696E672F726F6F74000000000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001] 11:34:14,142 INFO [MailService] Mail Service bound to java:/Mail 11:34:14,523 INFO [TreeCache] setClusterConfig(): setting cluster properties from xml to: UDP(bind_addr=192.168.1.254;ip_mcast=true;ip_ttl=64;loopback=false;mcast_addr=230.1.2.3;mcast_port=45577;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true) 11:34:14,545 INFO [TreeCache] interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.ReplicationInterceptor class org.jboss.cache.interceptors.TransactionInterceptor 11:34:14,545 INFO [TreeCache] cache mode is REPL_ASYNC 11:34:14,584 INFO [UDP] unicast sockets will use interface 192.168.1.254 11:34:14,588 INFO [UDP] socket information: local_addr=192.168.1.254:32998, mcast_addr=230.1.2.3:45577, bind_addr=/192.168.1.254, ttl=64 sock: bound to 192.168.1.254:32998, receive buffer size=80000, send buffer size=110592 mcast_recv_sock: bound to 192.168.1.254:45577, send buffer size=110592, receive buffer size=80000 mcast_send_sock: bound to 192.168.1.254:32999, send buffer size=110592, receive buffer size=80000 11:34:14,590 INFO [STDOUT] ------------------------------------------------------- GMS: address is 192.168.1.254:32998 ------------------------------------------------------- 11:34:16,594 INFO [TreeCache] viewAccepted(): new members: [192.168.1.254:32998] 11:34:16,595 INFO [TreeCache] new cache is null (maybe first member in cluster) 11:34:16,595 INFO [TreeCache] state could not be retrieved (must be first member in group) 11:34:17,636 INFO [Embedded] Catalina naming disabled 11:34:20,471 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-192.168.1.254-8081 11:34:20,520 INFO [Catalina] Initialization processed in 2543 ms 11:34:20,521 INFO [StandardService] Starting service jboss.web 11:34:20,527 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.28 11:34:20,552 INFO [StandardHost] XML validation disabled 11:34:20,558 INFO [Engine] SingleSignOn[localhost]: Started 11:34:20,618 INFO [Catalina] Server startup in 97 ms 11:34:20,619 INFO [Tomcat5] Setting the cache name to jboss.cache:service=TomcatClusteringCache on jboss.web:type=Valve,name=ClusteredSingleSignOn,host=localhost 11:34:20,985 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=file:/home/nethost/progs/jboss-3.2.6/server/all/deploy/http-invoker.sar/invoker.war/ 11:34:22,458 INFO [TomcatDeployer] deploy, ctxPath=/jboss-net, warUrl=file:/home/nethost/progs/jboss-3.2.6/server/all/deploy/jboss-net.sar/jboss-net.war/ 11:34:23,012 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/home/nethost/progs/jboss-3.2.6/server/all/deploy/jbossweb-tomcat50.sar/ROOT.war/ 11:34:23,541 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=file:/home/nethost/progs/jboss-3.2.6/server/all/deploy-hasingleton/jms/jbossmq-httpil.sar/jbossmq-httpil.war/ 11:34:23,878 INFO [DefaultDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=DefaultDS to JNDI name 'java:/DefaultDS' 11:34:24,303 INFO [A] Bound to JNDI name: queue/A 11:34:24,306 INFO [B] Bound to JNDI name: queue/B 11:34:24,308 INFO [C] Bound to JNDI name: queue/C 11:34:24,311 INFO [D] Bound to JNDI name: queue/D 11:34:24,313 INFO [ex] Bound to JNDI name: queue/ex 11:34:24,348 INFO [testTopic] Bound to JNDI name: topic/testTopic 11:34:24,351 INFO [securedTopic] Bound to JNDI name: topic/securedTopic 11:34:24,353 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic 11:34:24,364 INFO [testQueue] Bound to JNDI name: queue/testQueue 11:34:24,788 INFO [OILServerILService] JBossMQ OIL service available at : /192.168.1.254:8090 11:34:24,864 INFO [UILServerILService] JBossMQ UIL service available at : /192.168.1.254:8093 11:34:24,978 INFO [DLQ] Bound to JNDI name: queue/DLQ 11:34:25,002 INFO [JmsXA] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=TxCM,name=JmsXA to JNDI name 'java:/JmsXA' 11:34:25,006 INFO [NethostDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=NethostDS to JNDI name 'java:/NethostDS' 11:34:25,065 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/home/nethost/progs/jboss-3.2.6/server/all/deploy/jmx-console.war/ 11:34:25,501 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/home/nethost/progs/jboss-3.2.6/server/all/deploy/management/web-console.war/ 11:34:26,484 INFO [TomcatDeployer] deploy, ctxPath=/test, warUrl=file:/home/nethost/progs/jboss-3.2.6/server/all/tmp/deploy/tmp31441test.war/ 11:34:26,551 INFO [JBossCacheManager] init(): replicationGranularity_ is 1 and invaldateSessionPolicy is 2 11:34:26,842 INFO [JBossCacheManager] Starting JBossManager 11:34:28,903 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-192.168.1.254-8081 11:34:29,167 INFO [ChannelSocket] JK2: ajp13 listening on /192.168.1.254:8009 11:34:29,189 INFO [JkMain] Jk running ID=0 time=0/48 config=null 11:34:29,242 INFO [Server] JBoss (MX MicroKernel) [3.2.6 (build: CVSTag=JBoss_3_2_6 date=200410140106)] Started in 43s:724ms 11:35:04,256 INFO [DefaultPartition] New cluster view for partition DefaultPartition (id: 1, delta: 1) : [192.168.1.254:1099, 192.168.1.2:1099] 11:35:04,256 INFO [DefaultPartition] I am (192.168.1.254:1099) received membershipChanged event: 11:35:04,256 INFO [DefaultPartition] Dead members: 0 ([]) 11:35:04,256 INFO [DefaultPartition] New Members : 1 ([192.168.1.2:1099]) 11:35:04,257 INFO [DefaultPartition] All Members : 2 ([192.168.1.254:1099, 192.168.1.2:1099]) 11:35:13,443 INFO [TreeCache] viewAccepted(): new members: [192.168.1.254:32998, 192.168.1.2:32878] 11:35:13,471 INFO [TreeCache] locking the tree to obtain transient state 11:35:13,478 INFO [TreeCache] returning the transient state (217 bytes)
and
./run.sh -b 192.168.1.2 -c all ========================================================================= JBoss Bootstrap Environment JBOSS_HOME: /work/programs/jboss-3.2.6 JAVA: /usr/java/j2sdk1.4.2_04//bin/java JAVA_OPTS: -server -Dprogram.name=run.sh CLASSPATH: /work/programs/jboss-3.2.6/bin/run.jar:/usr/java/j2sdk1.4.2_04//lib/tools.jar ========================================================================= 11:37:49,390 INFO [Server] Starting JBoss (MX MicroKernel)... 11:37:49,393 INFO [Server] Release ID: JBoss [WonderLand] 3.2.6 (build: CVSTag=JBoss_3_2_6 date=200410140106) 11:37:49,394 INFO [Server] Home Dir: /work/programs/jboss-3.2.6 11:37:49,395 INFO [Server] Home URL: file:/work/programs/jboss-3.2.6/ 11:37:49,395 INFO [Server] Library URL: file:/work/programs/jboss-3.2.6/lib/ 11:37:49,398 INFO [Server] Patch URL: null 11:37:49,399 INFO [Server] Server Name: all 11:37:49,399 INFO [Server] Server Home Dir: /work/programs/jboss-3.2.6/server/all 11:37:49,400 INFO [Server] Server Home URL: file:/work/programs/jboss-3.2.6/server/all/ 11:37:49,401 INFO [Server] Server Data Dir: /work/programs/jboss-3.2.6/server/all/data 11:37:49,402 INFO [Server] Server Temp Dir: /work/programs/jboss-3.2.6/server/all/tmp 11:37:49,404 INFO [Server] Server Config URL: file:/work/programs/jboss-3.2.6/server/all/conf/ 11:37:49,405 INFO [Server] Server Library URL: file:/work/programs/jboss-3.2.6/server/all/lib/ 11:37:49,406 INFO [Server] Root Deployment Filename: jboss-service.xml 11:37:49,411 INFO [Server] Starting General Purpose Architecture (GPA)... 11:37:50,224 INFO [ServerInfo] Java version: 1.4.2_04,Sun Microsystems Inc. 11:37:50,225 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 1.4.2_04-b05,Sun Microsystems Inc. 11:37:50,225 INFO [ServerInfo] OS-System: Linux 2.6.10-1.771_FC2,i386 11:37:50,966 INFO [Server] Core system initialized 11:37:58,482 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml 11:37:58,786 INFO [WebService] Using RMI server codebase: http://192.168.1.2:8083/ 11:38:00,141 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/192.168.1.2, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076 11:38:12,405 INFO [RARMetaData] Loading JBoss Resource Adapter for JDBC 2 XA drivers 11:38:12,407 INFO [RARMetaData] Required license terms present. See deployment descriptor. 11:38:17,893 INFO [DefaultPartition] Initializing 11:38:18,164 INFO [UDP] unicast sockets will use interface 192.168.1.2 11:38:18,184 INFO [UDP] socket information: local_addr=192.168.1.2:32872 (additional data: 16 bytes), mcast_addr=228.1.2.5:45566, bind_addr=/192.168.1.2, ttl=32 sock: bound to 192.168.1.2:32872, receive buffer size=131071, send buffer size=131071 mcast_recv_sock: bound to 192.168.1.2:45566, send buffer size=131071, receive buffer size=131071 mcast_send_sock: bound to 192.168.1.2:32873, send buffer size=131071, receive buffer size=131071 11:38:18,203 INFO [STDOUT] ------------------------------------------------------- GMS: address is 192.168.1.2:32872 (additional data: 16 bytes) ------------------------------------------------------- 11:38:20,575 INFO [DefaultPartition] Number of cluster members: 2 11:38:20,576 INFO [DefaultPartition] Other members: 1 11:38:20,576 INFO [DefaultPartition] Fetching state (will wait for 60000 milliseconds): 11:38:20,587 INFO [DefaultPartition] New cluster view for partition DefaultPartition: 1 ([192.168.1.254:1099, 192.168.1.2:1099] delta: 0) 11:38:20,592 INFO [DefaultPartition] I am (null) received membershipChanged event: 11:38:20,592 INFO [DefaultPartition] Dead members: 0 ([]) 11:38:20,592 INFO [DefaultPartition] New Members : 0 ([]) 11:38:20,593 INFO [DefaultPartition] All Members : 2 ([192.168.1.254:1099, 192.168.1.2:1099]) 11:38:21,176 INFO [HANamingService] Listening on /192.168.1.2:1100 11:38:21,184 INFO [DetachedHANamingService$AutomaticDiscovery] Listening on /192.168.1.2:1102, group=230.0.0.4, HA-JNDI address=192.168.1.2:1100 11:38:23,206 INFO [interceptors] InterceptorManager started with 0 SIs, 0 CIs and 2 IORIs 11:38:23,536 INFO [orb] ORB run 11:38:23,855 INFO [CorbaNamingService] Naming: [IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E300000000000020000000000000068000102000000000C3139322E3136382E312E32000DC80000000000114A426F73732F4E616D696E672F726F6F74000000000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001] 11:38:25,538 INFO [MailService] Mail Service bound to java:/Mail 11:38:26,863 INFO [TreeCache] setClusterConfig(): setting cluster properties from xml to: UDP(bind_addr=192.168.1.2;ip_mcast=true;ip_ttl=64;loopback=false;mcast_addr=230.1.2.3;mcast_port=45577;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true) 11:38:27,139 INFO [TreeCache] interceptor chain is: class org.jboss.cache.interceptors.CallInterceptor class org.jboss.cache.interceptors.ReplicationInterceptor class org.jboss.cache.interceptors.TransactionInterceptor 11:38:27,140 INFO [TreeCache] cache mode is REPL_ASYNC 11:38:27,424 INFO [UDP] unicast sockets will use interface 192.168.1.2 11:38:27,445 INFO [UDP] socket information: local_addr=192.168.1.2:32878, mcast_addr=230.1.2.3:45577, bind_addr=/192.168.1.2, ttl=64 sock: bound to 192.168.1.2:32878, receive buffer size=80000, send buffer size=131071 mcast_recv_sock: bound to 192.168.1.2:45577, send buffer size=131071, receive buffer size=80000 mcast_send_sock: bound to 192.168.1.2:32880, send buffer size=131071, receive buffer size=80000 11:38:27,705 INFO [STDOUT] ------------------------------------------------------- GMS: address is 192.168.1.2:32878 ------------------------------------------------------- 11:38:29,720 INFO [TreeCache] viewAccepted(): new members: [192.168.1.254:32998, 192.168.1.2:32878] 11:38:29,786 INFO [TreeCache] received the state (size=269 bytes) 11:38:29,802 INFO [TreeCache] transient state: 217 bytes 11:38:29,805 INFO [TreeCache] setting transient state 11:38:29,824 INFO [TreeCache] locking the old tree 11:38:29,825 INFO [TreeCache] setState(): locking the old tree was successful 11:38:29,825 INFO [TreeCache] setting the transient state was successful 11:38:29,825 INFO [TreeCache] forcing release of all locks in old tree 11:38:29,825 INFO [TreeCache] state was retrieved successfully (in 106 milliseconds 11:38:31,673 INFO [Embedded] Catalina naming disabled 11:38:34,405 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-192.168.1.2-8080 11:38:34,682 INFO [Catalina] Initialization processed in 2761 ms 11:38:34,683 INFO [StandardService] Starting service jboss.web 11:38:34,691 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.28 11:38:34,850 INFO [StandardHost] XML validation disabled 11:38:34,858 INFO [Engine] SingleSignOn[localhost]: Started 11:38:35,277 INFO [Catalina] Server startup in 595 ms 11:38:35,279 INFO [Tomcat5] Setting the cache name to jboss.cache:service=TomcatClusteringCache on jboss.web:type=Valve,name=ClusteredSingleSignOn,host=localhost 11:38:35,676 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=file:/work/programs/jboss-3.2.6/server/all/deploy/http-invoker.sar/invoker.war/ 11:38:40,091 INFO [TomcatDeployer] deploy, ctxPath=/jboss-net, warUrl=file:/work/programs/jboss-3.2.6/server/all/deploy/jboss-net.sar/jboss-net.war/ 11:38:40,550 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/work/programs/jboss-3.2.6/server/all/deploy/jbossweb-tomcat50.sar/ROOT.war/ 11:38:40,975 INFO [DefaultDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=DefaultDS to JNDI name 'java:/DefaultDS' 11:38:41,148 INFO [JmsXA] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=TxCM,name=JmsXA to JNDI name 'java:/JmsXA' 11:38:41,154 INFO [NethostDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=NethostDS to JNDI name 'java:/NethostDS' 11:38:41,772 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/work/programs/jboss-3.2.6/server/all/deploy/jmx-console.war/ 11:38:42,242 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/work/programs/jboss-3.2.6/server/all/deploy/management/web-console.war/ 11:38:44,329 INFO [TomcatDeployer] deploy, ctxPath=/test, warUrl=file:/work/programs/jboss-3.2.6/server/all/tmp/deploy/tmp61106test.war/ 11:38:44,566 INFO [JBossCacheManager] init(): replicationGranularity_ is 1 and invaldateSessionPolicy is 2 11:38:44,849 INFO [JBossCacheManager] Starting JBossManager 11:38:45,216 INFO [FarmMemberService] **** pullNewDeployments **** 11:38:45,385 INFO [FarmMemberService] farmDeployment(), deploy locally: /work/programs/jboss-3.2.6/server/all/tmp/cluster-examples-service.xml 11:38:46,061 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-192.168.1.2-8080 11:38:46,581 INFO [ChannelSocket] JK2: ajp13 listening on /192.168.1.2:8009 11:38:46,589 INFO [JkMain] Jk running ID=0 time=0/39 config=null 11:38:46,720 INFO [Server] JBoss (MX MicroKernel) [3.2.6 (build: CVSTag=JBoss_3_2_6 date=200410140106)] Started in 56s:558ms
From my understanding, I think what I did so far is correct (mcast works, I also tested with the sender-receiver pair from jgroups), and the 2 JBoss instances can see each other as members in the same partition (so they should be able to communicate).
This is my jboss-service.xml:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd"> <!-- $Id: jboss-service-50.xml,v 1.1.1.1.2.18 2004/10/13 04:53:10 starksm Exp $ --> <server> <mbean code="org.jboss.web.tomcat.tc5.Tomcat5" name="jboss.web:service=WebServer"> <!-- The JAAS security domain to use in the absense of an explicit security-domain specification in the war WEB-INF/jboss-web.xml --> <attribute name="DefaultSecurityDomain">java:/jaas/other</attribute> <!-- Get the flag indicating if the normal Java2 parent first class loading model should be used over the servlet 2.3 web container first model. --> <attribute name="Java2ClassLoadingCompliance">true</attribute> <attribute name="LenientEjbLink">true</attribute> <!-- A flag indicating if the JBoss Loader should be used. This loader uses a unified class loader as the class loader rather than the tomcat specific class loader. --> <attribute name="UseJBossWebLoader">true</attribute> <!-- Class of the session manager (used if context is marked as 'distributable'. Currently allowed values: - org.jboss.web.tomcat.tc5.session.JBossCacheManager --> <attribute name="ManagerClass">org.jboss.web.tomcat.tc5.session.JBossCacheManager</attribute> <!-- The name of the request attribute under with the authenticated JAAS Subject is stored on successful authentication. If null or empty then the Subject will not be stored. --> <!-- <attribute name="SubjectAttributeName">j_subject</attribute> --> <!-- A flag indicating whether web-apps may set themselfs as privileged in their custom WEB-INF/context.xml context configuration. --> <!-- <attribute name="AllowSelfPrivilegedWebApps">false</attribute> --> <!-- The SessionIdAlphabet is the set of characters used to create a session Id It must be made up of exactly 65 unique characters <attribute name="SessionIdAlphabet">ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-*</attribute> --> <!-- ******************************************************* ****************** CLUSTERING ************************* ******************************************************* In order to activate HTTP Session clustering for Tomcat make sure you run JBoss's "all" configuration i.e. "run -c all" (the default configuration doesn't contain clustering) Furthermore, you may change SnapshotMode and SnapshotInterval attributes below to indicate when to synchronize changes with the other node(s). If you use Apache+mod_jk(2) you will most probably use the AJP1.3 connector below. Thus, if you so wish, you may comment (i.e. deactivate) the HTTP connector as it won't be used anymore. ******************************************************* ******************************************************* ******************************************************* --> <!-- If you are using clustering, the following two attributes define when the sessions are replicated to the other nodes. The default value, "instant", immediately replicates changes to the other nodes after each request. In this case, the "SnapshotInterval" attribute is not used. The "interval" mode, in association with the "SnapshotInterval" attribute, indicates that Tomcat will only replicates modified sessions every "SnapshotInterval" miliseconds at most. --> <attribute name="SnapshotMode">instant</attribute> <!-- you must switch to "interval" to use this attribute (msec) --> <!--attribute name="SnapshotInterval">2000</attribute--> <!-- DEPRECATED IN RELEASE 3.2.6. A flag indicating if the local vm session value should be used if it exists. When true, the existing vm local session values are used and updates are replicated, but updates to the same session on other nodes do not update the local session value. In the future release, we will relax this restriction. Note that this flag is needed because of scoped class loading. Since each web app may have a different class loader, the session stored in the distributed store are still serialzed version. So if this flag is false, the session value is obtained from the distributed cache for each access and there will be significant penalty for performance. For clustering purpose only. --> <attribute name="UseLocalCache">false</attribute> <!-- Whether to use MOD_JK(2) for load balancing with sticky session combined with JvmRoute. If set to true, it will insert a JvmRouteFilter to intercept every request and replace the JvmRoute if it detects a failover. In addition, you will need to set the JvmRoute inside Tomcat, e.g., Engine name="jboss.web" jmvRoute="Node1" defaultHost="localhost" in server.xml. For clustering purpose only. --> <attribute name="UseJK">false</attribute> <attribute name="Domain">jboss.web</attribute> <!-- A mapping to the server security manager service which must be operation compatible with type org.jboss.security.plugins.JaasSecurityManagerServiceMBean. This is only needed if web applications are allowed to flush the security manager authentication cache when the web sessions invalidate. --> <depends optional-attribute-name="SecurityManagerService" proxy-type="attribute">jboss.security:service=JaasSecurityManager </depends> <!-- Configuration for HTTP Session Clustering using JBossCache --> <!--depends optional-attribute-name="CacheName">jboss.cache:service=TreeCache</depends--> <depends>jboss:service=TransactionManager</depends> <!-- Only needed if the org.jboss.web.tomcat.tc5.jca.CachedConnectionValve is enabled in the tomcat server.xml file --> <depends>jboss.jca:service=CachedConnectionManager</depends> </mbean> </server>
This is my server.xml
<Server> <!-- Use a custom version of StandardService that allows the connectors to be started independent of the normal lifecycle start to allow web apps to be deployed before starting the connectors. --> <Service name="jboss.web" className="org.jboss.web.tomcat.tc5.StandardService"> <!-- A HTTP/1.1 Connector on port 8080 --> <Connector port="8080" address="${jboss.bind.address}" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"/> <!-- A AJP 1.3 Connector on port 8009 --> <Connector port="8009" address="${jboss.bind.address}" enableLookups="false" redirectPort="8443" debug="0" protocol="AJP/1.3"/> <!-- SSL/TLS Connector configuration using the admin devl guide keystore <Connector port="8443" address="${jboss.bind.address}" maxThreads="100" minSpareThreads="5" maxSpareThreads="15" scheme="https" secure="true" clientAuth="false" keystoreFile="${jboss.server.home.dir}/conf/chap8.keystore" keystorePass="rmi+ssl" sslProtocol = "TLS" /> --> <Engine name="jboss.web" defaultHost="localhost"> <!-- The JAAS based authentication and authorization realm implementation - certificatePrincipal : the class name of the org.jboss.security.auth.certs.CertificatePrincipal impl used for mapping X509[] cert chains to a Princpal. --> <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm" certificatePrincipal="org.jboss.security.auth.certs.SubjectDNMapping" /> <Logger className="org.jboss.web.tomcat.Log4jLogger" verbosityLevel="WARNING" category="org.jboss.web.localhost.Engine"/> <Host name="localhost" autoDeploy="false" deployOnStartup="false" deployXML="false"> <Valve className="org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn" debug="2"/> <!-- Uncomment to enable request dumper. This Valve "logs interesting contents from the specified Request (before processing) and the corresponding Response (after processing). It is especially useful in debugging problems related to headers and cookies." --> <!-- <Valve className="org.apache.catalina.valves.RequestDumperValve" /> --> <!-- Access logger --> <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access_log." suffix=".log" pattern="common" directory="${jboss.server.home.dir}/log" resolveHosts="false" /> --> <!-- Uncomment to enable single sign-on across web apps deployed to this host. Does not provide SSO across a cluster. If this valve is used, do not use the JBoss SingleSignOn valve shown below. --> <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" debug="0"/> --> <Valve className="org.jboss.web.tomcat.tc5.jca.CachedConnectionValve" cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager" /> <!-- Default context parameters --> <DefaultContext cookies="true" crossContext="true" override="true"/> </Host> </Engine> </Service> </Server>
This is my cluster-service.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ===================================================================== --> <!-- --> <!-- Sample Clustering Service Configuration --> <!-- --> <!-- ===================================================================== --> <server> <classpath codebase="lib" archives="jbossha.jar"/> <!-- ==================================================================== --> <!-- Cluster Partition: defines cluster --> <!-- ==================================================================== --> <mbean code="org.jboss.ha.framework.server.ClusterPartition" name="jboss:service=DefaultPartition"> <!-- Name of the partition being built --> <attribute name="PartitionName">DefaultPartition</attribute> <!-- The address used to determine the node name --> <attribute name="NodeAddress">${jboss.bind.address}</attribute> <!-- Determine if deadlock detection is enabled --> <attribute name="DeadlockDetection">False</attribute> <!-- Time in milliseconds to wait for state to be transferred --> <attribute name="StateTransferTimeout">60000</attribute> <!-- The JGroups protocol configuration --> <attribute name="PartitionConfig"> <Config> <!-- 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="228.1.2.5" mcast_port="45566" ip_ttl="32" ip_mcast="true" mcast_send_buf_size="800000" mcast_recv_buf_size="150000" ucast_send_buf_size="800000" ucast_recv_buf_size="150000" loopback="false" bind_addr="192.168.1.2"/> <PING timeout="2000" num_initial_members="3" up_thread="true" down_thread="true" /> <MERGE2 min_interval="10000" max_interval="20000" /> <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" max_xmit_size="8192" up_thread="true" down_thread="true" /> <UNICAST timeout="300,600,1200,2400,4800" window_size="100" min_threshold="10" down_thread="true" /> <pbcast.STABLE desired_avg_gossip="20000" up_thread="true" 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" /> </Config> </attribute> </mbean> <!-- ==================================================================== --> <!-- HA Session State Service for SFSB --> <!-- ==================================================================== --> <mbean code="org.jboss.ha.hasessionstate.server.HASessionStateService" name="jboss:service=HASessionState"> <depends>jboss:service=DefaultPartition</depends> <!-- Name of the partition to which the service is linked --> <attribute name="PartitionName">DefaultPartition</attribute> <!-- JNDI name under which the service is bound --> <attribute name="JndiName">/HASessionState/Default</attribute> <!-- Max delay before cleaning unreclaimed state. Defaults to 30*60*1000 => 30 minutes --> <attribute name="BeanCleaningDelay">0</attribute> </mbean> <!-- ==================================================================== --> <!-- HA JNDI --> <!-- ==================================================================== --> <mbean code="org.jboss.ha.jndi.HANamingService" name="jboss:service=HAJNDI"> <depends>jboss:service=DefaultPartition</depends> <!-- Name of the partition to which the service is linked --> <attribute name="PartitionName">DefaultPartition</attribute> <!-- bind address of HA JNDI RMI endpoint --> <attribute name="BindAddress">${jboss.bind.address}</attribute> <!-- RmiPort to be used by the HA-JNDI service once bound. 0 => auto. --> <attribute name="RmiPort">0</attribute> <!-- Port on which the HA-JNDI stub is made available --> <attribute name="Port">1100</attribute> <!-- Backlog to be used for client-server RMI invocations during JNDI queries --> <attribute name="Backlog">50</attribute> <!-- Multicast Address and Group used for auto-discovery --> <attribute name="AutoDiscoveryAddress">230.0.0.4</attribute> <attribute name="AutoDiscoveryGroup">1102</attribute> <!-- 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--> </mbean> <mbean code="org.jboss.invocation.jrmp.server.JRMPInvokerHA" name="jboss:service=invoker,type=jrmpha"> <attribute name="ServerAddress">${jboss.bind.address}</attribute> <!-- <attribute name="RMIObjectPort">0</attribute> <attribute name="RMIClientSocketFactory">custom</attribute> <attribute name="RMIServerSocketFactory">custom</attribute> --> </mbean> <!-- ==================================================================== --> <!-- Distributed cache invalidation --> <!-- ==================================================================== --> <mbean code="org.jboss.cache.invalidation.bridges.JGCacheInvalidationBridge" name="jboss.cache:service=InvalidationBridge,type=JavaGroups"> <depends>jboss:service=DefaultPartition</depends> <depends>jboss.cache:service=InvalidationManager</depends> <attribute name="InvalidationManager">jboss.cache:service=InvalidationManager</attribute> <attribute name="PartitionName">DefaultPartition</attribute> <attribute name="BridgeName">DefaultJGBridge</attribute> </mbean> </server>
and finally, this is my tc5-cluster-service.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- ===================================================================== --> <!-- --> <!-- Customized TreeCache Service Configuration for Tomcat 5 Clustering --> <!-- --> <!-- ===================================================================== --> <server> <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/> <!-- ==================================================================== --> <!-- Defines TreeCache configuration --> <!-- ==================================================================== --> <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TomcatClusteringCache"> <depends>jboss:service=Naming</depends> <depends>jboss:service=TransactionManager</depends> <!-- Configure the TransactionManager --> <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute> <!-- Isolation level : SERIALIZABLE REPEATABLE_READ (default) READ_COMMITTED READ_UNCOMMITTED NONE --> <attribute name="IsolationLevel">REPEATABLE_READ</attribute> <!-- Valid modes are LOCAL, REPL_ASYNC and REPL_SYNC --> <attribute name="CacheMode">REPL_ASYNC</attribute> <!-- Name of cluster. Needs to be the same for all clusters, in order to find each other --> <attribute name="ClusterName">Tomcat-Cluster</attribute> <!-- JGroups protocol stack properties. Can also be a URL, e.g. file:/home/bela/default.xml <attribute name="ClusterProperties"></attribute> --> <attribute name="ClusterConfig"> <config> <!-- UDP: if you have a multihomed machine, set the bind_addr attribute to the appropriate NIC IP address, e.g bind_addr="192.168.0.2" --> <!-- 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="230.1.2.3" mcast_port="45577" 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="false" bind_addr="192.168.1.2"/> <PING timeout="2000" num_initial_members="3" up_thread="false" down_thread="false"/> <MERGE2 min_interval="10000" max_interval="20000"/> <FD_SOCK/> <VERIFY_SUSPECT timeout="1500" up_thread="false" down_thread="false"/> <pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800" max_xmit_size="8192" up_thread="false" down_thread="false"/> <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10" down_thread="false"/> <pbcast.STABLE desired_avg_gossip="20000" up_thread="false" down_thread="false"/> <FRAG frag_size="8192" down_thread="false" up_thread="false"/> <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="true" print_local_addr="true"/> <pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/> </config> </attribute> <!-- Max number of milliseconds to wait for a lock acquisition --> <attribute name="LockAcquisitionTimeout">15000</attribute> </mbean> </server>
Those are the files I worked with (with the last settings I used, because I tried with a lot of settings changes, but none worked).
In the next step, I created a small application to test the session replication. It is a war (the same on both JBosses), containing a servlet and a jsp. The servlet sets a session attribute (which is a String - so it is Serializable), which I expect to see in the jsp. Here comes the problem. I call the servlet on 192.168.1.254. If I call the jsp on the same JBoss, it's working (I can see the session attribute - which is normal). But if I call now the JSP on the other computer (192.168.1.2), the session attribute is null (unless I set it with the servlet on this Jboss instance, too).
I also looked in jmx-console, at service=TomcatClusteringCache, and this is what I get when invoke the "printDetails":
/JSESSION /LD25dcOi6uVaOl3VLW-kbA** LD25dcOi6uVaOl3VLW-kbA**: org.jboss.invocation.MarshalledValue@824116f /9iTwtuPJXDyYNIodnIdg+g** 9iTwtuPJXDyYNIodnIdg+g**: org.jboss.invocation.MarshalledValue@71f80780 /ATTRIBUTE date: org.jboss.invocation.MarshalledValue@edbfed5e
I have EXACTLY the same details in both jmx-consoles. I don't know if this is normal or not.
I hope somebody can help me, because I'm fighting this problem for some days. I'm almost sure that I'm missing something, but I can't figure out what.
Many thanks in advance.