1
>> server.bind(('192.168.38.23',80)) 
Traceback (most recent call last):   
File "<stdin>", line 1, in <module>   
File "/usr/lib/python2.7/socket.py", line 228, in meth     
return getattr(self._sock,name)(*args) 
socket.error: [Errno 99] Cannot assign requested address

Why is it not assigning this address?

evil eye
  • 11
  • 2

1 Answers1

0

It's usually because you don't have permissions to do that. Usually ports below 1024 are restricted to root on Linux machines (privileged ports). For further context you can search for privileged ports or read questions like this.

I guess it works, if you change your line to:

server.bind(('192.168.38.23',8080)) 
Grzegorz Oledzki
  • 23,614
  • 16
  • 68
  • 106