Session sharing accros subdomains?

2006-08-09 Thread Madhur K Tanwani
I've a main website hosting domain domain.com. There are links on this 
page that point to response servers, which is a subdomain  rs.domain.com.
The problem is that when a user signs in on the domain.com and clicks 
on any link his session is not available on rs.domain.com.


I see that this question has been asked an ample number of times on this 
group.
I think I'm clear on the point that this is against the spec / not 
possible normally.


What I want to ask is that whether there is something that can be done 
either in Tomcat / Apache / my application that will help me in this 
sharing of sessions.


We will be using Tomcat along with  Apache (for load balancing) on Linux 
(FC4).


Awaiting responses,

--
__
Madhur Kumar Tanwani


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat and MySQL error

2006-07-26 Thread Madhur K Tanwani

I'm not sure if you asked the question at the right place.

Anyways, I think there would be some configuration file / code snippet 
which uses the
www.old-domain.com:3306 while forming the connection URL, which is 
passed to the

getConnection(url, username, pass) method.

Hope it helps,
Madhur.

DK wrote:

Hello all, I am new to this configuration and working on an exisitng website
with MySQL database.

There is a change in the domain name / IP address and after the change in IP
address I am not able to connect to the database and I get this error when
tomcat is started.

Caused by: java.sql.SQLException: Cannot connect to MySQL server on
www.old-domain.com:3306. Is there a MySQL server running on the machine/port
you are trying to connect to? (java.net.ConnectException)

My MySQL is working fine on port 3306 - I am able to connect to the database
from the command prompt

I do not know which file I should edit and update with the new IP address /
domain name in place of www.old-domain.com, so that tomcat connects to the
database with new domain name, when tomcat is started

Any help is appreciated !
  



--
__
Madhur Kumar Tanwani
[EMAIL PROTECTED]
Ph.: 0253-5614792.
__

+  A bus station is where a bus stops. A train station
+ is where train stops. On my desk, I have a work station...
+ What more can I say !



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5 load balancing URL redirefction not transparent to client

2006-07-13 Thread Madhur K Tanwani

Hi,
I'm separating this question from my earlier thread on load balancing 
rules - it

seems that it was over-looked there since it did not fit in there :(.

My question is that when I use the default balancer webapp from Tomcat 
5.5 the
redirection rules redirect me to either jakarta, cnn or yahoo's site. 
However,

the redirection is not transparent to the user.

for example,
Client Types : http://servername:8080/balancer/
Balancer Redirects To: http://jakarta.apache.org
*The browser URL changes to  : http://jakarta.apache.org*

I think this change of URL does not make the transition transparent. 
Also, the
subsequent requests bypass the load balancer(LB) and are directly served 
by the
server (so what happens if the server is down - the LB has support for 
fail over

but the request never went via the LB)

Please could someone throw some light on the same?
Awaiting responses,

--
Madhur Kumar Tanwani

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tomcat 5.5 load balancing URL redirefction not transparent to client

2006-07-13 Thread Madhur K Tanwani

Thanks Filip.
I understand now that Tomcat performs redirection - which implies that the
URL must change.
Then, I suppose I must ask
- Is something like mod_proxy available in Tomcat?
- Is it possible to emulate the same behavior in Tomcat?

After my discussion on the Tomcat 5.5 load balancing thread and this 
one, I'm

thinking of a setup like
request
|
   V
Apache 2.0 httpd Webserver
(LB with sticky sessions, weighted round robin, mod_jk2)
   |
   | Tomcat Worker 1 (ajp13)
   | Tomcat Worker 2 (ajp13)
   | Tomcat Worker 3 (ajp13)

The session management will be done using either JDBCStore or in-memory
replication amongst the Tomcat servers.

Can you suggest something in the design that is wither wrong or can be 
improved?
Is there something that the LB gurus find obviously wrong here and would 
want to

tell me (or would you want me to encounter it as it comes :) )?

Awaiting your valuable comments,
Madhur.

Filip Hanik - Dev Lists wrote:
redirection, as the name tells you, doesn't balance, it redirects, and 
there is nothing transparent about a redirection.
what you are looking for is called proxying, and the best example for 
that, would be mod_proxy in the Apache httpd web server.



Filip

Madhur K Tanwani wrote:

Hi,
I'm separating this question from my earlier thread on load balancing 
rules - it

seems that it was over-looked there since it did not fit in there :(.

My question is that when I use the default balancer webapp from 
Tomcat 5.5 the
redirection rules redirect me to either jakarta, cnn or yahoo's site. 
However,

the redirection is not transparent to the user.

for example,
Client Types : http://servername:8080/balancer/
Balancer Redirects To: http://jakarta.apache.org
*The browser URL changes to  : http://jakarta.apache.org*

I think this change of URL does not make the transition transparent. 
Also, the
subsequent requests bypass the load balancer(LB) and are directly 
served by the
server (so what happens if the server is down - the LB has support 
for fail over

but the request never went via the LB)

Please could someone throw some light on the same?
Awaiting responses,




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
__
Madhur Kumar Tanwani
[EMAIL PROTECTED]
Ph.: 0253-5614792.
__

+  A bus station is where a bus stops. A train station
+ is where train stops. On my desk, I have a work station...
+ What more can I say !



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5 Load Balancing Rule Classes

2006-07-10 Thread Madhur K Tanwani

Hi,
Greetings to all in my first mail on the list.
I've read the article on How To Ask Questions The Smart Way -
will try to adhere to it, but please don't mind a few misses :).

First with some background. This request is regarding the classes that
implements the rules, as used in the rules.xml file in the balancer
webapp that ships with Tomcat 5.5.  I'm configuring a Tomcat setup with one
load balancer and 3 workers in one cluster. The setup details are :

OS : Linux (2.6.11-1.1369_FC4)
Tomcat : 5.5 (all)
JDK : 1.5

I've being studying through the configuration references from :-
- the Tomcat load balancing HOW-To -
http://tomcat.apache.org/tomcat-5.5-doc/printer/balancer-howto.html
- the Tomcat clustering HOW-To -
http://tomcat.apache.org/tomcat-5.5-doc/printer/cluster-howto.html
- an article on OnJava.com -
http://www.onjava.com/pub/a/onjava/2004/04/14/clustering.html (for Tomcat 5)

However, what I find is that Tomcat 5.5 by defaults supports basic Rule 
Classes

like AcceptEverythingRule, URLStringMatchRule etc. I am trying to build a
load balancer which enforces the following :-
   - chooses from the available alive workers from the cluster,
 in a Round-Robin / Least-Load-First manner
   - implements session affinity
   - includes fail over support with session replication, so there is 
no loss

 of session data
   - The transition is transparent to the user. Hence, whatever be the
 redirectURL, the URL in the browser should not change
As you might expect, the problem is that, this kind of behavior is not
available with the the standard Tomcat installation.
Also, is the transparent transition possible?

I read in the load balancer HOW-To that this list is the best place to 
inquire

for latest Rule classes and details.
I've also browsed through the archives, till April 2006 (it was then that I
realized that a search feature there would greatly help!), but did not get
this answer.
I also realize that I can implement the org.apache.webapp.balancer.Rule
interface to generate Rules that I want (in fact that is what the article
on OnJava has provided).

But what I was inquisitive about was whether such standard Rule classes
have been implemented? Are there any pointers to such resources?

On another note, I wanted to ask the clustering and load-balancing gurus,
whether I've taken up the correct approach. I see that many load balancing
tutorials focus on Apache as the load balancer with Tomcat as the worker
in clusters. But since most of them are old, I assume the new Tomcat 5.5
features did not make it then - hence the question.

Please could anyone on the list, help me with these problems? Any 
pointers to
resources would be a great help. In case there is anything else that 
must have

mentioned that would ease thinking on the problem, do ask me for it.

Thanks a lot,

--
__
Madhur Kumar Tanwani


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]