gpt4 book ai didi

packer - 等待 SSH 与打包程序一起使用的时间太长

转载 作者:行者123 更新时间:2023-12-04 16:07:41 24 4
gpt4 key购买 nike

任何人都已经遇到过 packer build 的这个问题?

Waiting for SSH to become available...
[INFO] Attempting SSH connection...
reconnecting to TCP connection for SSH
handshaking with SSH
handshake error: ssh: handshake failed: read tcp 127.0.0.1:49663->127.0.0.1:3278: wsarecv: Une connexion existante a dû être fermée par l’hôte distant.
[DEBUG] SSH handshake err: ssh: handshake failed: read tcp 127.0.0.1:49663->127.0.0.1:3278: wsarecv: Une connexion existante a dû être fermée par l’hôte distant.

我的打包程序构建运行正常,但与 ssh 连接的步骤很长(10 分钟)。

你有解决这个问题的想法吗?

PS:日志中的“空格”字符不是我的错,这只是-debug packer build的结果。也许打开另一个计算器溢出问题来解决这个问题。

最佳答案

我有一个类似的设置(Ubuntu、Windows 7、virtualbox-iso)。我的脚本在下面包含一个在配置块中调用的文件。缺乏这些可能是缓慢的原因

#!/bin/sh -x

echo "UseDNS no" >> /etc/ssh/sshd_config;
echo "GSSAPIAuthentication no" >> /etc/ssh/sshd_config;

也有可能 10 分钟的等待只是在后台发生的其他你看不到的事情。如果您可以发布指向您的脚本的链接和/或告诉我整个构建过程需要多长时间,这可能会提供额外的上下文

关于packer - 等待 SSH 与打包程序一起使用的时间太长,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34539055/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com