[JBoss-user] [Clustering/JBoss] - Re: Session not replicated in JBoss 3.2.6

2005-05-18 Thread cristibuta
Yes, that was the problem. In order to have the same information in the 
session, I have to use sticky sessions (so only one JBoss instance is used for 
a certain session). But having in mind that I want to have the same session 
data on both JBoss instances, I had to upgrade to JBoss 4.0.2 (which can do 
this, so now everything I wanted is working great).
Thank you Ben for your answers.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3878175#3878175

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3878175


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412alloc_id=16344op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Clustering/JBoss] - Re: Session not replicated in JBoss 3.2.6

2005-05-13 Thread cristibuta
Hi Ben, and thank you for your answer. 
I have a load balancer in front of the cluster. Using Apache 2.0.54 with mod_jk 
1.2.12, and this is my configuration:

jk.conf:

  | LoadModule jk_module modules/mod_jk.so
  | 
  | # The workers.properties
  | JkWorkersFile conf.d/workers.properties
  | 
  | # The log files
  | JkLogFile logs/mod_jk.log
  | 
  | # Set the jk log level
  | JkLogLevel info
  | 
  | # Select the log format
  | JkLogStampFormat {%a %b %d %H:%M:%S %Y} 
  | 
  | # JkOptions indicate to send SSL KEY SIZE
  | JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
  | 
  | # JkRequestLogFormat set the request format
  | JkRequestLogFormat %w %V %T
  | 
  | JkShmFile /usr/local/apache/logs/shm
  | 
  | JkMount /test* loadbalancer
  | 
  | #Add jkstatus for managing runtime data
  | Location /jkstatus/
  |JkMount jkstatus
  |Order deny,allow
  |Allow from all
  | /Location
  | 

and workers.properties:

  | # Define the first node...
  | worker.node1.port=8009
  | worker.node1.host=192.168.1.254
  | worker.node1.type=ajp13
  | worker.node1.lbfactor=1
  | #worker.node1.local_worker=1
  | worker.node1.cachesize=10
  | 
  | # Define the second node
  | worker.node2.port=8009
  | worker.node2.host=192.168.1.2
  | worker.node2.type=ajp13
  | worker.node2.lbfactor=1
  | #worker.node2.local_worker=1
  | worker.node2.cachesize=10
  | 
  | # Now define the load-balancing behaviour
  | worker.loadbalancer.type=lb
  | worker.loadbalancer.balanced_workers=node1,node2
  | worker.loadbalancer.sticky_session=1
  | #worker.loadbalancer.local_worker_only=1
  | 
  | # Define the status worker
  | worker.jkstatus.type=status
  | 
  | worker.list=loadbalancer,jkstatus
  | 

As I said before, I made a simple application to test the session replication. 
It contains a servlet and a jsp. The servlet contains this code:


  | Hello world JSP on %= new java.util.Date() %
  | 
  | br
  | 
  | The session date is: %= request.getSession().getAttribute(date) %
  | 

and the servlet is this:


  | protected void doGet(HttpServletRequest request,
  | HttpServletResponse response) throws IOException {
  | response.getWriter().println(Hello world on  + new Date());
  | 
  | String newDate = (new Date()).toString();
  | System.out.println(Storing date: +newDate);
  | 
  | request.getSession().setAttribute(date, newDate);
  | }
  | 

I noticed something very interesting. If I start both JBosses and the very 
first thing I call is the servlet, the attribute date is set on both JBosses, 
so everything works fine (if I refresh the JSP page, because of the load 
balancer settings it goes to a different JBoss each time, and the date is there 
and it is the same for both). Now, I call again the servlet and from now on, 
the date is set only on the JBoss where I called the servlet (so the session is 
not replicated anymore from now on). The same happens (session attribute not 
set on both JBoss) if the first thing I call after starting JBosses is the JSP 
page. If I do this, the session attribute is only set on the JBoss I call the 
servlet. 
Perhaps I should mention that the Apache server is located on the same computer 
with one of my JBoss instanced (192.168.1.254). The other JBoss instance is 
located on another computer (192.168.1.2).

Another thing I noticed is that I have this in the JBoss logs:

[STDOUT] Can't find resource org.jboss.web.tomcat.session.LocalStrings [EMAIL 
PROTECTED]

[STDOUT] [Ljava.net.URL;@117ee94

but I readed on another post that this is harmless. 

Any idea is welcome. Thank you.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3877601#3877601

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3877601


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Clustering/JBoss] - Re: Session not replicated in JBoss 3.2.6

2005-05-13 Thread cristibuta
Perhaps I should mention that I'm using Fedora Core 2. Could this be a problem 
? (I readed somewhere that nobody made a cluster work on FC3. I don't know if 
this is true or false and if it also apply for FC2 ).

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3877603#3877603

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3877603


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Clustering/JBoss] - Session not replicated in JBoss 3.2.6

2005-05-12 Thread cristibuta
Hello 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 [EMAIL PROTECTED]
  | 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 6 
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: 

[JBoss-user] [Clustering/JBoss] - Re: Tomcat-LoadBalancer-Jboss problem

2005-05-12 Thread cristibuta
Hello, maybe you can check your mod_jk log (I assume you have mod_jk for Apache 
- Tomcat load balancer). I think it would be useful if you post the jk.conf, 
workers.properties and the mod_jk log file.

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3877445#3877445

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3877445


---
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393alloc_id=16281op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user