3

I have Grails 1.3.6 installed on my up to date Ubuntu box. I'd like to use the run-app command with the port set to port 80 (firewall, etc), however whenever I do I get the following exception:

Server failed to start: LifecycleException: Protocol handler initialization failed: java.net.BindException: Permission denied:80

How do I change my configuration so I can bind to port 80?

4
  • 2
    I don't have any knowledge about grails, but is it running with root ? A process can not bind to privileged ports (<1024) unless it runs with root or you set the bind capability to the binary. Feb 1, 2011 at 18:57
  • Definitely not running as root. How can I do the later?
    – C. Ross
    Feb 1, 2011 at 19:33
  • @João Pinto Since this is effectively java, if I set the bind capability, won't I set it for all java?
    – C. Ross
    Feb 2, 2011 at 18:04
  • 2
    Yes, it will set it to all java apps. There is no other way to do it. check how to do it at serverfault.com/questions/133415/… . Feb 3, 2011 at 14:48

1 Answer 1

2

As João Pinto notes, ordinarily only root can bind to privileged ports (1-1023). It's probably more common in cases like this to set up some kind of reverse proxy server (apache, nginx, lighttpd, etc.) to listen on port 80 and send requests back to the grails app running on a higher port.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .