小编lov*_*ova的帖子

Ansible:SSH错误:unix_listener:对于Unix域套接字来说太长了

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

首先我有:

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.
Run Code Online (Sandbox Code Playgroud)

所以我创建了一个~/.ansible.cfg.它的内容:

[ssh_connection]    
control_path=%(directory)s/%%h?%%r
Run Code Online (Sandbox Code Playgroud)

但是在重新运行我的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.
Run Code Online (Sandbox Code Playgroud)

为什么还太长?

ssh amazon-ec2 ansible

13
推荐指数
3
解决办法
5445
查看次数

PHP-docker 容器中的环境变量

我想在我的 docker 容器中显示一个 env var。PHP 脚本如下所示:

<html>
 <head>
  <title>Show Use of environment variables</title>
 </head>
 <body>
  <?php
  print "env is: ".$_ENV["USER"]."\n";
  ?>
 </body>
</html>
Run Code Online (Sandbox Code Playgroud)

我使用 OpenShift 来启动容器。PHP - 容器显示:

env is: 
Run Code Online (Sandbox Code Playgroud)

现在我更改了容器的 dc 配置:

oc env dc/envar USER=Pieter
deploymentconfig "envar" updated
Run Code Online (Sandbox Code Playgroud)

当我访问容器时。USER 的环境变量是 Pieter

docker exec -it 44a0f446ae36 bash
bash-4.2$ echo $USER
Pieter
Run Code Online (Sandbox Code Playgroud)

但是我的脚本仍然显示:“ env is:”它没有填充变量。

php environment-variables openshift docker openshift-origin

9
推荐指数
1
解决办法
1万
查看次数

Ansible:ansible.cfg的路径

我有这个已知的问题.所以我尝试修复它,但我没有看到我在哪里创建我的ansible.cfg(或它已经存在)?我在我的家庭目录中尝试过,但它仍然无法正常工作.

sudo vi ~/.ansible.cfg
Run Code Online (Sandbox Code Playgroud)

我读了很多关于/ etc/ansible的内容,但在我的系统上却没有.我在Mac El Capitan.我用安装安装了ansible pip.

ansible --version
ansible 1.9.4
  configured module search path = None
Run Code Online (Sandbox Code Playgroud)

ansible

5
推荐指数
2
解决办法
2万
查看次数

启动请求重复太快

我正在写bash脚本,但是我经常遇到这个问题。当我尝试startstop服务时,我经常得到:

start request repeated too quickly 
Run Code Online (Sandbox Code Playgroud)

我怎么解决这个问题?例如,当我尝试重新启动docker或openshift-origin master时。

sudo service origin-master restart

? origin-master.service - Origin Master Service
   Loaded: loaded (/usr/lib/systemd/system/origin-master.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Wed 2016-02-17 08:22:11 UTC; 44s ago
     Docs: https://github.com/openshift/origin
  Process: 2296 ExecStart=/usr/bin/openshift start master --config=${CONFIG_FILE} $OPTIONS (code=exited, status=255)
 Main PID: 2296 (code=exited, status=255)

Feb 17 08:22:10 ip-172-xx-xx-xx.eu-central-1.compute.internal systemd[1]: origin-master.service: main process exited, code=exited, status=255/n/a
Feb 17 08:22:10 ip-172-xx-xx-xx.eu-central-1.compute.internal systemd[1]: Failed to start Origin Master Service.
Feb 17 …
Run Code Online (Sandbox Code Playgroud)

systemd

4
推荐指数
2
解决办法
1万
查看次数