Zusammenfassung
Vergewissern Sie sich, dass die Kommunikation auf der Host-Loopback-Schnittstelle erlaubt.
Zum Beispiel, wenn iptables diesen Verkehr zu beschränken, löst die folgende Regel das Problem: iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
Weitere Informationen
Die Container-Plug-In-Installation verwendet einen zufälligen Port auf der Loopback-Schnittstelle . Wenn keine Kommunikation möglich ist, schlägt die Installation fehl. In meinem Fall erlaubte iptables die Kommunikation nicht.Zum Beispiel, hier ist tcpdump Ausgabe zeigt zwei Fehlversuche:
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
eine schnelle Regel Hinzufügen von Verkehr auf der Loopback-Adresse zu ermöglichen, arbeiten:
iptables -A INPUT -s 127.0.0.1 -d 127.0.0.1 -j ACCEPT
Hier ist der tcpdump nach dem Hinzufügen der Regel in iptables und versuchen Sie die Plugin-Installation erneut:
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
Und die Plugin-Ausgabe:
Achtung: Plugins sind Binärdateien von potenziell nicht vertrauenswürdigen Autoren geschrieben. Installieren und verwenden Sie Plugins auf eigene Gefahr.
Möchten Sie das Plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64 installieren? (Y oder n)> y
Versuch Binärdatei von Internet-Adresse zum Download ...
10.270.368 Bytes heruntergeladen ...
Installation Plugin/tmp/ibm-Container-linux_x64 ...
OK
Plugin IBM-Containers v0.8.878 erfolgreich installiert.