2

I might be asking a dumb question but I have been stuck on this for a quite some time now. I am running a Linux VM instance on google compute engine and installed Django in it. I have reserved a static ip address using networking but when I try to run

python manage.py runserver [my ip address]:8080

but i get this error:

Error: That IP address can't be assigned to.

I know it has something to do with my ip address configuration. I believe somehow, django is not able to reach my ip address. Does anyone know what to do? How do I configure this properly (in google console, VM or otherwise) to get this running?

Any suggestions will be highly appreciated.

sshussain270
  • 1,785
  • 4
  • 25
  • 49
  • Maybe you have another service, that work with this port, try change default port using this command: `python manage.py runserver 8080`. 8080 is another number of port. – Zagorodniy Olexiy Dec 12 '16 at 00:36
  • You should run your server at ip `0.0.0.0:8080`, not your public ip. If it still doesn't work, check that your firewall rules allow access to `0.0.0.0:8080`. You can do so [here](https://console.cloud.google.com/networking/firewalls/list) (you are looking for `tcp` protocol). – Mirac7 Dec 17 '16 at 23:21

1 Answers1

0

Use internal private IP address for the VM. That worked for me.

python manage.py runserver 10.xxx.0.x:8000