我试图使用vscode作为在此描述在macos上为python设置精益引擎。
当我试图运行容器时,我得到了docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:55555: bind: address already in use.
这是日志输出
A Lean container is halted and will be removed. Continue? [y/n]: y
LeanEngine
Pulling Docker image: quantconnect/lean:latest
latest: Pulling from quantconnect/lean
Digest: sha256:ff6d17d055d27da2adcde8743628768880129ea68496e8b85a94d699543664db
Status: Image is up to date for quantconnect/lean:latest
docker.io/quantconnect/lean:latest
Launching LeanEngine with command:
docker run --rm --mount type=bind,source=/Users/odelibalta/Documents/Code/GitHub/Lean/Launcher/config.json,target=/Lean/Launcher/config.json,readonly -v /Users/odelibalta/Documents/Code/GitHub/Lean/Data:/Data:ro -v /Users/odelibalta/Documents/Code/GitHub/Lean/Results:/Results --name LeanEngine -p 5678:5678 --expose 6000 -v /Users/odelibalta/Documents/Code/GitHub/Lean/Algorithm.Python:/Lean/Algorithm.Python -p 55555:55555 --entrypoint mono quantconnect/lean:latest --debug --debugger-agent=transport=dt_socket,server=y,address=0.0.0.0:55555,suspend=y QuantConnect.Lean.Launcher.exe --data-folder /Data --results-destination-folder /Results --config /Lean/Launcher/config.json
docker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:55555: bind: address already in use.
ERRO[0000] error waiting for container: context canceled 所以我现在很困惑,因为我没有在55555上运行任何东西
➜ Homestead git:(release) sudo lsof -i:55555
Password:
➜ Homestead git:(release)无论我是在VsCode中运行容器,还是试图通过docker桌面运行容器,这都是一样的。
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
416ab7089c13 quantconnect/lean:latest "mono --debug --debu…" About a minute ago Created LeanEngine我没有任何的nginx或apache运行。我的主机文件是默认不变的。我唯一安装的东西是流浪汉与虚拟盒和一个Laravel家园vm。
我真的很感谢你的任何意见。谢谢你找我
更新
感谢特里的评论,我现在知道这与调试选项有关。当我禁用调试,然后在容器中运行调试时,它会一直运行。与上面的命令相比,它运行下面的命令
docker run --rm --mount type=bind,source=/Users/odelibalta/Documents/Code/GitHub/Lean/Launcher/config.json,target=/Lean/Launcher/config.json,readonly -v /Users/odelibalta/Documents/Code/GitHub/Lean/Data:/Data:ro -v /Users/odelibalta/Documents/Code/GitHub/Lean/Results:/Results --name LeanEngine -p 5678:5678 --expose 6000 -v /Users/odelibalta/Documents/Code/GitHub/Lean/Algorithm.Python:/Lean/Algorithm.Python quantconnect/lean:latest --data-folder /Data --results-destination-folder /Results --config /Lean/Launcher/config.json仍然不确定为什么会发生这种情况,我希望能够进行调试。我已经将vscode中的单一版本设置为15.8,如github指令中所述。我也在我的电脑上安装了15.8版本,但是我得到了以下输出
Lean git:(master) ✗ msbuild --version
Microsoft (R) Build Engine version 16.0.38-preview+g300887e680 for Mono
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1001: Unknown switch.
Switch: --version
For switch syntax, type "MSBuild /help"发布于 2021-01-15 05:23:08
在您的run命令中,去掉“-调试--调试器-代理=transport、server=y、address=0.0.0.0:55555、suspend=y”。这是试图使用相同的端口,这就是为什么您得到的地址已经在使用错误。
在不同端口上运行调试器也会工作,只要它不是您通过docker公开的端口之一。
很高兴它能用,谢谢!
https://stackoverflow.com/questions/65729808
复制相似问题