Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

recently i have created a new ec2 instances (quick launch ) and i tried to deploy my Play! application the security group gives access to port 80 and port 22 (SSH) but when i run :

play start 80

it gives me this

[error] Failed to bind to: /
[error] Use 'last' for the full log.

which means that the 80 port is used when i run

netstat -tlnp 

i get

    Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0      *                   LISTEN      3692/sendmail       
tcp        0      0        *                   LISTEN      3653/sshd           
tcp        0      0 :::22                       :::*                        LISTEN      3653/sshd 

i've searched all the web but i didn't figure it out, help me please !

NOTE : i just solve this all i have to do is start it with sudo.

share|improve this question
Are you trying to start the Play! application as root (i.e. with sudo)? You need superuser privileges to bind to ports below 1024. Also, the second line of the error says to 'use last for the full log'. What is displayed in the 'full log'? – cyberx86 Feb 11 '13 at 1:23
i just figured out, i'm dumb actually i just have to run with sudo. thank you! – daoud Feb 11 '13 at 1:23
@user1585227 - please post a proper answer and accept it. – EEAA Feb 11 '13 at 1:53

Since you're binding to a port below 1024, it must be started with root privileges.

Try something like:

sudo play start 80
share|improve this answer
Is it safe to do that? – cdmckay Aug 25 '13 at 18:31
I wouldn't think so. – Michael Hampton Aug 25 '13 at 22:20
So what's a safe way to bind to port 80? – cdmckay Aug 25 '13 at 22:24
That's a whole other question entirely. – Michael Hampton Aug 25 '13 at 22:25
@MichaelHampton not helpfull, i got error sudo: play: command not found, – Govind Singh Nagarkoti Jun 10 '14 at 14:36

To deploy on EC2 you should create a standalone version of your application in your local machine using:

play dist

Then you copy the generated .zip to your EC2 instance using scp, unzip it using unzip.

You would then want to run your application like so:

sudo nohup yourAppName-version/bin/yourAppName -Dhttp.port=80

sudo in order to be able to bind to a port below 1024.

nohup in order to be able to exit the ssh session without sending the HUP signal to your play app.

yourAppName-version/bin/yourAppName replaced with YOUR app's name & version should be where your script is.

-Dhttp.port is the option to bind to a given port.

Additional Info: You should consider adding -J-Xms128M -J-Xmx512m to avoid RAM allocation problems (I use micro instances, adjust to your needs).

share|improve this answer

Your Answer


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.