RE: Problem Binding Tomcat to Ports 80/443

2005-04-26 Thread Peter Crowther
 From: Craig [mailto:[EMAIL PROTECTED] 
 Apr 26, 2005 1:24:04 AM org.apache.coyote.http11.Http11Protocol init
 SEVERE: Error initializing endpoint
 java.net.BindException: Permission denied:80

Are you running the Tomcat process as root?  If not, you won't be able
to bind to ports 80 or 443 on most Unixes.

What has changed in your environment, if anything?  User logins?  Port
numbers?

- Peter

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



Re: Problem Binding Tomcat to Ports 80/443

2005-04-26 Thread Nikola Milutinovic
Craig wrote:
Hey Tomcat Users!
I am having  a very desperate problem with Tomcat.  I have a demonstration
due later today, and the script I have been using to run tomcat (5.0.27)
on ports 80/443 doesn't seem to do the job -- though it had been
workingfor weeks up until a restart earlier today.  I'm getting these
kinds of errors in catalina.out when I try to start it on port 80/443:
Apr 26, 2005 1:23:55 AM org.apache.coyote.tomcat5.CoyoteConnector pause
SEVERE: Protocol handler pause failed
java.lang.NullPointerException
...
Apr 26, 2005 1:24:04 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Permission denied:80
I don't have anything running on ports 80 or 443, as a netstat -ltun
shows:
 

Then you're running TC as an unprivileged user (tomcat4 or tomcat5) and 
only superuser can bind to ports  1024. Or, as a long shot, maybe 
you've enabled security, but TC should be able to bind to 80/443 with 
default security setup.

Anyway, I suspect it is the unprivileged user issue. It can be resolved 
in three ways.

1. Run TC behind Apache, which would run on ports 80/443 and TC would be 
connected via mod_jk (or mod_jk2, if you're sentimental/more adapt to it)

2. Run TC as root, since it is a demonstration, that additional risk 
is not going to kill you, but it is definitely not for production.

3. Run TC via Jakarta-Commons Daemon and it's JSVC
Solution No2 is the fastest, try it out and if it works, you can calm 
down and play with the other two.

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


Re: Problem Binding Tomcat to Ports 80/443

2005-04-26 Thread Parsons Technical Services
Check to see if Tomcat is already running. Also the config you posted has 
the port at 8086. And something is listening on 8086.

Do a reboot and look at your processes and netstat before doing anything 
else. Then take it from there.

Doug
- Original Message - 
From: Craig [EMAIL PROTECTED]
To: tomcat-user@jakarta.apache.org
Sent: Tuesday, April 26, 2005 6:18 AM
Subject: Problem Binding Tomcat to Ports 80/443


Hey Tomcat Users!
I am having  a very desperate problem with Tomcat.  I have a demonstration
due later today, and the script I have been using to run tomcat (5.0.27)
on ports 80/443 doesn't seem to do the job -- though it had been
workingfor weeks up until a restart earlier today.  I'm getting these
kinds of errors in catalina.out when I try to start it on port 80/443:
Apr 26, 2005 1:23:55 AM org.apache.coyote.tomcat5.CoyoteConnector pause
SEVERE: Protocol handler pause failed
java.lang.NullPointerException
...
Apr 26, 2005 1:24:04 AM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Permission denied:80
I don't have anything running on ports 80 or 443, as a netstat -ltun
shows:
# netstat -ltun
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address   Foreign Address State
tcp0  0 127.0.0.1:8005  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:71440.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:80090.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:873 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:71450.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:3306  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:587 0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:80800.0.0.0:*   LISTEN
tcp0  0 66.93.121.250:530.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:530.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:80860.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:22  0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:54320.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:25  0.0.0.0:*   LISTEN
tcp0  0 127.0.0.1:953   0.0.0.0:*   LISTEN
tcp0  0 0.0.0.0:84430.0.0.0:*   LISTEN
udp0  0 0.0.0.0:32768   0.0.0.0:*
udp0  0 66.93.121.250:530.0.0.0:*
udp0  0 127.0.0.1:530.0.0.0:*
The connectors in my server.xml look like this:
   !-- Define a non-SSL Coyote HTTP/1.1 Connector on port 80 --
   Connector port=8086
  maxThreads=150 minSpareThreads=25 maxSpareThreads=75
  enableLookups=false acceptCount=100
  debug=0 connectionTimeout=2
  disableUploadTimeout=true redirectPort=443 /
  !-- Define a SSL Coyote HTTP/1.1 Connector on port 443 --
   Connector port=443
  minProcessors=5 maxProcessors=75
  enableLookups=true disableUploadTimeout=true
  acceptCount=100 debug=0 scheme=https secure=true
  clientAuth=false sslProtocal=TLS
  keystoreFile=/home/tomcat/.keystore keystorepass=xx
  keystoreType=JKS /
I get the same problem using the Tomcat5.sh jsvc script modified for my
installation as I do when I try to run tomcat as root!
It's like something has mysterously taken over ports 80/443 and won't tell
me about it or give them back!
Any suggestions?
- Craig
Ne te quaesiveris extra.
-
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]