Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am now trying to deploy my Rails application to Torquebox 2.0.3 on Ubuntu Server 11.04. Now it's correctly deployed , I could visit the application on port 8080. but I could not configure the server to listen to port 80.

I tried to set the port to listen in $TORQUEBOX_HOME/jboss/standalone/configuration/standalone.xml :

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

    ....

    <socket-binding name="http" port="80"/>

    ....
</socket-binding-group>

After that when I start Torquebox by calling torquebox run, and I get the following error:

15:47:07,804 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Error initializing endpoint: java.net.BindException: Permission denied /127.0.0.1:80
    at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:983) [jbossweb-7.0.13.Final.jar:]
    at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.13.Final.jar:]
    at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.13.Final.jar:]
    at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControlle

rImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_23]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Thread

PoolExecutor.java:603) [rt.jar:1.6.0_23]
    at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_23]

But I find no process is holding port 80:

$ sudo lsof -i :80
$ sudo netstat -tulpn | grep :80
$

How could I solve this problem and configure jboss server to listen to port 80?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Lower numbered ports - lower than 1024 tend to be restricted to root users - the best/simplest way to get around this is to forward port 80 to 8080 internally at iptables or at the network's firewall, rather than at the application level.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.