Ansible:SSH错误:unix_listener:对于Unix域套接字太长 [英] Ansible: SSH Error: unix_listener: too long for Unix domain socket

查看:326
本文介绍了Ansible:SSH错误:unix_listener:对于Unix域套接字太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个已知问题,我找到了解决方案,但对我不起作用。

This is a known issue and I found a solution but it's not working for me.

首先我有:

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 。它的内容:

So I created a ~/.ansible.cfg. The content of it:

[ssh_connection]    
control_path=%(directory)s/%%h‐%%r

但是在重新运行ansible之后,我仍然有一个关于过长的错误。

But after rerunning my ansible I stil have an error about 'too long'.

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个字符。 (我在网络上找到了不同的语句)。

The limit is 104 or 108 characters. (I found different statements on the web)

您在错误消息中XXX删除了一些敏感信息,因此不清楚您的路径实际上有多久。

You XXXed out some sensitive information in the error message so it's not clear how long your path actually is.

我想%(directory)s 被替换为 .ansible 目录在您的用户文件夹中。删除它并直接使用您的用户文件夹将为您节省12个字符:

I guess %(directory)s is replaced with the .ansible directory in your users folder. Removing that and using directly your user folder would save you 12 characters:

control_path=~/%%h‐%%r

当然,这会通过控制套接字向您的主目录发送垃圾邮件。

根据用户名的实际长度,您可以看到是否可以创建另一个目录或在任何地方找到更短的路径。例如,我使用〜/ .ssh / tmp / %% h _ %% r

Depending on the actual length of your username, you could see if you can just create another directory or find a shorter path anywhere. For example, I use ~/.ssh/tmp/%%h_%%r

仅少3个字符

最后,如果没有帮助,您仍然可以使用 / tmp 进行存储插座。但是请注意,任何有权访问该计算机上的 / tmp 的人都可以使用您的套接字。

Finally if none of that helps, you still could fall back using /tmp for storing the sockets. But be aware that anyone with access to /tmp on that machine might be able to use your sockets then.

这篇关于Ansible:SSH错误:unix_listener:对于Unix域套接字太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆