我正在使用Jenkins插件在码头主机上动态地启动奴隶。詹金斯大师在同一台主机上运行。在构建时,它会在停靠主机上选择一个随机端口,并且无法连接到它。它发射码头集装箱。这是原木。没什么比这更能说明问题了。如何调试此问题?
INFO: Started container ID 54fe5780ca820a6e2b7cae40610cfc3229dbf889b0c66d6e34a39b74e13aaec7 for node slave-0000w16w841rc from image: jenkinsubuntu
Feb 28, 2019 9:35:54 PM com.nirima.jenkins.plugins.docker.utils.PortUtils$ConnectionCheckSSH execute
INFO: SSH port is open on 127.0.0.1:10007
[02/28/19 21:35:54] SSH Launch of slave-0000w16w841rc on 127.0.0.1 failed in 29 ms
Feb 28, 2019 9:36:03 PM hudson.slaves.NodeProvisioner$2 run
INFO: Image of jenkinsubuntu provisioning successfully completed. We have now 7 computer(s) `
发布于 2019-03-07 07:22:06
没有找到答案。但最终选择了在码头模板中连接到attach docker container
的对接插件,使其正常工作。
发布于 2019-03-07 18:37:41
虽然您已经发布了另一种方法,但是在这里,当您询问如何调试这个问题时,您应该做些什么,并且要注意到什么?
SSHD
的图像,插件文档建议使用jenkins/ssh-奴隶作为自定义映像的基础。jenkinsubuntu
的自定义映像,假设该映像是基于jenkins/ssh-奴隶的,那么您需要确保没有覆盖文献资料中描述的原始入口点:避免重写docker命令,因为SSH启动程序依赖它。
在代理运行时启动和建立连接之前,您可以使用入口点在构建代理容器中运行一些侧服务。只需确保入口点最终运行传递的命令:
exec "$@"- You can login try to login to the same container using ssh while its running.
- If the previous step worked then check the log either using `docker logs` or by checking `/var/log`, note that you may need to change the `LogLevel` under `/etc/ssh/sshd_config` to `VERBOSE` to make all the details of ssh login attempts saved in `/var/log/auth.log` file where you can identify the issue
https://stackoverflow.com/questions/54892037
复制相似问题