Eason
我也遇到了这种情况,记录下解决过程,感谢 Eason 的解答。
1、先检查配置文件,agent-sources.zip(解压后) -> config -> application-prod.yml
- agent host:一定要填写 agent 机器的 IP 地址,不是服务端!确保ipv4是否正确!
- agent port:默认 7777
然后看下 agent 7777 端口是否可用
$ telnet 192.168.xxx.xxx 7777
Trying 192.168.xxx.xxx...
Connected to 192.168.xxx.xxx.
Escape character is '^]'.
# 查看 agent 机器是否监听 7777 端口
# Mac
$ netstat -AaLlnW | grep 7777
a5ce05e1635f483f 0 0/0/100 *.7777
# Windwos
$ netstat -nao | findstr 7777
TCP 0.0.0.0:7777 0.0.0.0:0 LISTENING 8052
TCP [::]:7777 [::]:0 LISTENING 8052
2、windows的cmd如果你点击了会阻塞,这时候在cmd里面回车一下
3、还有一种可能,如果 agent 部署在 linux 的话,需要防火墙开放 agent 的端口
# 检查防火墙状态
$ firewall-cmd --state
not running
4、appium 环境正常,没有上面 The main Appium script does not exist
的报错。