I have installed Authbind to run Tomcat on port 80 in Ubuntu.
I have followed <a href="http://netthink.com/?p=362" rel="nofollow">http://netthink.com/?p=362</a> to run Tomcat in Ubuntu in port 80.
When I run Tomcat on the command line by typing
./start.sh, Tomcat starts normally on port 80 without any exception.
In order to run Tomcat from Eclipse I installed the Tomcat plugin from
http://www.eclipsetotale.com/tomcatPlugin.html. Everything is fine except that when I want to start Tomcat from Eclipse. When I run Tomcat from Eclipse by the Tomcat plugin, I get the following exception:
java.net.BindException: Permission denied :80</blockquote>
And if I add Tomcat as a server in "Server view" in Eclipse and want to start it from Server view I get this exception:<blockquote>
Port 80 required by Tomcat v6.0 Server at localhost is already in use</blockquote>
But I am sure that there is not any process that acquires port 80, because in the same time when I run Tomcat on the command line by typing
./start.sh, Tomcat starts normally on port 80.
How do I run Tomcat from Eclipse on port 80?
Using another port other than 80 and less than 1024 for Tomcat and start it in Server View in Eclipse gave me the same exception. For example, for port 82:<blockquote>
Port 82 required by Tomcat v6.0 Server at localhost is already in use</blockquote> Answer1:
You said :<blockquote>
<em>But i am sure that there is not any process that acquires port</em> 80,because in the same time when i run Tomcat in command line by <em>typing ./start.sh ,tomcat starts normally in port 80.</em></blockquote>
Did you stop Tomcat in command line before starting it with Eclipse ?
To make sure your Tomcat is stopped, type this :
ps -ef|grep tomcat
You should have something like this if Tomcat is stopped :
user 16428 16373 0 13:56 pts/1 00:00:00 grep --color=auto tomcatAnswer2:
try running eclipse as root and then start tomcat (on port 80).. should work. although not an optimal solution. But should work since 80 is a privileged port in linux and requires sudo permissions to run.Answer3:
You should start eclipse with:<br />
authbind --deep eclipse <br />Since eclipse doesn't start tomcat via <em>startup.sh</em> file, inserting authbind there will have no effect.