77581

Start Tomcat from Eclipse in port 80 in Ubuntu with Authbind

Question:

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:

<blockquote>

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 tomcat

Answer2:

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.

Recommend

  • Can't Bind to Broadcast Address in Client — Java/Scala [closed]
  • java: bind exception address in use error when it isn't in use (as shown by netstat)
  • Tomcat Problem :java.net.BindException: Address already in use :8080 at org.apache.tomcat.util.net.J
  • LocateRegistry.createRegistry
  • SSL Connection timeout and read timeouts
  • Setting up ElastiCache Redis with Elastic BeanStalk + Django
  • How to execute Blackberry OS 6 app in Blackberry 10 OS
  • GDB skips over my code!
  • Can you use multiple instances of Edge on a Selenium Grid Node?
  • python & Mysql: unsupported operand type(s) for -: 'int' and 'tuple'
  • proxy request in node.js / express
  • Installing SSL on AWS EC2 Bitnami Mean Stack
  • Symfony2 redirect to https route fails (uses wrong port)
  • Rails 3.2 from SQLite locally to Postgres on Heroku
  • XBee Linux Serial Port on Rasberry Pi
  • node.js POST request fails
  • CORS with socket.io
  • Jenkins Grails plugin does not list lastest versions of Grails
  • Iron Router: How do I send data to the layout?
  • Prevent Tomcat from caching request during starup
  • How to generate and display a QR Code in ionic 2
  • Access Android Market through SSH tunnel
  • How to run “Deployd” on port 80 instead of port 5000 in webserver.
  • does jqgrid support a multiple checkbox list for editing
  • Optimizing database types to compact database (SQLite)
  • Get object from AWS S3 as a stream
  • Sony Xperia Z Tablet not found by adb
  • How to recover from a Spring Social ExpiredAuthorizationException
  • Cross-Platform Protobuf Serialization
  • Validaiting emails with Net.Mail MailAddress
  • Do I've to free mysql result after storing it?
  • How can I estimate amount of memory left with calling System.gc()?
  • How to format a variable of double type
  • How to get icons for entities from eclipse?
  • Proper way to use connect-multiparty with express.js?
  • Load html files in TinyMce
  • Hits per day in Google Big Query
  • coudnt use logback because of log4j
  • Turn off referential integrity in Derby? is it possible?
  • JaxB to read class hierarchy