Virtual hosts with Apache 2.0.43 & Tomcat 4.1.12 & mod_jk2 on Linux

2002-10-30 Thread Tomcat Newbie
I can't seem to figure out why my setup behaves differently when I access
the same host with and without 'www.'. I used to run Apache 1.3.x and Tomcat
4.0.x, where my setup included aliases in Apache config file as well as two
virtual hosts in Tomcat (with 'www.' and without) for each domain. Not sure
if that was the way to do it, but it worked!

My present setup, aside from upgraded software, has Aliases both in Apache
and Tomcat config files, however such setup does not seem to help. Apache
handles requests properly and forwards them to the same directory, however
with 'www.' I get a directory listing, while without Tomcat picks up the
request and processes it.

What am I missing? Or do I have to setup two hosts for each domain again?

Thanks,

Ed


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 ( mod_jk2-2.0.43.dll)

2002-10-30 Thread Tomcat Newbie
How about the slashes in your path?

C:\ApacheGroup\Tomcat4.1/bin/tomcat-jni.jar
  ^^^

- Original Message -
From: "M. Hockings" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 10:00 PM
Subject: Re: need help connecting Tomcat 4.1.12, Apache 2.0.43 using jk2 (
mod_jk2-2.0.43.dll)


> Hello,
>
> I too am trying to get this configuration working to give me a test
> environment that duplicates a remote server.  I have followed the
> instructions pointed to by John Turner very closely and only modified
> the line in workers2.properties that points to the jvm.dll.  When I
> start Apache I see the following in logs\error.log.   If you have any
> hints or suggestions about what I have set up incorrectly please let me
> know.  Both Apache and Tomcat seem to work fine individually.
>
> Thanks,
>
> Mike


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Virtual hosts with Apache 2.0.43 & Tomcat 4.1.12 & mod_jk2 on Linux

2002-10-31 Thread Tomcat Newbie
OK, just figured it out. Duh! I just had to add [uri:www.mydomain.tld/*]
entry in addition to an existing [uri:mydomain.tld/*]. Now it works. :-)

Ed

- Original Message -
From: "Tomcat Newbie" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, October 30, 2002 9:27 PM
Subject: Virtual hosts with Apache 2.0.43 & Tomcat 4.1.12 & mod_jk2 on Linux


> I can't seem to figure out why my setup behaves differently when I access
> the same host with and without 'www.'. I used to run Apache 1.3.x and
Tomcat
> 4.0.x, where my setup included aliases in Apache config file as well as
two
> virtual hosts in Tomcat (with 'www.' and without) for each domain. Not
sure
> if that was the way to do it, but it worked!
>
> My present setup, aside from upgraded software, has Aliases both in Apache
> and Tomcat config files, however such setup does not seem to help. Apache
> handles requests properly and forwards them to the same directory, however
> with 'www.' I get a directory listing, while without Tomcat picks up the
> request and processes it.
>
> What am I missing? Or do I have to setup two hosts for each domain again?
>
> Thanks,
>
> Ed


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>




Double session cookie

2003-07-29 Thread Tomcat Newbie
Hello,

I have a problem that has puzzled me for a while and since I was not unable
to find any answers in online archives or elsewhere, I decided to try it
here.

I manage a low traffic web site for a friend of mine on the server running
Tomcat behind the Apache server. What I have been observing lately is that
occasionally I see two JSESSION cookies in the same session. I have seen
this happen even with a newly open browser instance. I am most certain that
this has been affecting the user experience, since in those cases the
browser sort of hangs. The kicker is, the problem only seems to affect
Internet Explorer (at least the version, I have tested with, latest 6.x with
all SPs), but not Mozilla based browsers (not certain about Opera and the
like).

I am not setting a session timeout myself and was assuming/relying on the
default timeout managed by Tomcat. My guess is that any software involved in
the chain could be the culprit: IE, Apache, or Tomcat, and of course, the
site code in JSP. It is Tocat 4.1.24 and Apache 2.0.47. Not sure what
version connectors are, since I built them from source downloaded a few
months ago.

The question is, has anyone observed this on their websites? I presume, that
this is not normal, but is it? Any idea of what I can do about it and where
to look?

Thanks for any ideas,

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Double session cookie

2003-07-30 Thread Tomcat Newbie
Tim,

Thanks for your most informative response. Unfortunately, the two
cookies I am observing are from the same webapp.

Would it have something to do with the requests to www.mydomain.com and
mydomain.com? I see such difference for at least one of the requests for
those sessions. My app hardcodes www.mydomain.com links. I remember I had
some problems with enabling https, whereby I would loose session going back
and forth between https and http due to higher priorities elsewhere. I still
have not solved that, but remember reading something about declaring the
cookie domain in Tomcat configuration (why not webapp?).

I also forgot to mention that I have Cocoon 2.0.4 installed for the web app,
but since it had a broken JSPGenerator, I did not use it to process JSP
pages, only to direct requests for now.

Ed


> It is valid to have multiple JSESSIONID cookies. Because each webapp has
its
> own session id. So if you have a webapp mapped to / and a webapp mapped to
> /cowbell. You will have 2 JSESSIONID cookies. One for path / and one for
path
> /cowbell. The cookie RFC says that cookies of the same name should be sent
> from most specific to least specific.
>
> So you might be observing this behavior. And some patch revisions of IE
don't
> obey the cookie order rule.
>
> -Tim


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



403 Errors

2003-09-03 Thread Tomcat Newbie
I have an annoying problem with my setup. I searched the archives and net
for similar documented cases and I thought I found the solution, but it does
not seem to work. Any hints or ideas would be appreciated.

The problem:

random 403 access errors to a number of pages(seemingly with Internet
Explorer only)

Setup:

Apache 2.047
Tomcat 4.1.27 -- full version
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
Red Hat Linux 2.4.20-13.7

Solutions I tried:

Add a random string (comment) to the beginning of the page, since reportedly
IE does not handle caching properly. Strangely enough, this is happening on
dynamically generated pages.

Also, set max memory for tomcat to 256MB, but no change.

TIA,

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



occasional 403 Errors (revised question) -- jk2 broken pipe error

2003-09-04 Thread Tomcat Newbie
Sorry, it seems I left out most importan information from my e-mail
describing the problem. Below my question revised.

**

I have an annoying problem with my setup. I searched the archives and net
for similar documented cases and I thought I found the solution, but it does
not seem to work. Any hints or ideas would be appreciated.


The problem:

Occasional 403 access errors to a number of random pages (seemingly with
Internet Explorer only).
*** There is a 403 error in Apache log and a corresponding "broken pipe"
error in catalina.out log.


Setup:

Apache 2.047
Tomcat 4.1.27 -- full version
*** Tomcat JK2 connector compiled from source (not sure how to determine the
version)
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
Red Hat Linux 2.4.20-13.7



Tomcat catalina log fragment:

SEVERE: Error in action code
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.jk.common.ChannelSocket.send(ChannelSocket.java:407)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:599)
at
org.apache.jk.server.JkCoyoteHandler.action(JkCoyoteHandler.java:385)
at org.apache.coyote.Response.action(Response.java:222)
at org.apache.coyote.Response.finish(Response.java:343)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:268)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:562)
at
org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:679)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Thr
eadPool.java:619)
at java.lang.Thread.run(Thread.java:534)



Solutions I tried:

Add a random string (comment) to the beginning of the page, since reportedly
IE does not handle caching properly (someone suggested that). Strangely
enough, this is happening on
dynamically generated pages.

Also, set max memory for tomcat to 256MB, but no change (earlier ran it with
standard settings).


TIA,

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat 5.5 In-Memory Session Replication

2004-09-03 Thread Tomcat Newbie
I know the replication subject has been addressed somewhat for 5.x. I am
trying my first replication setup with two 5.5 servers on the same host.
Each Tomcat instance works just fine by itself.

I followed the configuration notes for Tomcat in the documentation for
in-memory replication, however I do not see any activity in the logs as
far as replication is concerned. The only thing I see logged is the
message:


Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Starting clustering manager...:/servlets-examples
Sep 3, 2004 6:59:37 PM org.apache.catalina.cluster.session.DeltaManager start
INFO: Manager[/servlets-examples], skipping state transfer. No members active in 
cluster group.


The two instances are setup with unique tcpListenPort properties. The 
application has  in web.xml on both instances. I tried the 
setup with both dirtyFlag enabled and disabled.

I even tried to put it behind Apache server proxy to get rid of localhost:port, 
but it has not changed anything. I still see no session replication activity. 
Each instance creates its own sessions and they are not propagated.

Can someone offer some ideas as to how to proceed?

Also, a couple of questions regarding the replication. What prevents a "hostile" tomcat
instance from joining the cluster when the cluster is configured on multiple hosts? Is 
there any documentation on replication using JDBC--I saw it mentioned, but no examples 
or
configuration options.


Thanks,

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 In-Memory Session Replication

2004-09-03 Thread Tomcat Newbie
Filip,

Thank you for your assistance. You are very helpful as usual.

> Make sure you have multicast enabled. This can be a little tricky if you run
> on a multihomed host, but you can google it.

OK, that may not be that difficult on a single host, or so I hope. I
tried on Fedora Linux (ifconfig showed multicast enabled, but a route
was missing in my setup):

route add -net 224.0.0.0 netmask 224.0.0.0 dev lo

which now allows me to see servers joining. This roue basically means
that I am not using network, or so they say. :-) (One probably should
stop tomcat instances before changing network settings, since CPU use
shot almost to 100%, as noted in the docs.)


> are you kidding me, there are no "hostile" tomcats, only "friendly" ones.
> (slap yourself on the head if you configure tomcats on the same multicast
> address but you don't want them to be in the same cluster, after a few
> times, you'll have it figured out :)

I am sure, my question was not very clear regarding security. Example, I
use two servers for webhosting. If I understand anything about
multicasting, that would imply that every multicast-able server on the
LAN will be receiving the brodacast? So if there was another Tomcat
instance on the LAN, which happened to have mcastAddress same as my
cluster, would it not receive an invitation to join the cluster?
Apparently, setting TTL would limit the multicast at a router, however I
am not sure if it applies to this situation, when I am dealing basically
with a LAN.

I made some progress in a sense that I can see servers joining. I see
session created on one server and also on another server. Session
attributes do not replicate however (with a default replication filter
and useDirtyFlag=true). Often SessionListener reports the attribute
value of null, but a few times when it actually reported a real value,
it still did not replicate. So I can access app instances on each server
with the same cookie and session information is different.

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 In-Memory Session Replication

2004-09-04 Thread Tomcat Newbie
Thanks again, Filip. I am sending this response to document my
experience for others.

> set up machines to only access mcast and tcp traffic from certain IPs and
> certain ports.

Well, my primary concern was that I don't want _other_ hosts to join my
cluster not the other way around, so I am guessing I have to limit my
mcast invitations and tcp traffic to relevant parties only? :-)

> ok, I haven't tested replication on 5.5 yet myself, I've been to busy with
> corporate world.
> but from what I am reading, is that the replication valve is not issuing the
> transfer or session deltas. Maybe something broke...we'll have to check

Sounds about right. Logs show original and replicate session creation.
Most of the time, SessionListener will log correct original session
attribute name, but null value. However, even when it does log both name
and value, still there is no replication done.

> you do have the replication valve set up in server.xml right?

I believe so. Default setup and I saw no instructions for additional
setup anywhere for replication valve, other than the filter options.


I figured I ventured into something too "bleeding edge" for me (I did so
mainly because Jakarta site said that 5.5 was branched off from 5.0.27).
So I went back to 5.0.28. Then, after spending a few hours pointlessly
watching the logs for any activity other than mcast membership
registrations, to my surprise, I discovered that the session attributes
were replicating beautifully on 5.0.28, but without any logging. Yup,
with all debug="" cranked up all the way to 9 or 10. Go figure! Glad it
works, though.

I also found a link for JDBC persistence manager (http://www.ingrid.org/
jajakarta/tomcat/tomcat-4.0b5/src/catalina/docs/JDBCStore-howto.html),
so I might go in that direction, since such setup would certainly
address my security concerns. Similar, but less complete documentation
is available for 5.x (http://jakarta.apache.org/tomcat/tomcat-5.0-doc/
config/manager.html). I have played with built-in MySQL replication and
so far I have no complaints about its performance for low-load servers.
I just need to make sure that it stores sessions in MySQL all the time,
not just swapped. MySQL will take care of the rest.


Regards,

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 In-Memory Session Replication

2004-09-04 Thread Tomcat Newbie
> that is exactly the point I was trying to make. Setup your security in the
> OS that way you get more performance out of tomcat.
> If you allow mcast traffic from other hosts into your machine, you are
> already taking up resources.

Oh, I get it now. :-)


Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 In-Memory Session Replication

2004-09-05 Thread Tomcat Newbie
> did you try replication with 5.0.27?
> if that works for you, then for sure something broke.

It does. Quietly, like 5.0.28, but it seems to work. I just tested 5.5
again, and I still cannot get it to replicate.


> 5.5 is still in dev mode, so you can't bank on everything working quit yet

Yes, I understand. I was only testing replication for the first time
anyway, since 5.5 will be production version before I know it. :-) You
guys are both fast and good. Usually, I find that even alpha versions
are pretty good.

I will have to stick to 5.0.28 for now. :-)

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat 5.5 In-Memory Session Replication

2004-09-05 Thread Tomcat Newbie
> I forgot to tell you
> the debug flag is not in place anymore.
> if you want to see debug messages, you have to enable it through the logger.
> I setup log4j and set the output to DEBUG to see all the replication
> messages, there are plenty of them :)

OK, I remember seeing the post about log4j. I will look what it says
about not replicating! LOL

Ed


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: karjera@m-1.lt

2005-01-17 Thread Tomcat Newbie
Someone, throw them out. It is an auto-responder. I know.

Ed

On Mon, 2005-01-17 at 09:50 -0800, Dakota Jack wrote:
> Is anyone else getting personal responses from this address after
> every submission to tomcat-user?
> 
> Jack


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]