gpt4 book ai didi

python-2.7 - 无法收听错误 : Couldn't listen on any:9008: [Errno 98] Address already in use

转载 作者:行者123 更新时间:2023-12-04 02:13:52 29 4
gpt4 key购买 nike

我正在通过 python 在 websocket 上开发 Autobahn 的应用程序。我发现一个问题,如果我在中断后重新启动我的服务器代码一次,那么我的服务器代码将向我发送如下错误:

2016-03-03 13:20:34+0530 [-] Log opened.
2016-03-03 13:20:34+0530 [-] Traceback (most recent call last):
2016-03-03 13:20:34+0530 [-] File "TestServer.py", line 23, in <module>
2016-03-03 13:20:34+0530 [-] reactor.listenTCP(9008, factory)
2016-03-03 13:20:34+0530 [-] File "/home/ddserver/python1/local/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 478, in listenTCP
2016-03-03 13:20:34+0530 [-] p.startListening()
2016-03-03 13:20:34+0530 [-] File "/home/ddserver/python1/local/lib/python2.7/site-packages/twisted/internet/tcp.py", line 984, in startListening
2016-03-03 13:20:34+0530 [-] raise CannotListenError(self.interface, self.port, le)
2016-03-03 13:20:34+0530 [-] twisted.internet.error.CannotListenError: Couldn't listen on any:9008: [Errno 98] Address already in use.

我错误地理解有一些基本服务即使在中断服务器后仍在运行,但是所有这些端口有多清晰?

最佳答案

sudo lsof -i TCP:9008 | grep LISTEN 效果很好。

引用Python twisted reactor - address already in use

关于python-2.7 - 无法收听错误 : Couldn't listen on any:9008: [Errno 98] Address already in use,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35766239/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com