问题描述:
启动 sonic-agent-linux:v1.4.1-beta docker 镜像,启动后马上就关闭了,
docker-compose.yml :
services:
sonic-agent:
image: "registry.cn-hangzhou.aliyuncs.com/sonic-cloud/sonic-agent-linux:v1.4.1-beta"
environment:
# 对应server的env配置,注意防火墙关闭对应端口
- SERVER_HOST=192.168.0.105
- SERVER_PORT=3000
# 替换为部署Agent机器的ipv4
- AGENT_HOST=192.168.0.105
# 替换为Agent服务的端口,可以自行更改
- AGENT_PORT=8900
# 替换为前端新增Agent生成的key
- AGENT_KEY=af4bb43c-4865-4618-a54e-549de88f6e66
# 是否使用安卓模块
- ANDROID_ENABLE=true
# 是否开启远程adb调试功能
- USE_ADBKIT=true
# 是否使用iOS模块
- IOS_ENABLE=true
# 替换为你自己使用的wda的bundleId,如果没有.xctrunner后缀会自动补全,建议使用公司的开发者证书
- WDA_BUNDLE_ID=com.leon.liu.WebDriverAgentRunner.xctrunner
# 是否启用Appium
- APPIUM_ENABLE=true
# 是否启用webview调试功能
- WEBVIEW_ENABLE=true
# 谷歌调试端口,一般不需要修改(默认0使用随机端口,如果需要开启防火墙给外部使用,请设置固定端口如7778)
- CHROME_DRIVER_PORT=0
# 是否开启sonic-go-mitmproxy代理功能
- SGM_ENABLE=true
network_mode: "host"
privileged: true
volumes:
- /dev/bus/usb:/dev/bus/usb
- /var/run/usbmuxd:/var/run/usbmuxd%
相关日志:
========================== Check Completed ==========================
2022-07-01 01:43:15.522 - WARN 1 --- [main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 3000 is already in use
2022-07-01 01:43:15.525 - INFO 1 --- [main] org.cloud.sonic.agent.tools.LaunchTool : Release done!
2022-07-01 01:43:15.529 - INFO 1 --- [main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-07-01 01:43:15.553 - INFO 1 --- [main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-07-01 01:43:15.571 -ERROR 1 --- [main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 3000 was already in use.
Action:
Identify and stop the process that's listening on port 3000 or configure this application to listen on another port.