tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Crowther <>
Subject Re: Tomcat + Apache + AJP = high cpu usage:/
Date Fri, 15 Jan 2010 09:03:18 GMT
2010/1/14 pionier <>:
> Linux vs4160 2.6.22-vs2.2.0.7-gentoo #4 SMP Mon Jul 27 01:53:39 Local time
> zone must be set--see zic  x86_64 AMD Phenom(tm) II X4 810 Processor
> AuthenticAMD GNU/Linux

Thanks.  OK, you've got a few options here.  This is all because a
process can only bind to a port < 1024 on Unix if it's running as root
at the instant it binds.

- Fix your current configuration.  You're presently using
mod_proxy_ajp to pass data between httpd and Tomcat , which is less
mature than mod_jk.  mod_jk takes a bit of setting up, but that would
let you keep httpd if you want to.

- Run Tomcat as root and set up an HTTP Connector on port 80.  Not
good for security!

- Run Tomcat as non-root, set up an HTTP Connector on port 8080, and
configure the Linux kernel firewalling to redirect port 80 to port
8080.  Probably easier than setting up httpd, but it has a few
irritating features like having to set proxyPort on the connector.

- Start Tomcat using jsvc (see the section on "Unix daemon" at for details) and
set up an HTTP Connector on port 80.  This allows you to start Tomcat
in a way that it can bind to port 80, but you then run it as an
unprivileged user (using the --user option to jsvc).  This is secure
and doesn't require stuff like proxyPort.

- Peter

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

View raw message