Docker 一个现有的连接被远程主机强行关闭

时间:2021-07-30 13:59:03

标签: docker

我对 docker 很陌生,我已经安装了 Docker 版本

C:\Windows\system32>docker version
Client:
Version:       18.03.0-ce
API version:   1.37
Go version:    go1.9.4
Git commit:    0520e24302
Built: Fri Mar 23 08:31:36 2018
OS/Arch:       windows/amd64
Experimental:  false
Orchestrator:  swarm
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.37/version: o
pen //./pipe/docker_engine: The system cannot find the file specified. In the de
fault daemon configuration on Windows, the docker client must be run elevated to
connect. This error may also indicate that the docker daemon is not running.

我尝试用这个命令创建一台机器。

docker-machine --debug create default --virtualbox-no-vtx-check

后来我看到了

(default) DBG | {
(default) DBG | Waiting for VM "default" to power on...
(default) DBG | VM "default" has been successfully started.
(default) DBG | }
(default) DBG | STDERR:
(default) DBG | {
(default) DBG | }
(default) DBG | Getting to WaitForSSH function...
(default) DBG | SSH binary not found, using native Go implementation
(default) DBG | &{{{<nil> 0 [] [] []} docker [0x76ed50] 0x76ed00  [] 0s} 127.0.0
.1 54527 <nil> <nil>}
(default) DBG | About to run SSH command:
(default) DBG | exit 0
(default) DBG | Error dialing TCP: ssh: handshake failed: read tcp 127.0.0.1:545
31->127.0.0.1:54527: wsarecv: An existing connection was forcibly closed by the
remote host.
(default) DBG | Error dialing TCP: ssh: handshake failed: read tcp 127.0.0.1:617
96->127.0.0.1:54527: wsarecv: An existing connection was forcibly closed by the
remote host.
(default) DBG | Error dialing TCP: ssh: handshake failed: read tcp 127.0.0.1:613
31->127.0.0.1:54527: wsarecv: An existing connection was forcibly closed by the
remote host.
(default) DBG | Error dialing TCP: ssh: handshake failed: read tcp 127.0.0.1:541
49->127.0.0.1:54527: wsarecv: An existing connection was forcibly closed by the
remote host.

默认机器已成功启动:) 但是如果我转到 Oracle VM VirtualBox,我会看到它在那里,但关闭了 :( Oracle VM VirtualBox Versión 5.2.8 r121009 (Qt5.6.2)

为什么这是启动,后来主机问题被关闭?

如果我输入

C:\Windows\system32>docker-machine start default
Starting "default"...
Machine "default" is already running.
C:\Windows\system32>docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER   ERRORS
default            virtualbox   Timeout

如果我在 Intellij Idea 上打字

C:\JohnStephen\profitek>docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER    ERRORS
default   -        virtualbox   Stopped                 Unknown

C:\JohnStephen\profitek>docker-machine start default
Starting "default"...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to configure a dhcp server. Sometimes, such 
confirmation window is minimized in the taskbar.
Error setting up host only network on machine start: C:\Program 
Files\Oracle\VirtualBox\VBoxManage.exe modifyvm default --nic2 hostonly --nictype2 82540EM -- 
nicpromisc2 deny --hostonlyadapter2 VirtualBox Host-Only E
thernet Adapter #2 --cableconnected2 on failed:
VBoxManage.exe: error: Code E_FAIL (0x80004005) - Unspecified error (extended info not available)
VBoxManage.exe: error: Context: "LockMachine(a->session, LockType_Write)" at line 525 of file 
VBoxManageModifyVM.cpp

并尝试提升守护进程。

C:\Windows\system32>docker-machine env --shell cmd default
Error checking TLS connection: Could not find matching IP for MAC address 
0800275f0d68

我试过了

1)。移除机器并重新创建几次

2)。重启docker

3)。尝试从 VM 启动,出现错误。

4)。重启电脑

操作系统:Windows 7。

正如我之前所说,对不起,我是个婴儿踩到 docker。

0 个答案:

没有答案