Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Error: That IP address can't be assigned-to" when running app

Tags:

python

django

Whenever I'm trying to launch a Django server app with a LAN ip I receive the error:

Django version 1.4.1, using settings 'servidorMain.settings'
Development server is running at http://192.168.1.XX:8080/
Quit the server with CONTROL-C.
Error: That IP address can't be assigned-to.

In localhost it works perfectly. I also was checking the network configuration and I think all is correct so I dont see where is the problem.

Thanks in advance.

like image 828
JavierRR Avatar asked Apr 05 '13 18:04

JavierRR


4 Answers

Use:

python manage.py runserver 0:8000
like image 113
Vladislav Mitov Avatar answered Nov 13 '22 05:11

Vladislav Mitov


If you are using Amazon EC2 or Lightsail use private and public IPs like this:

Public for browser: <your-public-ip>:8000

Private for command line: python manage.py runserver <your-PRIVATE-ip>:8000

like image 26
Eugene Chabanov Avatar answered Nov 13 '22 03:11

Eugene Chabanov


You should check with your IP, as mine was changed and was getting the same error

like image 5
Manan Patel Avatar answered Nov 13 '22 03:11

Manan Patel


It is equivalent to error code #99 in c language errors list, It's described by this term:

Cannot assign requested address

It is not a permission problem, because permission's error code is different so I think it's because you have not that IP address set on your computer. When you try to run server on an specified IP address, you should have it set on one of your network interfaces.

Simply the IP address you're trying to run server on it is not your current IP address.

like image 3
MostafaR Avatar answered Nov 13 '22 04:11

MostafaR