这是一个已知问题,我找到了解决方案,但它对我不起作用。
首先我有:
fatal: [openshift-node-compute-e50xx] => SSH Error: ControlPath too long
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
所以我创建了一个~/.ansible.cfg
。其内容:
[ssh_connection]
control_path=%(directory)s/%%h‐%%r
但重新运行我的 ansible 后,我仍然有一个关于“太长”的错误。
fatal: [openshift-master-32axx] => SSH Error: unix_listener: "/Users/myuser/.ansible/cp/ec2-xx-xx-xx-xx.eu-central-1.compute.amazonaws.com-centos.AAZFTHkT5xXXXXXX" too long for Unix domain socket
while connecting to 52.xx.xx.xx:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
为什么还是太长了?
限制为 104 或 108 个字符。 (我在网上找到了不同的说法)
您在错误消息中删除了一些敏感信息,因此不清楚您的路径实际有多长。
I guess %(directory)s
被替换为.ansible
用户文件夹中的目录。删除它并直接使用您的用户文件夹将为您节省 12 个字符:
control_path=~/%%h‐%%r
Sure, that will spam your home directory with control sockets.
根据用户名的实际长度,您可以查看是否可以创建另一个目录或在任何地方找到较短的路径。例如,我使用~/.ssh/tmp/%%h_%%r
虽然只少了3个字符,但也足够了。
最后,如果这些都没有帮助,你仍然可以使用/tmp
用于存储插座。但请注意,任何有权访问的人/tmp
在那台机器上也许可以使用你的套接字。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)