Appium port 被占用 kill 掉后,还会提示 cannot bind to socket

0x7C00 · 2015年01月05日 · 最后由 0x7C00 回复于 2015年01月06日 · 1497 次阅读
> info: [debug] Stopping logcat capture
> info: [debug] Logcat terminated with code null, signal SIGTERM
> info: [debug] Sent shutdown command, waiting for UiAutomator to stop...
> warn: UiAutomator did not shut down fast enough, calling it gone
> error: Failed to start an Appium session, err was: Error: Command failed: error: cannot bind to socket
> error: cannot bind to socket
> 
> info: [debug] Cleaning up android objects
> info: [debug] Cleaning up appium session
> info: [debug] Error: Command failed: error: cannot bind to socket
> error: cannot bind to socket
> 
>     at ChildProcess.exithandler (child_process.js:637:15)
>     at ChildProcess.EventEmitter.emit (events.js:98:17)
>     at maybeClose (child_process.js:743:16)
>     at Process.ChildProcess._handle.onexit (child_process.js:810:5)
> info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Command failed: error: cannot bind to socket\r\nerror: cannot bind to  socket\r\n)","killed":false,"code":1,"signal":null,"origValue":"Command failed: error: cannot bind to socket\r\nerror: cannot bind to socket\r\n"},"sessionId":null}
> info: <-- POST /wd/hub/session 500 64347.822 ms - 320 
> Killed Node Server.
> Node Server Process Ended

发现这个问题后,想到是不是 port 被占用了。
1:命令:adb nodaemon server
提示 cannot bind 'tcp:5037':
2:命令:netstat -ano | findstr "5037" 发现一个进程占用该 port

但是 kill 掉以后,重新启动,还是会提示 cannot bind to socket

哪位大侠还有遇到这个情况。O(∩_∩) O 谢谢,或者是其他的原因导致啊?

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 9 条回复 时间 点赞

没人回复,现在还不知道什么原因,修改了 port 为 4755,竟然又可以了。° △ °|||

#1 楼 @xie_0723 你要看看是否真的杀死了。

新手...求教...怎么发帖子...发送按钮怎么没用 谢谢

#3 楼 @525250478 新人注册的时候,没看到提示么?新人 24 小时内无法发帖。

#4 楼 @lihuazhang 我拿的网站的账号登录的...谢谢您

#5 楼 @525250478 github 的账号?

#5 楼 @525250478 先看看网站,别一上来就刷问题。你问的东西很多都已经有帖子了。

路过 😳

@lihuazhang 谢谢梨花,可能是没注意到这个,以为 kill 掉了 。

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册