fab服务器无法正常工作 - socket.error:[Errno 48]地址已在使用中

时间:2014-08-21 18:07:06

标签: python homebrew fabric

运行fab服务器时,我收到错误:

$ fab server

* Running on http://0.0.0.0:80/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/fabric/main.py", line 743, in main
*args, **kwargs
File "/usr/local/lib/python2.7/site-packages/fabric/tasks.py", line 419, in execute
results['<local-only>'] = task.run(*args, **new_kwargs)
File "/usr/local/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/Users/jonathantuck/Desktop/website/fabfile.py", line 8, in server
app.run(port = 80, debug = True, host = '0.0.0.0')
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 772, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.7/site-packages/werkzeug/serving.py", line 706, in run_simple
test_socket.bind((hostname, port))
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied

不确定我做错了什么。是我如何配置它?我用Google搜索,无法找到任何东西。我有什么想法我做错了吗?

编辑(运行sudo时):

$sudo fab server
* Running on http://0.0.0.0:80/
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/fabric/main.py", line 743, in main
*args, **kwargs
File "/usr/local/lib/python2.7/site-packages/fabric/tasks.py", line 419, in execute
results['<local-only>'] = task.run(*args, **new_kwargs)
File "/usr/local/lib/python2.7/site-packages/fabric/tasks.py", line 174, in run
return self.wrapped(*args, **kwargs)
File "/Users/jonathantuck/Desktop/website/fabfile.py", line 8, in server
app.run(port = 80, debug = True, host = '0.0.0.0')
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 772, in run
run_simple(host, port, self, **options)
File "/usr/local/lib/python2.7/site-packages/werkzeug/serving.py", line 706, in run_simple
test_socket.bind((hostname, port))
File "/usr/local/Cellar/python/2.7.8/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 48] Address already in use

编辑2(运行&#34; sudo lsof -i:80&#34;):

$ sudo lsof -i :80
Password:
COMMAND    PID       USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Google    8522 jonathantuck   84u  IPv4 0x6d0fd4be8004b79f      0t0  TCP 10.0.13.151:51920->stackoverflow.com:http (CLOSE_WAIT)
Google    8522 jonathantuck  128u  IPv4 0x6d0fd4be7dce379f      0t0  TCP 10.0.13.151:51913->stackoverflow.com:http (CLOSE_WAIT)
Google    8522 jonathantuck  129u  IPv4 0x6d0fd4be7ef83f87      0t0  TCP 10.0.13.151:51915->yv-in-f102.1e100.net:http (ESTABLISHED)
Google    8522 jonathantuck  142u  IPv4 0x6d0fd4be7dce079f      0t0  TCP 10.0.13.151:51916->a184-26-136-74.deploy.static.akamaitechnologies.com:http (ESTABLISHED)
httpd     8721       root    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     8722       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     9206       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     9207       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     9208       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)

$ sudo lsof -i :80
COMMAND    PID       USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
Google    8522 jonathantuck  110u  IPv4 0x6d0fd4be8004b79f      0t0  TCP     10.0.13.151:51967->a184-26-136-56.deploy.static.akamaitechnologies.com:http (ESTABLISHED)
Google    8522 jonathantuck  129u  IPv4 0x6d0fd4be7ef83f87      0t0  TCP 10.0.13.151:51915->yv-in-f102.1e100.net:http (ESTABLISHED)
httpd     8721       root    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     8722       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     9206       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     9207       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)
httpd     9208       _www    5u  IPv6 0x6d0fd4be722abb3f      0t0  TCP *:http (LISTEN)

0 个答案:

没有答案