4udak / pyftpdlib

Automatically exported from code.google.com/p/pyftpdlib
Other
1 stars 1 forks source link

10049 can't assign requested address #179

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
93.137.127.244
Traceback (most recent call last):
  File "", line 50, in <module>
    ftpd = ftpserver.FTPServer(address, ftp_handler)
  File "C:\Python25\lib\site-packages\pyftpdlib\ftpserver.py", line 3385, in __init__
    raise socket.error(msg)
socket.error: (10049, "Can't assign requested address")

i have the last pyftpdlib, python 2.5.4 and on windows xp.
it does work on the localhost. i tried to disable the firewall. 
i've got a Thomson TG782(i) if it means something.

and i know that it's not really a pyftpdlib problem but i don't know where to 
ask. i tried on google.

Original issue reported on code.google.com by janko.se...@gmail.com on 8 Jul 2011 at 1:26

GoogleCodeExporter commented 9 years ago
There's the pyftpdlib ml:
https://groups.google.com/forum/#!forum/pyftpdlib
Also, you should paste the code you're using otherwise it is impossible to know 
what is the address you're passing.

Original comment by g.rodola on 8 Jul 2011 at 1:29

GoogleCodeExporter commented 9 years ago
authorizer = ftpserver.DummyAuthorizer()
authorizer.add_user('username', 'password', os.getcwd(), perm='elradfmw')

ftp_handler = ftpserver.FTPHandler
ftp_handler.authorizer = authorizer
ftp_handler.banner = "Welcome"
address = (ip, 21)
ftpd = ftpserver.FTPServer(address, ftp_handler)
ftpd.serve_forever()

the part that has to do with the server setup

Original comment by janko.se...@gmail.com on 8 Jul 2011 at 1:36

GoogleCodeExporter commented 9 years ago
"ip" variable is the culprit.
What do you have in there?
That is supposed to be an interface name such as "eth0" or an IP address such 
as "0.0.0.0".
Also, it can be an empty string "" meaning "bind on all available interfaces".

Original comment by g.rodola on 8 Jul 2011 at 1:40

GoogleCodeExporter commented 9 years ago
it's an address, "93.137.127.244", i parse from a web page the ip.

anyway, i created a thread on the forums

Original comment by janko.se...@gmail.com on 8 Jul 2011 at 1:43