Fwd: non-root on 80

2005-04-04 Thread John Lianogou
Hey Jeff,
Using jsvc is not at all mutually exclusive to the solution i offered.  
 :-)

AFAIK, there is no way to make tomcat bind to 80 w/o running it as the 
root user... if anyone else has experience to the contrary, however, 
I'd be most pleased to be wrong on this one.


jL
On Apr 4, 2005, at 7:20 PM, Jeff Duska wrote:
I'm using the jsvc in the commons-daemon with a Tomcat user. Other 
than not having to deal with the jsvc, is there a reason to pick this 
over jsvc?

Thanks,
Jeff Duska
John Lianogou wrote:
I had to set up a solution using IP tables on my redhat box. First 
some background as to why I solved it this way:
You can't run anything directly on port 80 without that process being 
executed as the root user... which -- for a variety of reasons I'm 
sure you needn't hear me go into -- is a Really Bad Idea.  ;-)
What you want to do in this case is to reroute port 80 traffic to a 
port that tomcat can bind to when executed as a "normal" user.
Here's what I did to accomplish this (hopefully you've got iptables 
on your box, as well... tho the path of this script may be different 
on yr system... so check into both matters if this doesn't work for 
you):


/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT 
--to-port 8080
You'll need root permissions to do this, tho.
Hope that helps,
jL
On Apr 4, 2005, at 5:58 PM, NetSQL wrote:
I read that it has a stop method... but how do I get it to run at 
port 80 ?

.V
David Smith wrote:
Look at jsvc in the commons-daemon project on 
jakarta.apache.org/commons
--David
NetSQL wrote:

apache drops to non root after bind to 80.
How can this be done w/ tc 5.5?
.V

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


Re: non-root on 80

2005-04-04 Thread John Lianogou
I had to set up a solution using IP tables on my redhat box. First some 
background as to why I solved it this way:

You can't run anything directly on port 80 without that process being 
executed as the root user... which -- for a variety of reasons I'm sure 
you needn't hear me go into -- is a Really Bad Idea.  ;-)

What you want to do in this case is to reroute port 80 traffic to a 
port that tomcat can bind to when executed as a "normal" user.

Here's what I did to accomplish this (hopefully you've got iptables on 
your box, as well... tho the path of this script may be different on yr 
system... so check into both matters if this doesn't work for you):

/sbin/iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT 
--to-port 8080

You'll need root permissions to do this, tho.

Hope that helps,
jL
On Apr 4, 2005, at 5:58 PM, NetSQL wrote:
I read that it has a stop method... but how do I get it to run at port 
80 ?

.V
David Smith wrote:
Look at jsvc in the commons-daemon project on 
jakarta.apache.org/commons
--David
NetSQL wrote:
apache drops to non root after bind to 80.
How can this be done w/ tc 5.5?
.V
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

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


Re: Support Information Regarding - C0000005

2005-02-06 Thread John Lianogou
see what happens when friends let friends use outlook?  ;-)
(don't worry, i have trimmed the original considerably to make my humor 
less list-disruptive)


On Feb 6, 2005, at 1:55 AM, <[EMAIL PROTECTED]> wrote:
Thank you for emailing Blizzard Entertainments Technical Support 
Department. In order to provide you with greater assistance, we have 
developed an automated reply system which evaluates your message and 
generates a detailed response towards it.

Please read through this message as our automated reply system has 
helped many of our customers. If the response given below does not 
assist you or it is not relevant towards your message, please reply 
back to this email and a live technician will respond to you as soon 
as possible.

==
Support Information Regarding - C005:
==
[ *** EDITED FOR BREVITY *** ]
Again, if the response given above has not assisted you or it was not 
relevant towards your message, please reply back to this email and a 
live technician will respond to you as soon as possible.

Best Regards,
Blizzard Support Team
http://www.blizzard.com/support
Blizzard Entertainment
If you respond to this email, please attach all previous messages and 
files relating to this issue.

-Original Message-
From: tomcat-user@jakarta.apache.org
Sent: 2/5/2005 5:25:51 AM
To: tomcat-user@jakarta.apache.org
Subject: Diagnosing tomcat problems
Hello
I'm running a tomcat 5.5.4 server with sun jdk1.5 update 1, on a RH 
enterprise linux 3.0 (with 2.4.21 kernel).  The server processes 
about 20-30 requests per second, most of which include a database 
query (to a postgresql DB).  The configuration I'm using is:
JAVA_OPTS='-Dbuild.compiler.emacs=true -Xmx240m -Xms240m -Xmn60m 
-server -XX:+UseParallelGC'
LD_ASSUME_KERNEL=2.2.5
(the problems occur with or without the -XX:+UseParallelGC switch)

The problem I have is that approximately every 3 days the server 
stops processing requests.  The only trace that is left in the logs 
is the following exception (which seems to be totally non-related but 
for some reason always occurs on such a hang):
java.lang.IllegalStateException: Cannot create a session after the 
response has been committed
at 
org.apache.catalina.connector.Request.doGetSession(Request.java:2190)
at 
org.apache.catalina.connector.Request.getSession(Request.java:2012)

And my automatic script for checking if the server is alive tries to 
restart it (with shutdown -force), which doesn't work (it doesn't 
kill the server for some reason and it keeps hogging the listen port 
and not processing requests) - so I switched to 'killall -9 java'.

This does not seem to be a out-of-memory problem - I had those with 
tomcat 4.x, java 1.4.2 and the same webapp - and after I moved to 
tomcat 5.5 and java 1.5 those problems ceased - so this suggests that 
the webapp is OK at least memory-wise.  But now this one came up.

So I'm wondering how to diagnose this problem and figure out what is 
going wrong.  The catalina.log files seem to be missing in tomcat 5.5 
and that could perhaps give me some more hints than the 
IllegalStateException from the catalina.out logfile.

Can you give me some hints what this problem could be caused by?  Or 
perhaps ideas how to figure out what is going wrong?

I've noticed in tomcat docs that I can list the worker threads using 
the jmxproxy in the manager webapp - but I can't really decipher the 
output - maybe that would give me some info on why it stops 
responding.  Maybe I'm the one causing the problem - by some deadlock 
in my webapp stopping the threads one by one (which is unlikely but 
possible).

I also diagnosed the webapp using sun's jvmstat, but that just showed 
that the webapp is running fine and there is enough memory and GC is 
taking only a small fraction of running time..

Thanks,
Wojtek

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