Machine: docker-machine env xxxκ°€ μ˜μ›νžˆ μ€‘λ‹¨λ©λ‹ˆλ‹€.

에 λ§Œλ“  2015λ…„ 07μ›” 10일  Β·  50μ½”λ©˜νŠΈ  Β·  좜처: docker/machine

머신이 μ‹€ν–‰ 쀑이고 docker-machine ssh xxx μ‚¬μš©ν•˜μ—¬ ν•΄λ‹Ή 머신에 λ‘œκ·ΈμΈν•  수 μžˆμŠ΅λ‹ˆλ‹€.
κ·ΈλŸ¬λ‚˜ docker-machine env xxx μ˜μ›νžˆ μ€‘λ‹¨λ©λ‹ˆλ‹€. 디버깅 좜λ ₯에 "ν˜ΈμŠ€νŠΈκ°€ λ‹€μš΄λ˜μ—ˆμŠ΅λ‹ˆλ‹€"라고 ν‘œμ‹œλ©λ‹ˆλ‹€. ν•˜μ§€λ§Œ
docker-machine ls 쀬어
"이름 ν™œμ„± λ“œλΌμ΄λ²„ μƒνƒœ URL SWARM
dev-test virtualbox μ‹€ν–‰ tcp://192.168.99.100 :2376 "

κ°€λŠ₯ν•œ κ΄€λ ¨ 문제: https://github.com/docker/machine/issues/1168
도컀 λ¨Έμ‹  버전: v0.3.0
전체 정보:
λͺ…λ Ή: docker-machine -D env dev-test
μ‚°μΆœ:

shell: sh
executing: /usr/bin/VBoxManage showvminfo dev-test --machinereadable
STDOUT: name="dev-test"
groups="/"
ostype="Linux 2.6 / 3.x (64 bit)"
UUID="3928af02-deb5-4620-9433-0028c017030b"
CfgFile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.vbox"
SnapFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Snapshots"
LogFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Logs"
hardwareuuid="3928af02-deb5-4620-9433-0028c017030b"
memory=1024
pagefusion="off"
vram=8
cpuexecutioncap=100
hpet="on"
chipset="piix3"
firmware="BIOS"
cpus=1
pae="on"
longmode="on"
synthcpu="off"
bootmenu="disabled"
boot1="dvd"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="on"
vtxvpid="on"
vtxux="on"
VMState="running"
VMStateChangeTime="2015-07-10T07:54:44.216000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATA"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="30"
storagecontrollerbootable0="on"
"SATA-0-0"="/var/root/.docker/machine/machines/dev-test/boot2docker.iso"
"SATA-ImageUUID-0-0"="9ee6b7c5-49b9-4ec9-bc9e-6034d222da02"
"SATA-tempeject"="off"
"SATA-IsEjected"="off"
"SATA-1-0"="/var/root/.docker/machine/machines/dev-test/disk.vmdk"
"SATA-ImageUUID-1-0"="83cdb0e3-f525-44ee-9c1c-40dab5361d33"
"SATA-2-0"="none"
"SATA-3-0"="none"
"SATA-4-0"="none"
"SATA-5-0"="none"
"SATA-6-0"="none"
"SATA-7-0"="none"
"SATA-8-0"="none"
"SATA-9-0"="none"
"SATA-10-0"="none"
"SATA-11-0"="none"
"SATA-12-0"="none"
"SATA-13-0"="none"
"SATA-14-0"="none"
"SATA-15-0"="none"
"SATA-16-0"="none"
"SATA-17-0"="none"
"SATA-18-0"="none"
"SATA-19-0"="none"
"SATA-20-0"="none"
"SATA-21-0"="none"
"SATA-22-0"="none"
"SATA-23-0"="none"
"SATA-24-0"="none"
"SATA-25-0"="none"
"SATA-26-0"="none"
"SATA-27-0"="none"
"SATA-28-0"="none"
"SATA-29-0"="none"
natnet1="nat"
macaddress1="080027CA87FE"
cableconnected1="on"
nic1="nat"
nictype1="82540EM"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
Forwarding(0)="ssh,tcp,127.0.0.1,50762,,22"
hostonlyadapter2="vboxnet1"
macaddress2="0800276E6AB8"
cableconnected2="on"
nic2="hostonly"
nictype2="82540EM"
nicspeed2="0"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
lpt1="off"
lpt2="off"
audio="none"
clipboard="disabled"
draganddrop="disabled"
SessionType="headless"
VideoMode="720,400,0"<strong i="21">@0</strong>,0
vrde="off"
usb="off"
ehci="off"
SharedFolderNameMachineMapping1="Users"
SharedFolderPathMachineMapping1="/Users"
VRDEActiveConnection="off"
VRDEClients=0
vcpenabled="off"
vcpscreens=0
vcpfile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.webm"
vcpwidth=1024
vcpheight=768
vcprate=512
vcpfps=25
GuestMemoryBalloon=0
GuestOSType="Linux26_64"
GuestAdditionsRunLevel=1
GuestAdditionsVersion="4.3.28 r100309"
GuestAdditionsFacility_VirtualBox Base Driver=50,1436514900104
GuestAdditionsFacility_Seamless Mode=0,1436514900104
GuestAdditionsFacility_Graphics Mode=0,1436514900104

STDERR: 
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker<strong i="22">@localhost</strong> ip addr show dev eth1] []  <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link 
       valid_lft forever preferred_lft forever

SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link 
       valid_lft forever preferred_lft forever

END SSH

invalid certs detected; regenerating for 192.168.99.100:2376
command=configureAuth machine=dev-test
Using SSH client type: external
About to run SSH command:
cat /etc/os-release
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker<strong i="23">@localhost</strong> cat /etc/os-release] []  <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: NAME=Boot2Docker
VERSION=1.7.0
ID=boot2docker
ID_LIKE=tcl
VERSION_ID=1.7.0
PRETTY_NAME="Boot2Docker 1.7.0 (TCL 6.3); master : 7960f90 - Thu Jun 18 18:31:45 UTC 2015"
ANSI_COLOR="1;34"
HOME_URL="http://boot2docker.io"
SUPPORT_URL="https://github.com/boot2docker/boot2docker"
BUG_REPORT_URL="https://github.com/boot2docker/boot2docker/issues"

found compatible host: boot2docker
Using SSH client type: external
About to run SSH command:
sudo hostname dev-test && echo "dev-test" | sudo tee /var/lib/boot2docker/etc/hostname
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker<strong i="24">@localhost</strong> sudo hostname dev-test && echo "dev-test" | sudo tee /var/lib/boot2docker/etc/hostname] []  <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: dev-test

executing: /usr/bin/VBoxManage showvminfo dev-test --machinereadable
STDOUT: name="dev-test"
groups="/"
ostype="Linux 2.6 / 3.x (64 bit)"
UUID="3928af02-deb5-4620-9433-0028c017030b"
CfgFile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.vbox"
SnapFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Snapshots"
LogFldr="/var/root/.docker/machine/machines/dev-test/dev-test/Logs"
hardwareuuid="3928af02-deb5-4620-9433-0028c017030b"
memory=1024
pagefusion="off"
vram=8
cpuexecutioncap=100
hpet="on"
chipset="piix3"
firmware="BIOS"
cpus=1
pae="on"
longmode="on"
synthcpu="off"
bootmenu="disabled"
boot1="dvd"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="on"
vtxvpid="on"
vtxux="on"
VMState="running"
VMStateChangeTime="2015-07-10T07:54:44.216000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATA"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="30"
storagecontrollerbootable0="on"
"SATA-0-0"="/var/root/.docker/machine/machines/dev-test/boot2docker.iso"
"SATA-ImageUUID-0-0"="9ee6b7c5-49b9-4ec9-bc9e-6034d222da02"
"SATA-tempeject"="off"
"SATA-IsEjected"="off"
"SATA-1-0"="/var/root/.docker/machine/machines/dev-test/disk.vmdk"
"SATA-ImageUUID-1-0"="83cdb0e3-f525-44ee-9c1c-40dab5361d33"
"SATA-2-0"="none"
"SATA-3-0"="none"
"SATA-4-0"="none"
"SATA-5-0"="none"
"SATA-6-0"="none"
"SATA-7-0"="none"
"SATA-8-0"="none"
"SATA-9-0"="none"
"SATA-10-0"="none"
"SATA-11-0"="none"
"SATA-12-0"="none"
"SATA-13-0"="none"
"SATA-14-0"="none"
"SATA-15-0"="none"
"SATA-16-0"="none"
"SATA-17-0"="none"
"SATA-18-0"="none"
"SATA-19-0"="none"
"SATA-20-0"="none"
"SATA-21-0"="none"
"SATA-22-0"="none"
"SATA-23-0"="none"
"SATA-24-0"="none"
"SATA-25-0"="none"
"SATA-26-0"="none"
"SATA-27-0"="none"
"SATA-28-0"="none"
"SATA-29-0"="none"
natnet1="nat"
macaddress1="080027CA87FE"
cableconnected1="on"
nic1="nat"
nictype1="82540EM"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
Forwarding(0)="ssh,tcp,127.0.0.1,50762,,22"
hostonlyadapter2="vboxnet1"
macaddress2="0800276E6AB8"
cableconnected2="on"
nic2="hostonly"
nictype2="82540EM"
nicspeed2="0"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
lpt1="off"
lpt2="off"
audio="none"
clipboard="disabled"
draganddrop="disabled"
SessionType="headless"
VideoMode="720,400,0"<strong i="25">@0</strong>,0
vrde="off"
usb="off"
ehci="off"
SharedFolderNameMachineMapping1="Users"
SharedFolderPathMachineMapping1="/Users"
VRDEActiveConnection="off"
VRDEClients=0
vcpenabled="off"
vcpscreens=0
vcpfile="/var/root/.docker/machine/machines/dev-test/dev-test/dev-test.webm"
vcpwidth=1024
vcpheight=768
vcprate=512
vcpfps=25
GuestMemoryBalloon=0
GuestOSType="Linux26_64"
GuestAdditionsRunLevel=1
GuestAdditionsVersion="4.3.28 r100309"
GuestAdditionsFacility_VirtualBox Base Driver=50,1436514900104
GuestAdditionsFacility_Seamless Mode=0,1436514900104
GuestAdditionsFacility_Graphics Mode=0,1436514900104

STDERR: 
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /var/root/.docker/machine/machines/dev-test/id_rsa -p 50762 docker<strong i="26">@localhost</strong> ip addr show dev eth1] []  <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link 
       valid_lft forever preferred_lft forever

SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:6e:6a:b8 brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.100/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe6e:6ab8/64 scope link 
       valid_lft forever preferred_lft forever

END SSH

Daemon not responding yet: dial tcp 192.168.99.100:2376: host is down
Daemon not responding yet: dial tcp 192.168.99.100:2376: host is down
Daemon not responding yet: dial tcp 192.168.99.100:2376: host is down
drivevirtualbox

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

Virtualbox λ“œλΌμ΄λ²„μš© MacOSXμ—μ„œ 이 문제λ₯Ό μž¬ν˜„ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 λ¬Έμ œλŠ” 일반적으둜 개인 λ„€νŠΈμ›Œν¬μ— λŒ€ν•œ 경둜(docker cliμ—μ„œ μ‚¬μš©ν•˜λŠ” 경둜)κ°€ λˆ„λ½λœ κ²½μš°μ— λ°œμƒν•©λ‹ˆλ‹€.
제 경우 이 κ²½λ‘œκ°€ λˆ„λ½λœ κ²ƒμœΌλ‘œ μ˜μ‹¬λ˜λŠ” 이유 쀑 ν•˜λ‚˜λŠ” 개인 λ„€νŠΈμ›Œν¬ 경둜λ₯Ό μ—‰λ§μœΌλ‘œ λ§Œλ“œλŠ” κ²½ν–₯이 μžˆλŠ” VPN을 μ‚¬μš©ν•˜κ³  있기 λ•Œλ¬Έμž…λ‹ˆλ‹€. 이에 λŒ€ν•œ μˆ˜μ • 사항은 λ‹€μŒκ³Ό 같이 μ‹€ν–‰ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.

sudo route add -net 192.168.99.0/24 -interface vboxnet6

μ—¬κΈ°μ„œ 192.168.99.0/24 λŠ” boot2dockerμ—μ„œ μ‚¬μš©ν•˜λŠ” λ„€νŠΈμ›Œν¬ λ²”μœ„μ΄κ³  vboxnet6 λŠ” boot2docker 개인 λ„€νŠΈμ›Œν¬μ— ν• λ‹Ήλœ μΈν„°νŽ˜μ΄μŠ€μž…λ‹ˆλ‹€.

λͺ¨λ“  50 λŒ“κΈ€

Windows 7 OS와 λΉ„μŠ·ν•œ λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€. λ‹€μŒμ€ 둜그 파일의 μš”μ§€ μž…λ‹ˆλ‹€.

특히 λ‚΄ ~/.profile에 μžˆμ„ λ•Œ "docker-machine env machinename"이 많이 μ€‘λ‹¨λ˜λŠ” 것을 μ•Œ 수 μžˆμŠ΅λ‹ˆλ‹€. 이둜 인해 μƒˆ 터미널이 μ€‘λ‹¨λ˜κ³  μ•½ 50%의 μ‹œκ°„μ΄ μ‹œμž‘λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. ν˜„μž¬ μƒˆ νƒ­ 셸을 ctrl+c둜 μ§€μ •ν•˜κ³  2초 후에 λ‹€λ₯Έ 셸을 μƒμ„±ν•˜λ©΄ μž‘μ—…μ„ μˆ˜ν–‰ν•˜λŠ” κ²½ν–₯이 μžˆμŠ΅λ‹ˆλ‹€.

μƒˆ/ν™œμ„± ν„°λ―Έλ„μ—μ„œ μž¬μƒμ‚°ν•˜κΈ° μ–΄λ ΅κ³  μƒˆ 터미널을 생성할 λ•Œ 훨씬 더 자주 λ°œμƒν•˜λŠ” κ²½ν–₯이 μžˆμŠ΅λ‹ˆλ‹€.

OSX 10.10.4, 도컀 λ¨Έμ‹  0.3.0. μ΄λŸ¬ν•œ λ¬Έμ œλŠ” 0.2.xμ—λŠ” μ—†μ—ˆμŠ΅λ‹ˆλ‹€.

μ΄μƒν•œ μ’…λ£Œ μƒνƒœ 255와 λ™μΌν•œ λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€.

docker-machine -D env docker
shell: bash
executing: /Applications/VMware Fusion.app/Contents/Library/vmrun list
MAC address in VMX: 00:0c:29:b6:95:bb
IP found in DHCP lease table: 172.16.1.131
invalid certs detected; regenerating for 172.16.1.131:2376
command=configureAuth machine=docker
executing: /Applications/VMware Fusion.app/Contents/Library/vmrun list
MAC address in VMX: 00:0c:29:b6:95:bb
IP found in DHCP lease table: 172.16.1.131
Using SSH client type: external
About to run SSH command:
cat /etc/os-release
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/orangeudav/.docker/machine/machines/docker/id_rsa -p 22 [email protected] cat /etc/os-release] []  <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> false [] [] [] [] <nil>}
<HAAAAAANGIIING HERE>
SSH cmd err, output: exit status 255:
Error getting SSH command: exit status 255
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://172.16.1.131:2376"
export DOCKER_CERT_PATH="/Users/orangeudav/.docker/machine/machines/docker"
export DOCKER_MACHINE_NAME="docker"
# Run this command to configure your shell:
# eval "$(docker-machine env docker)"

Virtualbox λ“œλΌμ΄λ²„μš© MacOSXμ—μ„œ 이 문제λ₯Ό μž¬ν˜„ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 λ¬Έμ œλŠ” 일반적으둜 개인 λ„€νŠΈμ›Œν¬μ— λŒ€ν•œ 경둜(docker cliμ—μ„œ μ‚¬μš©ν•˜λŠ” 경둜)κ°€ λˆ„λ½λœ κ²½μš°μ— λ°œμƒν•©λ‹ˆλ‹€.
제 경우 이 κ²½λ‘œκ°€ λˆ„λ½λœ κ²ƒμœΌλ‘œ μ˜μ‹¬λ˜λŠ” 이유 쀑 ν•˜λ‚˜λŠ” 개인 λ„€νŠΈμ›Œν¬ 경둜λ₯Ό μ—‰λ§μœΌλ‘œ λ§Œλ“œλŠ” κ²½ν–₯이 μžˆλŠ” VPN을 μ‚¬μš©ν•˜κ³  있기 λ•Œλ¬Έμž…λ‹ˆλ‹€. 이에 λŒ€ν•œ μˆ˜μ • 사항은 λ‹€μŒκ³Ό 같이 μ‹€ν–‰ν•˜λŠ” κ²ƒμž…λ‹ˆλ‹€.

sudo route add -net 192.168.99.0/24 -interface vboxnet6

μ—¬κΈ°μ„œ 192.168.99.0/24 λŠ” boot2dockerμ—μ„œ μ‚¬μš©ν•˜λŠ” λ„€νŠΈμ›Œν¬ λ²”μœ„μ΄κ³  vboxnet6 λŠ” boot2docker 개인 λ„€νŠΈμ›Œν¬μ— ν• λ‹Ήλœ μΈν„°νŽ˜μ΄μŠ€μž…λ‹ˆλ‹€.

@chantra 의 μ†”λ£¨μ…˜μ„ μ‹œλ„ν–ˆμ§€λ§Œ νŠΈλ¦­μ„ μˆ˜ν–‰ν•˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. docker-machine λŠ” ν•˜μœ„ λͺ…령이 μžˆλŠ” μƒˆ 셸에 μžˆμ„ λ•Œ μ—¬μ „νžˆ 멈 μΆ₯λ‹ˆλ‹€ . κ·ΈλŸ¬λ‚˜ ^C μ€‘λ‹¨ν•˜κ³  λ‹€μ‹œ μ‹œλ„ν•˜λ©΄ μž‘λ™ν•©λ‹ˆλ‹€.

μ•ˆλ…•ν•˜μ„Έμš”, 이 λ¬Έμ œκ°€ λ°œμƒν•˜λŠ” λͺ¨λ“  μ‚¬λžŒμ—κ²Œ λ°œμƒν•  수 μžˆλŠ” 문제 쀑 ν•˜λ‚˜λŠ” Docker 데λͺ¬μ΄ μ‹€ν–‰λ˜κ³  μžˆμ§€ μ•Šλ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€.

λ‹€μŒ λͺ…λ Ήμ˜ 좜λ ₯을 μ‹œλ„ν•˜κ±°λ‚˜ 뢙여넣을 수 μžˆμŠ΅λ‹ˆκΉŒ(boot2dockerλ₯Ό μ‹€ν–‰ν•˜λŠ” VM용):

$ docker-machine -D ssh machinename sudo /etc/init.d/docker restart
...
$ docker-machine -D env machinename
...

감사 ν•΄μš”!

@nathanleclaire ν•΄λ‹Ή λͺ…령을 μ‹€ν–‰ν•˜λ €κ³  ν•˜λ©΄ 여기에 멈

$ docker-machine -D ssh dev sudo /etc/init.d/docker restart
executing: /usr/local/bin/VBoxManage showvminfo dev --machinereadable
STDOUT: name="dev"
groups="/"
ostype="Linux 2.6 / 3.x (64-bit)"
UUID="19ac89e0-98cf-49e8-b306-ca58878604a3"
CfgFile="/Users/inkel/.docker/machine/machines/dev/dev/dev.vbox"
SnapFldr="/Users/inkel/.docker/machine/machines/dev/dev/Snapshots"
LogFldr="/Users/inkel/.docker/machine/machines/dev/dev/Logs"
hardwareuuid="19ac89e0-98cf-49e8-b306-ca58878604a3"
memory=2048
pagefusion="off"
vram=8
cpuexecutioncap=100
hpet="on"
chipset="piix3"
firmware="BIOS"
cpus=4
pae="on"
longmode="on"
synthcpu="off"
bootmenu="disabled"
boot1="dvd"
boot2="dvd"
boot3="disk"
boot4="none"
acpi="on"
ioapic="on"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="on"
vtxvpid="on"
vtxux="on"
VMState="running"
VMStateChangeTime="2015-07-15T21:20:06.395000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATA"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="30"
storagecontrollerbootable0="on"
"SATA-0-0"="/Users/inkel/.docker/machine/machines/dev/boot2docker.iso"
"SATA-ImageUUID-0-0"="c5d1d610-61ba-4416-8721-f65383bd9595"
"SATA-tempeject"="off"
"SATA-IsEjected"="off"
"SATA-1-0"="/Users/inkel/.docker/machine/machines/dev/disk.vmdk"
"SATA-ImageUUID-1-0"="9719a1db-dfaf-441e-8d8f-47ee0b18293b"
"SATA-2-0"="none"
"SATA-3-0"="none"
"SATA-4-0"="none"
"SATA-5-0"="none"
"SATA-6-0"="none"
"SATA-7-0"="none"
"SATA-8-0"="none"
"SATA-9-0"="none"
"SATA-10-0"="none"
"SATA-11-0"="none"
"SATA-12-0"="none"
"SATA-13-0"="none"
"SATA-14-0"="none"
"SATA-15-0"="none"
"SATA-16-0"="none"
"SATA-17-0"="none"
"SATA-18-0"="none"
"SATA-19-0"="none"
"SATA-20-0"="none"
"SATA-21-0"="none"
"SATA-22-0"="none"
"SATA-23-0"="none"
"SATA-24-0"="none"
"SATA-25-0"="none"
"SATA-26-0"="none"
"SATA-27-0"="none"
"SATA-28-0"="none"
"SATA-29-0"="none"
natnet1="nat"
macaddress1="08002743999C"
cableconnected1="on"
nic1="nat"
nictype1="virtio"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
Forwarding(0)="ssh,tcp,127.0.0.1,54973,,22"
hostonlyadapter2="vboxnet5"
macaddress2="080027A3AA51"
cableconnected2="on"
nic2="hostonly"
nictype2="82540EM"
nicspeed2="0"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
lpt1="off"
lpt2="off"
audio="none"
clipboard="disabled"
draganddrop="disabled"
SessionType="headless"
VideoMode="720,400,0"<strong i="7">@0</strong>,0
vrde="off"
usb="off"
ehci="off"
SharedFolderNameMachineMapping1="Users"
SharedFolderPathMachineMapping1="/Users"
VRDEActiveConnection="off"
VRDEClients=0
vcpenabled="off"
vcpscreens=0
vcpfile="/Users/inkel/.docker/machine/machines/dev/dev/dev.webm"
vcpwidth=1024
vcpheight=768
vcprate=512
vcpfps=25
GuestMemoryBalloon=0
GuestOSType="Linux26_64"
GuestAdditionsRunLevel=1
GuestAdditionsVersion="4.3.20 r96996"
GuestAdditionsFacility_VirtualBox Base Driver=50,1436995222662
GuestAdditionsFacility_Seamless Mode=0,1436995222662
GuestAdditionsFacility_Graphics Mode=0,1436995222662

STDERR:
Using SSH client type: external
About to run SSH command:
sudo /etc/init.d/docker restart
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/inkel/.docker/machine/machines/dev/id_rsa -p 54973 docker<strong i="8">@localhost</strong> sudo /etc/init.d/docker restart] []  <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}

μ™„λ£Œλ˜λ©΄(λ§Œμ•½ κ·Έλ ‡λ‹€λ©΄) λ‹€μŒμ— 무엇을 뢙여넣을 κ²ƒμž…λ‹ˆλ‹€.

@inkel 흠, μ„±κ³΅ν•˜λ €λ©΄ 거의 μ¦‰μ‹œ μ‹€ν–‰λ˜μ–΄μ•Ό ν•˜λ―€λ‘œ λͺ‡ 초 이상 걸리면 λ¬Έμ œκ°€ μžˆλŠ” κ²ƒμž…λ‹ˆλ‹€.

방금 μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

SSH cmd err, output: <nil>:

ν™•μ‹€νžˆ λͺ‡ 초 이상이 κ±Έλ ΈμŠ΅λ‹ˆλ‹€. time 둜 λ‹€μ‹œ 달리고 μžˆμ–΄ μ–Όλ§ˆμΈμ§€ ν™•μΈν•©λ‹ˆλ‹€.

$ docker-machine -D ssh dev sudo /etc/init.d/docker restart
…same long output…
real    5m1.197s
user    0m0.045s
sys 0m0.035s

λ‹€μŒμ„ μ‹€ν–‰ν•˜λŠ” 경우:

$ /usr/bin/ssh -vvv -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/inkel/.docker/machine/machines/dev/id_rsa -p 54973 docker<strong i="6">@localhost</strong> sudo /etc/init.d/docker restart

CLIμ—μ„œ 자체적으둜 무엇을 μ–»μŠ΅λ‹ˆκΉŒ?

inkel<strong i="5">@miralejos</strong> ~
$ /usr/bin/ssh -vvv -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/inkel/.docker/machine/machines/dev/id_rsa -p 54973 docker<strong i="6">@localhost</strong> sudo /etc/init.d/docker restart 2>&1 | pbcopy
debug1: multiplexing control connection
debug3: fd 7 is O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [mux-control]
debug3: channel_post_mux_listener: new mux channel 1 fd 7
debug3: mux_master_read_cb: channel 1: hello sent
debug2: set_control_persist_exit_time: cancel scheduled exit
debug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4
debug2: process_mux_master_hello: channel 1 slave version 4
debug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4
debug2: process_mux_alive_check: channel 1: alive check
debug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 92
debug2: process_mux_new_session: channel 1: request tty 0, X 1, agent 0, subsys 0, term "xterm", cmd "sudo /etc/init.d/docker restart", env 1
debug3: process_mux_new_session: got fds stdin 8, stdout 9, stderr 10
debug2: fd 9 setting O_NONBLOCK
debug3: fd 10 is O_NONBLOCK
debug1: channel 2: new [client-session]
debug2: process_mux_new_session: channel_new: 2 linked to control channel 1
debug2: channel 2: send open
debug2: callback start
debug2: client_session2_setup: id 2
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 2: request env confirm 0
debug1: Sending command: sudo /etc/init.d/docker restart
debug2: channel 2: request exec confirm 1
debug3: mux_session_confirm: sending success reply
debug2: callback done
debug2: channel 2: open confirm rwindow 0 rmax 32768
debug2: channel 2: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 2
debug2: exec request accepted on channel 2
debug1: client_input_channel_req: channel 2 rtype exit-status reply 0
debug3: mux_exit_message: channel 2: exit message, evitval 0
debug1: client_input_channel_req: channel 2 rtype [email protected] reply 0
debug2: channel 2: rcvd eow
debug2: channel 2: close_read
debug2: channel 2: input open -> closed
debug2: channel 2: rcvd eof
debug2: channel 2: output open -> drain
debug2: channel 2: obuf empty
debug2: channel 2: close_write
debug2: channel 2: output drain -> closed
debug2: channel 2: rcvd close
debug3: channel 2: will not send data after close
debug2: channel 2: send close
debug2: channel 2: is dead
debug2: channel 2: gc: notify user
debug3: mux_master_session_cleanup_cb: entering for channel 2
debug2: channel 1: rcvd close
debug2: channel 1: output open -> drain
debug2: channel 1: close_read
debug2: channel 1: input open -> closed
debug2: channel 2: gc: user detached
debug2: channel 2: is dead
debug2: channel 2: garbage collecting
debug1: channel 2: free: client-session, nchannels 3
debug3: channel 2: status: The following connections are open:
  #2 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)

debug2: channel 1: obuf empty
debug2: channel 1: close_write
debug2: channel 1: output drain -> closed
debug2: channel 1: is dead (local)
debug2: channel 1: gc: notify user
debug3: mux_master_control_cleanup_cb: entering for channel 1
debug2: channel 1: gc: user detached
debug2: channel 1: is dead (local)
debug2: channel 1: garbage collecting
debug1: channel 1: free: mux-control, nchannels 2
debug3: channel 1: status: The following connections are open:

debug2: set_control_persist_exit_time: schedule exit in 300 seconds
inkel<strong i="7">@miralejos</strong> ~
$

이전 μ˜κ²¬μ— μ‹€μˆ˜λ₯Ό ν•œ 것 κ°™μŠ΅λ‹ˆλ‹€. 이것이 μ˜¬λ°”λ₯Έ κ²°κ³Όμž…λ‹ˆλ‹€.

$ /usr/bin/ssh -vvv -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /Users/inkel/.docker/machine/machines/dev/id_rsa -p 54973 docker<strong i="6">@localhost</strong> sudo /etc/init.d/docker restart 2>&1
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/inkel/.ssh/config
debug1: /Users/inkel/.ssh/config line 3: Applying options for *
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: auto-mux: Trying existing master
debug1: Control socket "/Users/inkel/.ssh/master-docker<strong i="7">@localhost</strong>:54973" does not exist
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [::1] port 54973.
debug2: fd 5 setting O_NONBLOCK
debug1: connect to address ::1 port 54973: Connection refused
debug1: Connecting to localhost [127.0.0.1] port 54973.
debug2: fd 5 setting O_NONBLOCK
debug1: fd 5 clearing O_NONBLOCK
debug1: Connection established.
debug3: timeout: 10000 ms remain after connect
debug3: Incorrect RSA1 identifier
debug3: Could not load "/Users/inkel/.docker/machine/machines/dev/id_rsa" as a RSA1 public key
debug1: identity file /Users/inkel/.docker/machine/machines/dev/id_rsa type 1
debug1: identity file /Users/inkel/.docker/machine/machines/dev/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.0
debug1: match: OpenSSH_6.0 pat OpenSSH*
debug2: fd 5 setting O_NONBLOCK
debug3: put_host_port: [localhost]:54973
debug3: load_hostkeys: loading entries for host "[localhost]:54973" from file "/dev/null"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit: none,[email protected],zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected]
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,[email protected],hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,hmac-sha2-512-96,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit: none,[email protected]
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 124/256
debug2: bits set: 526/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 4c:94:a7:2d:b9:b3:b5:a2:1d:37:89:c8:84:d9:ed:bf
debug3: put_host_port: [127.0.0.1]:54973
debug3: put_host_port: [localhost]:54973
debug3: load_hostkeys: loading entries for host "[localhost]:54973" from file "/dev/null"
debug3: load_hostkeys: loaded 0 keys
debug1: checking without port identifier
debug3: load_hostkeys: loading entries for host "localhost" from file "/dev/null"
debug3: load_hostkeys: loaded 0 keys
Warning: Permanently added '[localhost]:54973' (RSA) to the list of known hosts.
debug2: bits set: 519/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /Users/inkel/.docker/machine/machines/dev/id_rsa (0x7feeca600150), explicit
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/inkel/.docker/machine/machines/dev/id_rsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug2: input_userauth_pk_ok: fp 8b:f1:19:49:34:18:61:8c:ba:cd:a5:65:99:aa:ce:ea
debug3: sign_and_send_pubkey: RSA 8b:f1:19:49:34:18:61:8c:ba:cd:a5:65:99:aa:ce:ea
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to localhost ([127.0.0.1]:54973).
debug1: setting up multiplex master socket
debug3: muxserver_listen: temporary control path /Users/inkel/.ssh/master-docker<strong i="8">@localhost</strong>:54973.bGmwLqk9AzPAnw76
debug2: fd 6 setting O_NONBLOCK
debug3: fd 6 is O_NONBLOCK
debug3: fd 6 is O_NONBLOCK
debug1: channel 0: new [/Users/inkel/.ssh/master-docker<strong i="9">@localhost</strong>:54973]
debug3: muxserver_listen: mux listener channel 0 fd 6
debug1: control_persist_detach: backgrounding master process
debug2: control_persist_detach: background process is 15146
debug2: fd 6 setting O_NONBLOCK
debug1: forking to background
debug1: Entering interactive session.
debug2: set_control_persist_exit_time: schedule exit in 300 seconds
debug1: multiplexing control connection
debug3: fd 7 is O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [mux-control]
debug3: channel_post_mux_listener: new mux channel 1 fd 7
debug3: mux_master_read_cb: channel 1: hello sent
debug2: set_control_persist_exit_time: cancel scheduled exit
debug3: mux_master_read_cb: channel 1 packet type 0x00000001 len 4
debug2: process_mux_master_hello: channel 1 slave version 4
debug2: mux_client_hello_exchange: master version 4
debug3: mux_client_forwards: request forwardings: 0 local, 0 remote
debug3: mux_client_request_session: entering
debug3: mux_client_request_alive: entering
debug3: mux_master_read_cb: channel 1 packet type 0x10000004 len 4
debug2: process_mux_alive_check: channel 1: alive check
debug3: mux_client_request_alive: done pid = 15147
debug3: mux_client_request_session: session request sent
debug3: mux_master_read_cb: channel 1 packet type 0x10000002 len 92
debug2: process_mux_new_session: channel 1: request tty 0, X 1, agent 0, subsys 0, term "xterm", cmd "sudo /etc/init.d/docker restart", env 1
debug3: process_mux_new_session: got fds stdin 8, stdout 9, stderr 10
debug1: channel 2: new [client-session]
debug2: process_mux_new_session: channel_new: 2 linked to control channel 1
debug2: channel 2: send open
debug2: callback start
debug2: client_session2_setup: id 2
debug2: fd 5 setting TCP_NODELAY
debug3: packet_set_tos: set IP_TOS 0x08
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 2: request env confirm 0
debug1: Sending command: sudo /etc/init.d/docker restart
debug2: channel 2: request exec confirm 1
debug3: mux_session_confirm: sending success reply
debug2: callback done
debug2: channel 2: open confirm rwindow 0 rmax 32768
debug1: mux_client_request_session: master session id: 2
debug2: channel 2: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 2
debug2: exec request accepted on channel 2
debug1: client_input_channel_req: channel 2 rtype exit-status reply 0
debug3: mux_exit_message: channel 2: exit message, evitval 0
debug1: client_input_channel_req: channel 2 rtype [email protected] reply 0
debug2: channel 2: rcvd eow
debug2: channel 2: close_read
debug2: channel 2: input open -> closed
debug2: channel 2: rcvd eof
debug2: channel 2: output open -> drain
debug2: channel 2: obuf empty
debug2: channel 2: close_write
debug2: channel 2: output drain -> closed
debug2: channel 2: rcvd close
debug3: channel 2: will not send data after close
debug2: channel 2: send close
debug2: channel 2: is dead
debug2: channel 2: gc: notify user
debug3: mux_master_session_cleanup_cb: entering for channel 2
debug2: channel 1: rcvd close
debug2: channel 1: output open -> drain
debug2: channel 1: close_read
debug2: channel 1: input open -> closed
debug2: channel 2: gc: user detached
debug2: channel 2: is dead
debug2: channel 2: garbage collecting
debug1: channel 2: free: client-session, nchannels 3
debug3: channel 2: status: The following connections are open:
  #2 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)

debug2: channel 1: obuf empty
debug2: channel 1: close_write
debug2: channel 1: output drain -> closed
debug2: channel 1: is dead (local)
debug2: channel 1: gc: notify user
debug3: mux_master_control_cleanup_cb: entering for channel 1
debug2: channel 1: gc: user detached
debug2: channel 1: is dead (local)
debug2: channel 1: garbage collecting
debug1: channel 1: free: mux-control, nchannels 2
debug3: channel 1: status: The following connections are open:

debug2: set_control_persist_exit_time: schedule exit in 300 seconds
debug3: mux_client_read_packet: read header failed: Broken pipe
debug2: Received exit status from master 0

음... λͺ‡ λΆ„ ν›„ λ‚΄ 화면에 λ‹€μŒμ΄ λ‚˜νƒ€λ‚©λ‹ˆλ‹€.

debug1: ControlPersist timeout expired
debug1: channel 0: free: /Users/inkel/.ssh/master-docker<strong i="6">@localhost</strong>:54973, nchannels 1
debug3: channel 0: status: The following connections are open:

debug3: fd 0 is not O_NONBLOCK
debug3: fd 1 is not O_NONBLOCK
Transferred: sent 3104, received 2480 bytes, in 301.1 seconds
Bytes per second: sent 10.3, received 8.2
debug1: Exit status -1

@inkel μ΄μƒν•œ. λ„€νŠΈμ›Œν¬μ— λŒ€ν•΄ 생각할 수 μžˆλŠ” VPN λ˜λŠ” 비정상적인 섀정이 μžˆμŠ΅λ‹ˆκΉŒ?

μ•„λ‹ˆ, λ‚΄κ°€ 생각할 수 μžˆλŠ” 것은 μ•„λ‹ˆλ‹€. λ©°μΉ  μ „ λ‚˜λŠ” μ—¬μ „νžˆ 0.1.0 ν•˜κ³  μ™„λ²½ν•˜κ²Œ μž‘λ™ν–ˆλ‹€κ°€ 0.3.0 둜 μ—…λ°μ΄νŠΈν–ˆκ³  ν˜„μž¬μ™€ 같이 νŽ‘ν‚€ν•˜κ²Œ μž‘λ™ν•˜κΈ° μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€. 같은 문제λ₯Ό κ²ͺκ³  μžˆλŠ” λ‹€λ₯Έ λ™λ£Œ @fsaraviaκ°€ μžˆμŠ΅λ‹ˆλ‹€.

@nathanleclaire λ™λ£Œμ™€ μ΄μ•ΌκΈ°ν•œ ν›„ λ‹€μŒ 버전을 μ‚¬μš©ν•˜κ³  μžˆμŒμ„ λ°œκ²¬ν–ˆμŠ΅λ‹ˆλ‹€. ν™ˆλΈŒλ₯˜μ— μžˆλŠ” 버전이 이 였λ₯˜λ₯Ό μ œκ³΅ν–ˆκΈ° λ•Œλ¬Έμž…λ‹ˆλ‹€.

$ docker-machine -v
docker-machine version 0.3.0 (0a251fe)

κ·ΈλŠ” μ΅œμ‹  버전을 μ‚¬μš©ν•˜κ³  μžˆμœΌλ―€λ‘œ brew install docker-machine 버전을 μ‚­μ œν–ˆλŠ”λ° 이제 μž‘λ™ν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

@inkel μ’‹μŠ΅λ‹ˆλ‹€ . μž‘λ™ν•˜κ²Œ λ˜μ–΄ κΈ°μ©λ‹ˆλ‹€.

λ‚˜λŠ” μ„±κ³΅ν•˜μ§€ λͺ»ν•œ μ΅œμ‹  λ²„μ „μ˜ docker-machine으둜 λ‹€μ‹œ μ‹œλ„ν–ˆμŠ΅λ‹ˆλ‹€. git shell을 μ‚¬μš©ν•˜μ—¬ Windows 7μ—μ„œ μ‹€ν–‰ μ€‘μž…λ‹ˆλ‹€. λͺ¨λ“  단계와 ν•΄λ‹Ή 좜λ ₯은 여기에 μžˆμŠ΅λ‹ˆλ‹€ .

out.log νŒŒμΌμ—λŠ” μ£Όμš” 단계가 ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. 그런 λ‹€μŒ docker-machine-create.log 및 docker-machine-env.logκ°€ μžˆμŠ΅λ‹ˆλ‹€.

/var/lib/boot2docker/tls/μ—μ„œ /c/Users/Pedro/.docker/machine/machines/test/둜 μΈμ¦μ„œ νŒŒμΌμ„ μˆ˜λ™μœΌλ‘œ λ³΅μ‚¬ν•œ ν›„

λ‚˜λŠ” 또 λ‹€λ₯Έ μ‹œλ„λ₯Όν–ˆκ³  κ²°κ³Ό λ‘œκ·ΈλŠ” docker-machine-env-2.logμž…λ‹ˆλ‹€.
λ§ˆμ§€λ§‰μ— 내보낸 ν™˜κ²½ λ³€μˆ˜λ₯Ό μ‚¬μš©ν•˜λ”λΌλ„ μ—¬μ „νžˆ μ—°κ²°ν•  수 μ—†μŠ΅λ‹ˆλ‹€.
docker ps κ°€) μ‹œκ°„ 초과 였λ₯˜λ‘œ μ’…λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.

VM이 μ‹œμž‘λ˜μ—ˆκ³  도컀 μ„œλΉ„μŠ€κ°€ 망가지고 μžˆμ—ˆμŠ΅λ‹ˆλ‹€.
μ»΄ν“¨ν„°μ—μ„œ sshν•  수 있고 도컀 μ„œλΉ„μŠ€κ°€ μ˜¬λ°”λ₯Έ 포트(2376)μ—μ„œ μˆ˜μ‹  λŒ€κΈ° μ€‘μž…λ‹ˆλ‹€.

docker<strong i="15">@test</strong>:~$ netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 10.0.2.15:22            10.0.2.2:57901          ESTABLISHED
tcp        0      0 :::2376                 :::*                    LISTEN
tcp        0      0 :::22                   :::*                    LISTEN
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags       Type       State         I-Node Path
unix  2      [ ACC ]     SEQPACKET  LISTENING      14092 /run/udev/control
unix  2      [ ACC ]     STREAM     LISTENING      17142 /var/run/acpid.socket
unix  2      [ ACC ]     STREAM     LISTENING      17656 /var/run/docker.sock
unix  3      [ ]         DGRAM                     14101
unix  3      [ ]         STREAM     CONNECTED      22738
unix  3      [ ]         STREAM     CONNECTED      22737
unix  3      [ ]         DGRAM                     14100

ν₯미둜운 점은 boot2dockerκ°€ μ œλŒ€λ‘œ μž‘λ™ν•œλ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€.
생각이 더 μžˆμœΌμ‹ κ°€μš”?
감사 ν•΄μš”.

이 λ¬Έμ œλŠ” μž¬ν˜„ν•˜κΈ°κ°€ 정말 μ–΄λ ΅μŠ΅λ‹ˆλ‹€... vmboxnet0 및 vmboxnet1을 μ œμ™Έν•œ λͺ¨λ“  vmboxnet_xλ₯Ό μ‚­μ œν•˜κ³  컴퓨터λ₯Ό μž¬λΆ€νŒ…(도컀 머신이 μ•„λ‹Œ)ν•œ ν›„ λ¬Έμ œκ°€ μ‚¬λΌμ‘ŒμŠ΅λ‹ˆλ‹€.

컴퓨터λ₯Ό λͺ‡ 번 μ ˆμ „ λͺ¨λ“œλ‘œ μ „ν™˜ν•œ λ‹€μŒ λ‹€μ‹œ μ‹œλ„ν•œ ν›„ λ™μΌν•œ λ¬Έμ œκ°€ λ°œμƒν•˜κΈ° μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€. μ™„μ „νžˆ λ‹€μ‹œ μ‹œμž‘ν•΄μ•Ό ν•˜λŠ” μˆœκ°„μ΄ μžˆμ„ λ•Œ λ‹€μ‹œ μ‹œλ„ν•˜κ³  μ–΄λ–€ 일이 μΌμ–΄λ‚˜λŠ”μ§€ ν™•μΈν•˜κ² μŠ΅λ‹ˆλ‹€.

λͺ¨λ“  Docker μ•±μ˜ μ΅œμ‹  버전이 μžˆμŠ΅λ‹ˆλ‹€. VirtualBox VM을 κ΅¬μΆ•ν•˜λŠ” Linux Ubuntu의 Docker Machine으둜 λͺ‡ μ£Ό λ™μ•ˆ 문제λ₯Ό 켜고 λŒμ—ˆμŠ΅λ‹ˆλ‹€. 방금 Docker Swarm을 μΆ”κ°€ν–ˆλŠ”λ° λ¬Έμ œκ°€ λͺ‡ λ°° 더 μ•…ν™”λ˜μ—ˆμŠ΅λ‹ˆλ‹€(더 자주). λ‚˜λŠ” 3개의 μŠ€μ›œ 머신을 λ§Œλ“œλŠ” 데 2μ‹œκ°„μ„ λ³΄λƒˆλ‹€. μž¬λΆ€νŒ…ν•˜λ©΄ 일반적으둜 ν•΄κ²°λ˜μ§€λ§Œ 합리적이지 μ•ŠμŠ΅λ‹ˆλ‹€. docker-machine의 --debugλ₯Ό μ‚¬μš©ν•˜λ©΄ λ‹€λ₯Έ λŒ“κΈ€ μž‘μ„±μžκ°€ μ§€μ ν•œ λŒ€λ‘œ μ€‘λ‹¨λœ μœ„μΉ˜λ₯Ό 확인할 수 μžˆμŠ΅λ‹ˆλ‹€. Daemon not responding yet: dial tcp 192.168.99.XXX:2376: no route to host κ°€ μžˆλŠ” λͺ‡ κ³³μ—μ„œ λ©ˆμΆ”λŠ” 것을 λ³΄μ•˜μ§€λ§Œ 이 μ‹œμ μ—μ„œ μ‹œκ°„ μ΄ˆκ³Όκ°€ 항상 λ°œμƒν•©λ‹ˆλ‹€.

STDERR: 
Using SSH client type: external
About to run SSH command:
ip addr show dev eth1
&{/usr/bin/ssh [/usr/bin/ssh -o PasswordAuthentication=no -o IdentitiesOnly=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -o ConnectionAttempts=3 -o ConnectTimeout=10 -i /home/gstafford/.docker/machine/machines/swarm-node-02/id_rsa -p 58710 docker<strong i="7">@localhost</strong> ip addr show dev eth1] []  <nil> <nil> <nil> [] <nil> <nil> <nil> ?reflect.Value? false [] [] [] [] <nil>}
SSH cmd err, output: <nil>: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:9d:c5:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.105/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe9d:c53d/64 scope link 
       valid_lft forever preferred_lft forever

SSH returned: 4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:9d:c5:3d brd ff:ff:ff:ff:ff:ff
    inet 192.168.99.105/24 brd 192.168.99.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe9d:c53d/64 scope link 
       valid_lft forever preferred_lft forever

END SSH

Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Daemon not responding yet: dial tcp 192.168.99.105:2376: no route to host
Error creating machine: Maximum number of retries (60) exceeded
You will want to check the provider to make sure the machine and associated resources were properly removed.

@garystafford μ‚¬μš©μžμ˜ ssh ꡬ성은 μ–΄λ–»κ²Œ μƒκ²ΌμŠ΅λ‹ˆκΉŒ? μ°Έμ‘°: https://github.com/docker/machine/issues/1591

@chantra 의 μ†”λ£¨μ…˜μ΄ μ €μ—κ²Œ

방금 이것에 λΆ€λ”ͺμ³€μŠ΅λ‹ˆλ‹€. @chantra 의 μ†”λ£¨μ…˜λ„ μ €μ—κ²Œ νš¨κ³Όμ μ΄μ—ˆμŠ΅λ‹ˆλ‹€. Cisco AnyConnect: λΆ„λ…Έ:

λ˜ν•œ Cisco AnyConnect. λΌμš°νŒ… ν…Œμ΄λΈ”μ΄ 이와 같은 μ†Œν”„νŠΈμ›¨μ–΄μ— μ˜ν•΄ 망가진 경우 μˆ˜μ •ν•˜λ„λ‘ ꢌμž₯ν•˜λŠ” 검사λ₯Ό μΆ”κ°€ν•  수 μžˆλ‹€κ³  μƒκ°ν•˜μ§€ μ•ŠμŠ΅λ‹ˆκΉŒ? μ§„λ‹¨ν•˜λŠ” 것은 맀우 μ‹€λ§μŠ€λŸ½μŠ΅λ‹ˆλ‹€. λ‚˜λŠ” μ—¬μ „νžˆ μ„±κ³΅μ μœΌλ‘œ λΆ€νŒ…λœ 도컀 λ¨Έμ‹ μœΌλ‘œ sshν•  수 μžˆμ—ˆκ³ , μ΄κ²ƒμ—μ„œ 토둠을 μ°ΎκΈ° 전에 λ§Žμ€ 티켓을 μ‚΄νŽ΄λ΄μ•Ό ν–ˆμŠ΅λ‹ˆλ‹€.

λΌμš°νŒ… ν…Œμ΄λΈ”μ΄ 이와 같은 μ†Œν”„νŠΈμ›¨μ–΄μ— μ˜ν•΄ 망가진 경우 μˆ˜μ •ν•˜λ„λ‘ ꢌμž₯ν•˜λŠ” 검사λ₯Ό μΆ”κ°€ν•  수 μžˆλ‹€κ³  μƒκ°ν•˜μ§€ μ•ŠμŠ΅λ‹ˆκΉŒ?

이것은 μ‹€μ œλ‘œ λ‚΄κ°€ μ§€κΈˆ κ³ λ €ν•˜κ³  μžˆλŠ” μ •ν™•ν•œ μ†”λ£¨μ…˜μž…λ‹ˆλ‹€. λ§Žμ€ 경우 μ‹€μ œλ‘œ μΈμŠ€ν„΄μŠ€ 생성을 μ„±κ³΅μ μœΌλ‘œ μ™„λ£Œν•˜κ³  IP μ£Όμ†Œλ₯Ό 얻을 수 μžˆλŠ” κ²ƒμ²˜λŸΌ λ³΄μ΄μ§€λ§Œ μ—°κ²°ν•  수 μ—†μŠ΅λ‹ˆλ‹€.

λ˜ν•œ 수면 ν›„ μ—°κ²°ν•  수 μ—†λŠ” 도컀 λ¬Έμ œκ°€ μžˆμŠ΅λ‹ˆλ‹€.

Windows 10μ—μ„œ @chantra 의 μ†”λ£¨μ…˜μ„ μ–΄λ–»κ²Œ ν•˜μ‹œκ² μŠ΅λ‹ˆκΉŒ?

λ‚˜λŠ” λͺ‡ 번의 수면 후에도이 문제λ₯Ό κ²½ν—˜ν–ˆμŠ΅λ‹ˆλ‹€.
λ‹€μ‹œ μ‹œμž‘ν•˜λ©΄ λ¬Έμ œκ°€ ν•΄κ²°λ˜μ—ˆμŠ΅λ‹ˆλ‹€..

이것은 도컀 머신이 μ‹€ν–‰ 쀑이고 VPN을 μ‚¬μš©ν•  λ•Œμ—λ„ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. λͺ…령이 μ˜μ›νžˆ μ€‘λ‹¨λ©λ‹ˆλ‹€.
κ·ΈλŸ¬λ‚˜ VPNμ—μ„œ λ‚΄λ Έλ”λ‹ˆ μ‹œμŠ€ν…œμ΄ docker-machine restart <MACHINE-NAME> λ‹€μ‹œ μ‹œμž‘ν–ˆκ³  λ‹€μ‹œ μž‘λ™ν•˜κΈ° μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€.

이것은 도컀 머신이 μ‹€ν–‰ 쀑이고 VPN을 μ‚¬μš©ν•  λ•Œμ—λ„ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. λͺ…령이 μ˜μ›νžˆ μ€‘λ‹¨λ©λ‹ˆλ‹€.
κ·ΈλŸ¬λ‚˜ λ‚˜λŠ” VPNμ—μ„œ λ‚΄λ Έκ³  기계λ₯Ό λ‹€μ‹œ μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€. docker-machine restart그리고 λ‹€μ‹œ μž‘λ™ν•˜κΈ° μ‹œμž‘ν–ˆμŠ΅λ‹ˆλ‹€.

이것은 λ‚˜μ—κ²Œλ„ μΌμ–΄λ‚¬μŠ΅λ‹ˆλ‹€. 도컀 머신을 μ‹€ν–‰ν•˜κ³  VPN에 μ—°κ²°ν•˜κ³  VPN을 끊고 docker env <MACHINE-NAME> κ°€ μ€‘λ‹¨λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

κ·ΈλŸ¬λ‚˜ docker-machine restart <MACHINE-NAME> 을 ν–ˆμ§€λ§Œ 도움이 λ˜μ§€ μ•Šμ•˜μŠ΅λ‹ˆλ‹€. docker env <MACHINE-NAME> κ°€ μ—¬μ „νžˆ 맀달렀 μžˆμŠ΅λ‹ˆλ‹€.

Cisco AnyConnect VPN을 μ‚¬μš©ν•˜λŠ” Mac OS 10.10.4μ—μ„œλ„ 이 λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€.

  • μƒˆλ‘œ λΆ€νŒ…ν•˜λ©΄ 도컀가 잘 μž‘λ™ν•©λ‹ˆλ‹€.
  • VPN을 켜고 λ’€λ‘œ λ¬ΌλŸ¬λ‚˜λ‹€
  • docker-machine env 기본값이 멈μΆ₯λ‹ˆλ‹€.

도컀 λ¨Έμ‹  μž¬μ‹œμž‘ 기본값을 μ‹œλ„ν–ˆμ§€λ§Œ λ¬Έμ œκ°€ μ§€μ†λ©λ‹ˆλ‹€.

@chantra 의 μ†”λ£¨μ…˜μ΄ μ €μ—κ²Œ 효과적인 것 κ°™μŠ΅λ‹ˆλ‹€. λ‚΄ μ»΄ν“¨ν„°μ—μ„œ μΈν„°νŽ˜μ΄μŠ€λŠ” vboxnet0μ΄μ—ˆμŠ΅λ‹ˆλ‹€(mac ν„°λ―Έλ„μ—μ„œ ifconfigλ₯Ό μ‚¬μš©ν•˜μ—¬ μ°Ύμ•˜μŠ΅λ‹ˆλ‹€). VPN을 μ‚¬μš©ν•΄μ•Ό ν•  λ•Œλ§ˆλ‹€ μž¬λΆ€νŒ…ν•˜λŠ” 것보닀 훨씬 μ‰½μŠ΅λ‹ˆλ‹€.

λ‚΄κ°€ μ‚¬μš©ν•˜κ³  있던 VPN에 λŒ€ν•΄ μ–ΈκΈ‰ν–ˆλŠ”μ§€ ν™•μ‹€ν•˜μ§€ μ•Šμ§€λ§Œ FWIWμ—μ„œλŠ” cisco도 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€.
μ• λ‹ˆμ»€λ„₯트....

2015λ…„ 9μ›” 23일 μˆ˜μš”μΌ μ˜€ν›„ 7μ‹œ 52λΆ„, Joe McGlynn [email protected]
썼닀:

Cisco AnyConnectκ°€ μ„€μΉ˜λœ Mac OS 10.10.4μ—μ„œλ„ 이 λ¬Έμ œκ°€ λ°œμƒν•©λ‹ˆλ‹€.
VPN.

  • μƒˆλ‘œ λΆ€νŒ…ν•˜λ©΄ 도컀가 잘 μž‘λ™ν•©λ‹ˆλ‹€.
  • VPN을 켜고 λ’€λ‘œ λ¬ΌλŸ¬λ‚˜λ‹€
  • docker-machine env 기본값이 멈μΆ₯λ‹ˆλ‹€.

도컀 λ¨Έμ‹  μž¬μ‹œμž‘ 기본값을 μ‹œλ„ν–ˆμ§€λ§Œ λ¬Έμ œκ°€ μ§€μ†λ©λ‹ˆλ‹€.

@chantra https://github.com/chantra 의 μ†”λ£¨μ…˜μ΄ μ €μ—κ²Œ 효과적인 것 κ°™μŠ΅λ‹ˆλ‹€. 에
λ‚΄ μ»΄ν“¨ν„°μ˜ μΈν„°νŽ˜μ΄μŠ€λŠ” vboxnet0μ΄μ—ˆμŠ΅λ‹ˆλ‹€(macμ—μ„œ ifconfigλ₯Ό μ‚¬μš©ν•˜μ—¬ μ°Ύμ•˜μŠ΅λ‹ˆλ‹€.
터미널) VPN을 μ‚¬μš©ν•΄μ•Ό ν•  λ•Œλ§ˆλ‹€ μž¬λΆ€νŒ…ν•˜λŠ” 것보닀 훨씬 μ‰½μŠ΅λ‹ˆλ‹€.

β€”
이 이메일에 직접 λ‹΅μž₯ν•˜κ±°λ‚˜ GitHubμ—μ„œ ν™•μΈν•˜μ„Έμš”.
https://github.com/docker/machine/issues/1500#issuecomment -142788894.

FWIW λ˜ν•œ OS X 10.10.5μ—μ„œ Cisco AnyConnect VPN을 μ‚¬μš©ν•˜κ³  μžˆμ—ˆκ³  λŒ€μ‹  openconnectλ₯Ό μ‹œλ„ν–ˆλŠ”λ° 문제λ₯Ό ν”Όν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

@ronen ,

@ChrisRut λ„€, 방금 이 문제λ₯Ό ν•΄κ²°ν•˜λ €κ³  ν•  λ•Œ openconnect에 λŒ€ν•΄ λ°°μ› μŠ΅λ‹ˆλ‹€. ꡿바이 μ• λ‹ˆμ»€λ„₯트! λ‚˜λŠ” openconnectκ°€ μ‚¬μš©ν•˜κΈ° 쑰금 λ²ˆκ±°λ‘­λ‹€λŠ” 것을 μ•Œμ•˜μœΌλ―€λ‘œ "vpn up" 및 "vpn down"을 μž…λ ₯ν•  수 μžˆλŠ” λΉ λ₯Έ 래퍼λ₯Ό ν•¨κ»˜ λ˜μ‘ŒμŠ΅λ‹ˆλ‹€. 관심이 μžˆμœΌμ‹œλ©΄ https://gist.github.com/ronen/7d486adbde5d6bfd2472에 μžˆμŠ΅λ‹ˆλ‹€.

μœ μ‚¬ν•œ 증상에 λŒ€ν•΄ μ—¬λŸ¬ λ¬Έμ œκ°€ μžˆλŠ” 것 κ°™μ•„μ„œ 잠자기 ν›„ Windows 10(λ˜λŠ” λ‹€λ₯Έ 버전) ν˜ΈμŠ€νŠΈμ—μ„œ 문제λ₯Ό κ²½ν—˜ν•˜λŠ” μ‚¬λžŒλ“€μ„ μœ„ν•΄ #1934λ₯Ό μ—΄μ—ˆμŠ΅λ‹ˆλ‹€. 문제λ₯Ό λΆ„λ¦¬ν•˜κΈ° μœ„ν•΄ 이 문제의 제λͺ©μ„ VPN λ„€νŠΈμ›Œν¬ λ¬Έμ œμ™€ κ΄€λ ¨μ‹œν‚€λŠ” 것이 μ’‹μŠ΅λ‹ˆλ‹€.

λ‚΄ 호슀트 μ‹œμŠ€ν…œμ΄ μ ˆμ „ λͺ¨λ“œλ‘œ μ „ν™˜λœ 후에 이 λ¬Έμ œκ°€ λ°œμƒν•˜κ³  λ‚˜μ€‘μ— λ‹€μ‹œ λ‚˜νƒ€λ‚©λ‹ˆλ‹€. κ²°κ΅­ c:usersdan.dockermachine 폴더(μΊμ‹œ μ œμ™Έ)μ—μ„œ λͺ¨λ“  것을 μ‚­μ œν•œ λ‹€μŒ λ‹€μ‹œ λ§Œλ“­λ‹ˆλ‹€. 호슀트 μ‹œμŠ€ν…œμ„ μž¬λΆ€νŒ…ν•˜λŠ” 것보닀 훨씬 λΉ λ¦…λ‹ˆλ‹€! ;)

μ•„, 그리고 κ·Έλ ‡κ²Œν•˜κΈ° 전에 일뢀 ν”„λ‘œμ„ΈμŠ€λ₯Ό μ’…λ£Œν•΄μ•Όν•©λ‹ˆλ‹€. 3개의 'VBoxHeadless.exe' ν”„λ‘œμ„ΈμŠ€, 3개의 'VBoxNetDHCP.exe' 및 'VirtualBox μΈν„°νŽ˜μ΄μŠ€'κ°€ μžˆλŠ” κ²½ν–₯이 μžˆμŠ΅λ‹ˆλ‹€.

λ…ΈνŠΈλΆμ„ 깨우고 이름이 "dev"인 도컀 λ¨Έμ‹  μΈμŠ€ν„΄μŠ€λ₯Ό μ‚­μ œν–ˆμŠ΅λ‹ˆλ‹€.
λ‹€μŒ λͺ…령을 μ‹€ν–‰ν•˜μ—¬ 두 개의 μƒˆ 가상 머신을 μƒμ„±ν–ˆμŠ΅λ‹ˆλ‹€.

$ docker-machine create \
    --driver virtualbox \
    --engine-env HTTP_PROXY=http://10.206.246.20:8080 \
    --engine-env HTTPS_PROXY=http://10.206.246.20:8080 \
    --virtualbox-hostonly-cidr "169.254.0.20/16" \
    registry  
$ eval $(docker-machine env registry --shell=bash)
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
$ docker run -d -p 5000:5000 --restart=always --name registry registry
$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                    NAMES
7001a595cc28        registry            "docker-registry"   27 seconds ago      Up 24 seconds       0.0.0.0:5000->5000/tcp   registry
$ docker-machine ip registry
169.254.0.100
$ docker-machine create \
    --driver virtualbox \
    --engine-env HTTP_PROXY=http://10.206.246.20:8080 \
    --engine-env HTTPS_PROXY=http://10.206.246.20:8080 \
    --engine-insecure-registry "$(docker-machine env registry):5000" \
    --virtualbox-hostonly-cidr "169.254.0.20/16" \
    dev
$ docker-machine ip dev
169.254.0.101
$ eval $(docker-machine env dev --shell=bash)

docker-machine env dev --shell=bash λŠ” λͺ‡ λΆ„ λ™μ•ˆ λ©ˆμΆ”κ³  λ‹€μŒμ„ stderr에 λ€ν”„ν•©λ‹ˆλ‹€.

C:\Program Files\ConEmu>docker-machine -D env dev --shell=bash > c:\tmp\docker-machine_env.log
Maximum number of retries (60) exceeded

stdout 둜그 좜λ ₯은 이 Gist μ—μ„œ 찾을 수 μžˆμŠ΅λ‹ˆλ‹€.

μ΄μƒν•œ 점은 μ΅œλŒ€ μž¬μ‹œλ„ νšŸμˆ˜μ— λ„λ‹¬ν•œ ν›„ μ˜¬λ°”λ₯Έ 좜λ ₯이 λ€ν”„λœλ‹€λŠ” κ²ƒμž…λ‹ˆλ‹€. 둜그 끝을 μ°Έμ‘°ν•˜μ‹­μ‹œμ˜€.

λ‹€μŒμ€ μ‹œκ°„μ΄ μ§€μ •λœ stdout 좜λ ₯μž…λ‹ˆλ‹€.

$ time docker-machine env dev --shell=bash
Maximum number of retries (60) exceeded
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://169.254.0.101:2376"
export DOCKER_CERT_PATH="C:\Users\mrumpf\.docker\machine\machines\dev"
export DOCKER_MACHINE_NAME="dev"
# Run this command to configure your shell:
# eval "$(C:\cygwin64\home\mrumpf\bin\docker-machine.exe env dev)"

real    4m8.802s
user    0m0.015s
sys     0m0.078s

그리고 점점 λ‚―μ„€μ–΄μ§€λŠ”λ°...
첫 번째 가상 머신에 λŒ€ν•΄ λ™μΌν•œ λͺ…령이 문제 없이 μ‹€ν–‰λ©λ‹ˆλ‹€.

$ time docker-machine env registry --shell=bash
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://169.254.0.100:2376"
export DOCKER_CERT_PATH="C:\Users\mrumpf\.docker\machine\machines\registry"
export DOCKER_MACHINE_NAME="registry"
# Run this command to configure your shell:
# eval "$(C:\cygwin64\home\mrumpf\bin\docker-machine.exe env registry)"

real    0m2.129s
user    0m0.000s
sys     0m0.093s

@mrumpf *PROXY μ˜΅μ…˜(예: --engine-env HTTP_PROXY=http://10.206.246.20:8080/ )에 μŠ¬λž˜μ‹œλ₯Ό μΆ”κ°€ν•˜λ©΄ μ„±κ³΅ν•©λ‹ˆκΉŒ μ•„λ‹ˆλ©΄ 계속 μ‹€νŒ¨ν•©λ‹ˆκΉŒ?

μ§€κΈˆ λ°λΉ„μ•ˆ 8.2μ—μ„œ 이것을 λ°›κ³  μžˆμŠ΅λ‹ˆλ‹€.

이 문제λ₯Ό μΌμœΌν‚€λŠ” κ²ƒμœΌλ‘œ λ³΄μ΄λŠ” VPN μ†Œν”„νŠΈμ›¨μ–΄ λͺ©λ‘μ— Jupiter Junos Pulseλ₯Ό μΆ”κ°€ν•˜μ‹­μ‹œμ˜€.

λͺ¨λ“  VPN이 "일반" λΌμš°νŒ…μ„ μž¬μ •μ˜ν•˜λŠ” λ™μΌν•œ κΈ°λ³Έ μ •μ˜λ₯Ό 가지고 있기 λ•Œλ¬Έμ— _any_ VPN이 이 μž‘μ—…μ„ μˆ˜ν–‰ν•  κ°€λŠ₯성이 λ†’μŠ΅λ‹ˆλ‹€.

μ—…λ°μ΄νŠΈ: "λΆ„ν•  μ—°κ²°"(λ‚΄ μ„€μΉ˜μ—μ„œ ν—ˆμš©ν•˜λŠ” μ˜΅μ…˜. λ‹€λ₯Έ VPN μ„œλ²„μ— μ—°κ²°)을 μ‚¬μš©ν•˜μ—¬ 이것을 ν”Όν•˜λŠ” 것 κ°™μŠ΅λ‹ˆλ‹€.

무엇을 κΈ°λ‹€λ¦½λ‹ˆλ‹€? μ–΄λ–€ μ’…λ₯˜μ˜ VPNμ΄λ‚˜ β€‹β€‹ν”„λ‘μ‹œλ„ μ‚¬μš©ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€...

VPN은 λ„€νŠΈμ›Œν¬ ꡬ성을 μ—‰λ§μœΌλ‘œ λ§Œλ“œλŠ” λ§Žμ€ 것듀 쀑 ν•˜λ‚˜μΌ λΏμž…λ‹ˆλ‹€. 보닀 일반적으둜 λ„€νŠΈμ›Œν¬ μ—°κ²°μ˜ λ³€κ²½ 사항은 λ‹€μŒκ³Ό 같을 수 μžˆμŠ΅λ‹ˆλ‹€(그리고 μ—¬κΈ°μ—λŠ” "λ„€νŠΈμ›Œν‚Ή"으둜 μƒκ°ν•˜μ§€ μ•Šμ„ 수 μžˆλŠ” λͺ‡ 가지 사항이 포함됨).

  • VPN ν™œμ„±ν™”/λΉ„ν™œμ„±ν™”
  • μœ μ„  LAN μ—°κ²°/뢄리
  • WiFi ν™œμ„±ν™”/λΉ„ν™œμ„±ν™”/ꡬ역 λ³€κ²½(예: λž©νƒ‘μ„ 건물의 λ‹€λ₯Έ κ΅¬μ—­μœΌλ‘œ 운반)
  • Bluetooth μž₯치 μ—°κ²°/μ—°κ²° ν•΄μ œ( Bluetooth PAN으둜 인해)
  • USB μž₯치 μ—°κ²°/μ—°κ²° ν•΄μ œ/켜기/끄기

VPN μ‚¬λ‘€λŠ” "λΆ„ν• " μ˜΅μ…˜μ„ μ œκ³΅ν•  수 있기 λ•Œλ¬Έμ— μ£Όλͺ©ν•  λ§Œν•©λ‹ˆλ‹€. 이 μ˜΅μ…˜μ€ 이 μ›μΈμœΌλ‘œ 인해 Docker 연결이 ν”λ“€λ¦¬λŠ” 것을 방지할 수 μžˆμŠ΅λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ λΆ„ν•  VPN은 λ‹€λ₯Έ λͺ¨λ“  것듀이 엉망이 λ˜λŠ” 것을 λ§‰μ§€λŠ” λͺ»ν•  κ²ƒμž…λ‹ˆλ‹€.

λ‚˜λŠ” ꡬ식 RJ45 케이블을 μ‚¬μš©ν•˜κ³  μžˆμŠ΅λ‹ˆλ‹€ ...

docker-machine이 μ΄λŸ¬ν•œ μ΄λ²€νŠΈμ— λ―Όκ°ν•œ 이유λ₯Ό 이해할 수 μ—†μŠ΅λ‹ˆλ‹€.

λ‚˜λŠ” rj45 ν”ŒλŸ¬κ·Έ/μ–Έν”ŒλŸ¬κ·Έ, μ™€μ΄νŒŒμ΄ μŠ€μœ„μΉ­μ„ μ‹œλ„ν–ˆλ‹€. λ‚΄ μͺ½μ—λŠ” λ¬Έμ œκ°€ μ—†μŠ΅λ‹ˆλ‹€.

처리 μ‹œκ°„μ΄ ν•„μš”ν•  수 μžˆμŠ΅λ‹ˆκΉŒ? λ‚˜λŠ” λ‹€μŒμ„ μˆ˜ν–‰ν•˜λŠ” μ…Έ ν•¨μˆ˜λ‘œ 계속 μ‹€ν–‰ν•©λ‹ˆλ‹€.

docker-machine stop "${VM}"
docker-machine start "${VM}"
docker-machine ssh "${VM}" sudo /etc/init.docker restart
eval $(docker-machine env "${VM}"

이 λͺ…령을 ν•œ λ²ˆμ— ν•˜λ‚˜μ”© μ†κ°€λ½μœΌλ‘œ μˆ˜ν–‰ν•˜λ©΄ 잘 λ©λ‹ˆλ‹€. κ·ΈλŸ¬λ‚˜ μŠ€ν¬λ¦½νŠΈμ—μ„œ μ‹€ν–‰ν•  λ•Œ λ™μΌν•œ λͺ…λ Ή μ‹œν€€μŠ€κ°€ ​​쀑단(λ˜λŠ” λͺ‡ 뢄이 μ†Œμš”)보닀 ν•œ 번 μž‘λ™ν•©λ‹ˆλ‹€.

@mrumpf 에 μ—°κ²°ν•˜λŠ” 이 VM은 λ‚΄ docker-machine ls λͺ©λ‘μ—μ„œ 두 λ²ˆμ§Έμž…λ‹ˆλ‹€.

@jrep μ•„, 그런 κ²½μš°μ—λŠ” 데λͺ¬μ΄ μ‹œμž‘λ˜κ³  μš”μ²­ μˆ˜λ½μ„ μ‹œμž‘ν•  λ•ŒκΉŒμ§€ μž μ‹œ κΈ°λ‹€λ €μ•Ό ν•©λ‹ˆλ‹€. 이것이 머신에 ν”„λ‘œλΉ„μ €λ‹ν•˜λŠ” λ™μ•ˆ 데λͺ¬μ΄ λ‹€μ‹œ μ‹œμž‘λ˜λŠ” 사이에 Dockerλ₯Ό κΈ°λ‹€λ¦¬λŠ” μ½”λ“œκ°€ μžˆλŠ” μ΄μœ μž…λ‹ˆλ‹€. 틀림없이 start μ—μ„œλ„ 이λ₯Ό 확인해야 ν•©λ‹ˆλ‹€.

이 λ¬Έμ œλŠ” 맀우 κΈΈκ³  λ§Žμ€ μƒλž΅μ΄ ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. λˆ„κ΅°κ°€κ°€ κ³„μ†ν•΄μ„œ μœ μ‚¬ν•œ 문제λ₯Ό κ²ͺλŠ”λ‹€λ©΄ https://github.com/docker/machine/issues/new μ—μ„œ λ‹€μŒμ„ ν¬ν•¨ν•œ μžμ„Έν•œ 정보와 ν•¨κ»˜ μƒˆ ν•­λͺ©μ„ μ—¬μ‹­μ‹œμ˜€.

  • μ‚¬μš© 쀑인 OS
  • λ„€νŠΈμ›Œν‚Ή κ΅¬μ„±μ—μ„œ 비정상적인 λͺ¨λ“  것(VPN, ν”„λ‘μ‹œ, SSH ꡬ성 μ„€μ • λ“±),
  • --debug ν”Œλž˜κ·Έκ°€ μžˆλŠ” μ˜€μž‘λ™ λͺ…λ Ήμ˜ 좜λ ₯
  • VirtualBoxλŠ” ~/.docker/machine/machines/name/name μ—μ„œ λ‘œκ·Έν•©λ‹ˆλ‹€.

감사 ν•΄μš”!

  • N
이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰