Re: setting tomcat to listen on port 80
For 1), actually, last time I checked, the 'tomcat.sh' script in commons-daemon was still configured for TC 4.1.x ;-). There is a note in the docs telling you how to modify it to work with TC 5. The commons-daemon 'jsvc' program that Yoav is refering to in 1) below works perfectly fine with TC 4.1.x (since that's the version I'm using it for :). Shapira, Yoav [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Howdy, You shouldn't run tomcat, or any java program, or any server program open to the outside world, as root. However, only root can bind port 80 on unix. So you have some options: 1. Use tomcat 5.x which can run as a non-root user and still bind to port 80. 2. Use Apache httpd in front of tomcat, apache runs on port 80, tomcat on another port, and apache directs requests for servlets/jsps to tomcat. 3. Use some unix redirections e.g. ipchains to redirect port 80 requests to 8080, where tomcat is running as non-root. 4. Some other options are available, but those are probably the best. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nadia Kunkov [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 2:34 PM To: Tomcat Users List Subject: RE: setting tomcat to listen on port 80 Oh, I don't know how to thank you!!! That's it! It finally works Now should we be using port 80 and running as root or should we better use port redirection: /etc/sysconfig/ipchains -I input --proto TCP --dport 80 -j REDIRECT 8080 -I input --proto TCP --dport 443 -j REDIRECT 8443 Thanks for your help. N.K. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:48 PM To: Tomcat Users List Subject: RE: setting tomcat to listen on port 80 Howdy, Your 8005 error is because you started tomcat before, and shut it down inappropriately, or not at all, so it's still listening on port 8005. 8005 is the default tomcat shutdown port. Shut down the first tomcat properly and completely. Then you'll be able to start on port 80 (and 8005 -- a server shutdown port is always required in addition to the connector port). Yoav Shapira Millennium ChemInformatics -Original Message- From: V.Karthik Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:47 PM To: Tomcat Users List Subject: Re: setting tomcat to listen on port 80 I really don't know how to help you. The server.xml file works well in Windows (i've tried it out, on port 80). So, temporarily, till one of us comes up with a solution, start httpd, and give a redirection page to http://yourhost:8080. Tomcat uses more ports such as a Shutdown Port / AJP13 Port etc. This you can see in all the Connector lists in server.xml file. There is nothing wrong in using port 80. It works well on Windows.. But i really don't know why it doesn't work on Linux. (That doesn't answer the question anyway) --- Nadia Kunkov [EMAIL PROTECTED] wrote: I'd like Tomcat 4 to be listening on port 80. I have changed server.xml file to read: Connector name = org.apache.catalina.connector.http.HttpConnector port = 80 . I'm running as root, I know only root can access this port. When I try to start Tomcat (tomcat4 start) I get a message: bind exception - permission denied:80, bind exception - 8005 address already in use. So I found a file /etc/tomcat4/tomcat4.conf where I changed tomcat-user to root. Now when I try to start Tomcat I only have one error: bind exception 8005 address already in use. My httpd is disabled, since we are using Tomcat as web server. In Firewall configuration I added a line with Accept action for port 80. It created an /etc/sysconfig/ipchains file. When I ran netstat -tupan I see no entry for port 80. But there is an entry for port 8005 that reads Java. Could you explain to me what does it all mean? I'm pretty new to this stuff so bear with me. Dies Tomcat need both ports 80 and 8005? Isn't Java mean Tomcat is listening on 8005? Anyway how can I make Tomcat listen on port 80? Just changing server.xml doesn't seem to be enough. Any ideas would be greatly appreciated. Thanks in advance. N.K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended
Re: setting tomcat to listen on port 80
On Wed, 5 Nov 2003, V.Karthik Kumar wrote: There is nothing wrong in using port 80. It works well on Windows.. But i really don't know why it doesn't work on Linux. Well, on Unixes ports under 1000 (or 1024?) are usually restricted to root. While most daemons are designed to be started by root but to run as some artificial user, tomcat as java application is not easy to set up this way. To me, putting a rough world proof proxy between tomcat and the world seems a good idea anyway for production systems. Although squid is the best known proxy, we and others use apache's proxy functions, e.g. ... ProxyPass/someapp/ http://localhost:8081/someapp/ ProxyPassReverse /someapp/ http://localhost:8081/someapp/ ... in the server configuration or a virtual host section of apache's configuration makes apache a perfect proxy for a Tomcat running with Coyote HTTP/1.1 connector. Besides not having to fight with the configuration and disadvantages of mod_jk/mod_wepapp, on can even use Apache to deliver static parts of the app, e.g. using this block: ProxyPass/someapp/Servlet http://localhost:8081/someapp/Servlet ProxyPassReverse /someapp/Servlet http://localhost:8081/someapp/Servlet Alias/someapp//somewhere/webapps/someapp/ This allows one to use all of Apache nice features, e.g. all those .htaccess things. To safely avoid access to the WEB-INF subdirectory, this is a good idea when using the above suggestion: DirectoryMatch WEB-INF Order allow,deny Deny from all /DirectoryMatch Using Apache/Tomcat this way, we reduced the open files, sockets and the processes on our production server by over 70 percent! (We are looking forward to Tomcat 5's progress concering threads and open files ;-) kr Christoph Lechleitner - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
setting tomcat to listen on port 80
I'd like Tomcat 4 to be listening on port 80. I have changed server.xml file to read: Connector name = org.apache.catalina.connector.http.HttpConnector port = 80 . I'm running as root, I know only root can access this port. When I try to start Tomcat (tomcat4 start) I get a message: bind exception - permission denied:80, bind exception - 8005 address already in use. So I found a file /etc/tomcat4/tomcat4.conf where I changed tomcat-user to root. Now when I try to start Tomcat I only have one error: bind exception 8005 address already in use. My httpd is disabled, since we are using Tomcat as web server. In Firewall configuration I added a line with Accept action for port 80. It created an /etc/sysconfig/ipchains file. When I ran netstat -tupan I see no entry for port 80. But there is an entry for port 8005 that reads Java. Could you explain to me what does it all mean? I'm pretty new to this stuff so bear with me. Dies Tomcat need both ports 80 and 8005? Isn't Java mean Tomcat is listening on 8005? Anyway how can I make Tomcat listen on port 80? Just changing server.xml doesn't seem to be enough. Any ideas would be greatly appreciated. Thanks in advance. N.K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: setting tomcat to listen on port 80
I really don't know how to help you. The server.xml file works well in Windows (i've tried it out, on port 80). So, temporarily, till one of us comes up with a solution, start httpd, and give a redirection page to http://yourhost:8080. Tomcat uses more ports such as a Shutdown Port / AJP13 Port etc. This you can see in all the Connector lists in server.xml file. There is nothing wrong in using port 80. It works well on Windows.. But i really don't know why it doesn't work on Linux. (That doesn't answer the question anyway) --- Nadia Kunkov [EMAIL PROTECTED] wrote: I'd like Tomcat 4 to be listening on port 80. I have changed server.xml file to read: Connector name = org.apache.catalina.connector.http.HttpConnector port = 80 . I'm running as root, I know only root can access this port. When I try to start Tomcat (tomcat4 start) I get a message: bind exception - permission denied:80, bind exception - 8005 address already in use. So I found a file /etc/tomcat4/tomcat4.conf where I changed tomcat-user to root. Now when I try to start Tomcat I only have one error: bind exception 8005 address already in use. My httpd is disabled, since we are using Tomcat as web server. In Firewall configuration I added a line with Accept action for port 80. It created an /etc/sysconfig/ipchains file. When I ran netstat -tupan I see no entry for port 80. But there is an entry for port 8005 that reads Java. Could you explain to me what does it all mean? I'm pretty new to this stuff so bear with me. Dies Tomcat need both ports 80 and 8005? Isn't Java mean Tomcat is listening on 8005? Anyway how can I make Tomcat listen on port 80? Just changing server.xml doesn't seem to be enough. Any ideas would be greatly appreciated. Thanks in advance. N.K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setting tomcat to listen on port 80
I should mention I'm running Tomcat on Linux... I'm not sure if that makes any difference. N.K. -Original Message- From: V.Karthik Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:47 PM To: Tomcat Users List Subject: Re: setting tomcat to listen on port 80 I really don't know how to help you. The server.xml file works well in Windows (i've tried it out, on port 80). So, temporarily, till one of us comes up with a solution, start httpd, and give a redirection page to http://yourhost:8080. Tomcat uses more ports such as a Shutdown Port / AJP13 Port etc. This you can see in all the Connector lists in server.xml file. There is nothing wrong in using port 80. It works well on Windows.. But i really don't know why it doesn't work on Linux. (That doesn't answer the question anyway) --- Nadia Kunkov [EMAIL PROTECTED] wrote: I'd like Tomcat 4 to be listening on port 80. I have changed server.xml file to read: Connector name = org.apache.catalina.connector.http.HttpConnector port = 80 . I'm running as root, I know only root can access this port. When I try to start Tomcat (tomcat4 start) I get a message: bind exception - permission denied:80, bind exception - 8005 address already in use. So I found a file /etc/tomcat4/tomcat4.conf where I changed tomcat-user to root. Now when I try to start Tomcat I only have one error: bind exception 8005 address already in use. My httpd is disabled, since we are using Tomcat as web server. In Firewall configuration I added a line with Accept action for port 80. It created an /etc/sysconfig/ipchains file. When I ran netstat -tupan I see no entry for port 80. But there is an entry for port 8005 that reads Java. Could you explain to me what does it all mean? I'm pretty new to this stuff so bear with me. Dies Tomcat need both ports 80 and 8005? Isn't Java mean Tomcat is listening on 8005? Anyway how can I make Tomcat listen on port 80? Just changing server.xml doesn't seem to be enough. Any ideas would be greatly appreciated. Thanks in advance. N.K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - 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: setting tomcat to listen on port 80
Howdy, Your 8005 error is because you started tomcat before, and shut it down inappropriately, or not at all, so it's still listening on port 8005. 8005 is the default tomcat shutdown port. Shut down the first tomcat properly and completely. Then you'll be able to start on port 80 (and 8005 -- a server shutdown port is always required in addition to the connector port). Yoav Shapira Millennium ChemInformatics -Original Message- From: V.Karthik Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:47 PM To: Tomcat Users List Subject: Re: setting tomcat to listen on port 80 I really don't know how to help you. The server.xml file works well in Windows (i've tried it out, on port 80). So, temporarily, till one of us comes up with a solution, start httpd, and give a redirection page to http://yourhost:8080. Tomcat uses more ports such as a Shutdown Port / AJP13 Port etc. This you can see in all the Connector lists in server.xml file. There is nothing wrong in using port 80. It works well on Windows.. But i really don't know why it doesn't work on Linux. (That doesn't answer the question anyway) --- Nadia Kunkov [EMAIL PROTECTED] wrote: I'd like Tomcat 4 to be listening on port 80. I have changed server.xml file to read: Connector name = org.apache.catalina.connector.http.HttpConnector port = 80 . I'm running as root, I know only root can access this port. When I try to start Tomcat (tomcat4 start) I get a message: bind exception - permission denied:80, bind exception - 8005 address already in use. So I found a file /etc/tomcat4/tomcat4.conf where I changed tomcat-user to root. Now when I try to start Tomcat I only have one error: bind exception 8005 address already in use. My httpd is disabled, since we are using Tomcat as web server. In Firewall configuration I added a line with Accept action for port 80. It created an /etc/sysconfig/ipchains file. When I ran netstat -tupan I see no entry for port 80. But there is an entry for port 8005 that reads Java. Could you explain to me what does it all mean? I'm pretty new to this stuff so bear with me. Dies Tomcat need both ports 80 and 8005? Isn't Java mean Tomcat is listening on 8005? Anyway how can I make Tomcat listen on port 80? Just changing server.xml doesn't seem to be enough. Any ideas would be greatly appreciated. Thanks in advance. N.K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setting tomcat to listen on port 80
Oh, I don't know how to thank you!!! That's it! It finally works Now should we be using port 80 and running as root or should we better use port redirection: /etc/sysconfig/ipchains -I input --proto TCP --dport 80 -j REDIRECT 8080 -I input --proto TCP --dport 443 -j REDIRECT 8443 Thanks for your help. N.K. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:48 PM To: Tomcat Users List Subject: RE: setting tomcat to listen on port 80 Howdy, Your 8005 error is because you started tomcat before, and shut it down inappropriately, or not at all, so it's still listening on port 8005. 8005 is the default tomcat shutdown port. Shut down the first tomcat properly and completely. Then you'll be able to start on port 80 (and 8005 -- a server shutdown port is always required in addition to the connector port). Yoav Shapira Millennium ChemInformatics -Original Message- From: V.Karthik Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:47 PM To: Tomcat Users List Subject: Re: setting tomcat to listen on port 80 I really don't know how to help you. The server.xml file works well in Windows (i've tried it out, on port 80). So, temporarily, till one of us comes up with a solution, start httpd, and give a redirection page to http://yourhost:8080. Tomcat uses more ports such as a Shutdown Port / AJP13 Port etc. This you can see in all the Connector lists in server.xml file. There is nothing wrong in using port 80. It works well on Windows.. But i really don't know why it doesn't work on Linux. (That doesn't answer the question anyway) --- Nadia Kunkov [EMAIL PROTECTED] wrote: I'd like Tomcat 4 to be listening on port 80. I have changed server.xml file to read: Connector name = org.apache.catalina.connector.http.HttpConnector port = 80 . I'm running as root, I know only root can access this port. When I try to start Tomcat (tomcat4 start) I get a message: bind exception - permission denied:80, bind exception - 8005 address already in use. So I found a file /etc/tomcat4/tomcat4.conf where I changed tomcat-user to root. Now when I try to start Tomcat I only have one error: bind exception 8005 address already in use. My httpd is disabled, since we are using Tomcat as web server. In Firewall configuration I added a line with Accept action for port 80. It created an /etc/sysconfig/ipchains file. When I ran netstat -tupan I see no entry for port 80. But there is an entry for port 8005 that reads Java. Could you explain to me what does it all mean? I'm pretty new to this stuff so bear with me. Dies Tomcat need both ports 80 and 8005? Isn't Java mean Tomcat is listening on 8005? Anyway how can I make Tomcat listen on port 80? Just changing server.xml doesn't seem to be enough. Any ideas would be greatly appreciated. Thanks in advance. N.K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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: setting tomcat to listen on port 80
Howdy, You shouldn't run tomcat, or any java program, or any server program open to the outside world, as root. However, only root can bind port 80 on unix. So you have some options: 1. Use tomcat 5.x which can run as a non-root user and still bind to port 80. 2. Use Apache httpd in front of tomcat, apache runs on port 80, tomcat on another port, and apache directs requests for servlets/jsps to tomcat. 3. Use some unix redirections e.g. ipchains to redirect port 80 requests to 8080, where tomcat is running as non-root. 4. Some other options are available, but those are probably the best. Yoav Shapira Millennium ChemInformatics -Original Message- From: Nadia Kunkov [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 2:34 PM To: Tomcat Users List Subject: RE: setting tomcat to listen on port 80 Oh, I don't know how to thank you!!! That's it! It finally works Now should we be using port 80 and running as root or should we better use port redirection: /etc/sysconfig/ipchains -I input --proto TCP --dport 80 -j REDIRECT 8080 -I input --proto TCP --dport 443 -j REDIRECT 8443 Thanks for your help. N.K. -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:48 PM To: Tomcat Users List Subject: RE: setting tomcat to listen on port 80 Howdy, Your 8005 error is because you started tomcat before, and shut it down inappropriately, or not at all, so it's still listening on port 8005. 8005 is the default tomcat shutdown port. Shut down the first tomcat properly and completely. Then you'll be able to start on port 80 (and 8005 -- a server shutdown port is always required in addition to the connector port). Yoav Shapira Millennium ChemInformatics -Original Message- From: V.Karthik Kumar [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 05, 2003 1:47 PM To: Tomcat Users List Subject: Re: setting tomcat to listen on port 80 I really don't know how to help you. The server.xml file works well in Windows (i've tried it out, on port 80). So, temporarily, till one of us comes up with a solution, start httpd, and give a redirection page to http://yourhost:8080. Tomcat uses more ports such as a Shutdown Port / AJP13 Port etc. This you can see in all the Connector lists in server.xml file. There is nothing wrong in using port 80. It works well on Windows.. But i really don't know why it doesn't work on Linux. (That doesn't answer the question anyway) --- Nadia Kunkov [EMAIL PROTECTED] wrote: I'd like Tomcat 4 to be listening on port 80. I have changed server.xml file to read: Connector name = org.apache.catalina.connector.http.HttpConnector port = 80 . I'm running as root, I know only root can access this port. When I try to start Tomcat (tomcat4 start) I get a message: bind exception - permission denied:80, bind exception - 8005 address already in use. So I found a file /etc/tomcat4/tomcat4.conf where I changed tomcat-user to root. Now when I try to start Tomcat I only have one error: bind exception 8005 address already in use. My httpd is disabled, since we are using Tomcat as web server. In Firewall configuration I added a line with Accept action for port 80. It created an /etc/sysconfig/ipchains file. When I ran netstat -tupan I see no entry for port 80. But there is an entry for port 8005 that reads Java. Could you explain to me what does it all mean? I'm pretty new to this stuff so bear with me. Dies Tomcat need both ports 80 and 8005? Isn't Java mean Tomcat is listening on 8005? Anyway how can I make Tomcat listen on port 80? Just changing server.xml doesn't seem to be enough. Any ideas would be greatly appreciated. Thanks in advance. N.K - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Protect your identity with Yahoo! Mail AddressGuard http://antispam.yahoo.com/whatsnewfree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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