为Cloud Foundry安装IBM容器插件(cf ic)会挂起然后失败

时间:2016-05-04 20:43:03

标签: ibm-cloud cloudfoundry

IBM containers plug-inCloud Foundry CLIcf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64之后挂起。

下载成功:

  

注意:插件是由潜在不受信任的作者编写的二进制文件。安装和使用插件需要您自担风险。

     

您要安装插件https://static-ice.ng.bluemix.net/ibm-containers-linux_x64吗? (y或n)> ÿ

     

尝试从互联网地址下载二进制文件...
  已下载10270368个字节...

然后挂起试图安装插件:

  

安装插件/ tmp / ibm-containers-linux_x64 ...

几分钟后超时:

  

FAILED
  退出状态1

系统信息:

  

NAME =" CentOS Linux"
  版本=" 7(核心)"
  Linux 3.10.0-229.14.1.el7.x86_64#1 SMP Tue Tue Sep 15 15:05:51 UTC 2015 x86_64 x86_64 x86_64 GNU / Linux
  Cloud Foundry CLI版本:cf版本6.17.0 + 5d0be0a-2016-04-15
  Docker版本:Docker版本1.11.1,build 5604cbe

2 个答案:

答案 0 :(得分:1)

摘要

确保主机环回接口允许通信。

例如,如果iptables限制此流量,则以下规则可解决此问题: iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT

更多信息

容器插件安装使用环回接口上的随机端口。如果无法通信,则安装失败。就我而言,iptables不允许通信。例如,这里的tcpdump输出显示两次尝试失败:

Watching the local interface with tcpdump -i lo`

# Attempt 1
15:50:16.255178 IP test-host.55308 > test-host.48267: Flags [S], seq 1877515918, win 43690, options [mss 65495,sackOK,TS val 964453 ecr 0,nop,wscale 8], length 0
15:50:17.257624 IP test-host.55308 > test-host.48267: Flags [S], seq 1877515918, win 43690, options [mss 65495,sackOK,TS val 965456 ecr 0,nop,wscale 8], length 0
15:50:19.261636 IP test-host.55308 > test-host.48267: Flags [S], seq 1877515918, win 43690, options [mss 65495,sackOK,TS val 967460 ecr 0,nop,wscale 8], length 0

# Attempt 2
15:51:00.594373 IP test-host.34226 > test-host.40708: Flags [S], seq 2060304501, win 43690, options [mss 65495,sackOK,TS val 1008792 ecr 0,nop,wscale 8], length 0
15:51:01.595663 IP test-host.34226 > test-host.40708: Flags [S], seq 2060304501, win 43690, options [mss 65495,sackOK,TS val 1009794 ecr 0,nop,wscale 8], length 0
15:51:03.601633 IP test-host.34226 > test-host.40708: Flags [S], seq 2060304501, win 43690, options [mss 65495,sackOK,TS val 1011800 ecr 0,nop,wscale 8], length 0

添加快速规则以允许环回地址上的流量起作用:

iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT

这是在iptables中添加规则并再次尝试插件安装后的tcpdump:

listening on lo, link-type EN10MB (Ethernet), capture size 65535 bytes
16:19:05.431084 IP test-host.37935 > test-host.38894: Flags [S], seq 895212894, win 43690, options [mss 65495,sackOK,TS val 2693629 ecr 0,nop,wscale 8], length 0
16:19:05.431105 IP test-host.38894 > test-host.37935: Flags [S.], seq 2727344571, ack 895212895, win 43690, options [mss 65495,sackOK,TS val 2693629 ecr 2693629,nop,wscale 8], length 0
16:19:05.431122 IP test-host.37935 > test-host.38894: Flags [.], ack 1, win 171, options [nop,nop,TS val 2693629 ecr 2693629], length 0
16:19:05.431224 IP test-host.37935 > test-host.38894: Flags [F.], seq 1, ack 1, win 171, options [nop,nop,TS val 2693629 ecr 2693629], length 0
16:19:05.431263 IP test-host.37936 > test-host.38894: Flags [S], seq 349222338, win 43690, options [mss 65495,sackOK,TS val 2693629 ecr 0,nop,wscale 8], length 0
16:19:05.431270 IP test-host.38894 > test-host.37936: Flags [S.], seq 496327229, ack 349222339, win 43690, options [mss 65495,sackOK,TS val 2693629 ecr 2693629,nop,wscale 8], length 0
16:19:05.431279 IP test-host.37936 > test-host.38894: Flags [.], ack 1, win 171, options [nop,nop,TS val 2693629 ecr 2693629], length 0
16:19:05.431486 IP test-host.38894 > test-host.37935: Flags [F.], seq 1, ack 2, win 171, options [nop,nop,TS val 2693629 ecr 2693629], length 0
16:19:05.431503 IP test-host.37935 > test-host.38894: Flags [.], ack 2, win 171, options [nop,nop,TS val 2693629 ecr 2693629], length 0
16:19:05.431654 IP test-host.37936 > test-host.38894: Flags [P.], seq 1:3043, ack 1, win 171, options [nop,nop,TS val 2693630 ecr 2693629], length 3042
16:19:05.431666 IP test-host.38894 > test-host.37936: Flags [.], ack 3043, win 505, options [nop,nop,TS val 2693630 ecr 2693630], length 0
16:19:05.432294 IP test-host.38894 > test-host.37936: Flags [P.], seq 1:97, ack 3043, win 512, options [nop,nop,TS val 2693630 ecr 2693630], length 96
16:19:05.432304 IP test-host.37936 > test-host.38894: Flags [.], ack 97, win 171, options [nop,nop,TS val 2693630 ecr 2693630], length 0
16:19:05.432993 IP test-host.37936 > test-host.38894: Flags [F.], seq 3043, ack 97, win 171, options [nop,nop,TS val 2693631 ecr 2693630], length 0
16:19:05.433059 IP test-host.38894 > test-host.37936: Flags [F.], seq 97, ack 3044, win 512, options [nop,nop,TS val 2693631 ecr 2693631], length 0
16:19:05.433070 IP test-host.37936 > test-host.38894: Flags [.], ack 98, win 171, options [nop,nop,TS val 2693631 ecr 2693631], length 0

插件输出:

  

注意:插件是由潜在不受信任的作者编写的二进制文件。安装和使用插件需要您自担风险。

     

您要安装插件https://static-ice.ng.bluemix.net/ibm-containers-linux_x64吗? (y或n)> ÿ

     

尝试从互联网地址下载二进制文件...
  已下载10270368个字节...
  安装插件/ tmp / ibm-containers-linux_x64 ...
  OK
  插件IBM-Containers v0.8.878已成功安装。

答案 1 :(得分:0)

您可以选择使用浏览器手动下载它,然后从下载路径安装它。 例如

$ cf install-plugin path/to/ibm-plugin-file

这是IBM插件存储库links的链接。 Haven没试过,让我知道它是否有效:))