我正在通過python websocket上的Autobahn的應用程序。 我發現了一個問題,如果我再打斷一次後重新啓動我的服務器代碼我的服務器代碼會送我的錯誤,如:CannotListenError:無法聽任何:9008:[Errno 98]地址已在使用
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.
我的錯誤理解是有其背後甚至中斷後上運行的一些基本服務服務器,但如何清除所有這些端口?
其簡單的使用命令 「定影-k -n TCP」 –