Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

Keeps asking for passphrase and password on Win 8.1 #952

Closed
clns opened this issue Jun 24, 2015 · 6 comments
Closed

Keeps asking for passphrase and password on Win 8.1 #952

clns opened this issue Jun 24, 2015 · 6 comments

Comments

@clns
Copy link

clns commented Jun 24, 2015

I'm unable to run any docker commands because it cannot connect to the target machine.

$ docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): windows/amd64
Get http://127.0.0.1:2375/v1.19/version: dial tcp 127.0.0.1:2375: ConnectEx tcp: No connection could be made because the
 target machine actively refused it.. Are you trying to connect to a TLS-enabled daemon without TLS?

Here is the verbose output from some commands like boot2docker.exe -v init|up|ip|shellinit and docker version. You can see it asks for a passphrase and password sometimes 3-4 times, and the docker command is not connecting to the server.

I tried everything I could:

  • removed Host-only Networks from VirtualBox -> Preferences -> Network
  • reinstalled Virtual Box and boot2docker v1.7.0 from here
  • deleted $HOME/.boot2docker and $HOME/.ssh/id_boot2docker[.pub]
  • checked that host port 2022 is forwarded to 22 on guest, in VirtualBox for boot2docker-vm
  • restarted Windows many times
  • I'm running PowerShell as Administrator, but I also tried without administrator

Nothing helped. At this point I completely exhausted all the options.

@josephpage
Copy link

Hey,
Is docker --tlsverify=false version working ?

@clns
Copy link
Author

clns commented Jun 24, 2015

Doesn't look like (boot2docker-vm is currently running):

D:\> docker --tlsverify=false version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): windows/amd64
An error occurred trying to connect: Get https://127.0.0.1:2375/v1.19/version: dial tcp 127.0.0.1:2375: ConnectEx tcp: N
o connection could be made because the target machine actively refused it.

I'm able to ssh into the VM though, after I hit ENTER for passphrase and type tcuser for pwd:

D:\> boot2docker.exe ssh
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
                        ##         .
                  ## ## ##        ==
               ## ## ## ## ##    ===
           /"""""""""""""""""\___/ ===
      ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ /  ===- ~~~
           \______ o           __/
             \    \         __/
              \____\_______/
 _                 _   ____     _            _
| |__   ___   ___ | |_|___ \ __| | ___   ___| | _____ _ __
| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|
| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__|   <  __/ |
|_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|
Boot2Docker version 1.7.0, build master : 7960f90 - Thu Jun 18 18:31:45 UTC 2015
Docker version 1.7.0, build 0baf609
docker@boot2docker:~$

@josephpage
Copy link

Mmm, your env variables are not set properly for Windows, so docker client try to connect to 127.0.0.1:2375 instead of 192.166.59.103:2375.

Try in Powershell :

$Env:DOCKER_HOST = "tcp://192.168.59.103:2376"
$Env:DOCKER_CERT_PATH = "C:\Users\Calin\.boot2docker\certs\boot2docker-vm"
$Env:DOCKER_TLS_VERIFY = "1"

@clns
Copy link
Author

clns commented Jun 24, 2015

This is very weird, I set those vars as mentioned and absolutely no change:

D:\> echo $env:DOCKER_HOST $env:DOCKER_CERT_PATH $env:DOCKER_TLS_VERIFY
tcp://192.168.59.103:2376
C:\Users\Calin\.boot2docker\certs\boot2docker-vm
1
D:\> boot2docker.exe shellinit
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
Writing C:\Users\Calin\.boot2docker\certs\boot2docker-vm\ca.pem
Writing C:\Users\Calin\.boot2docker\certs\boot2docker-vm\cert.pem
Writing C:\Users\Calin\.boot2docker\certs\boot2docker-vm\key.pem
Your environment variables are already set correctly.

Also I tried boot2docker -v stop|start, I get the exact same output as in the original comment.

@josephpage
Copy link

Weird.
A last try : docker -H tcp://192.168.59.103:2376 --tlsverify=false ps
Look at this fix and the thread too.

@clns
Copy link
Author

clns commented Jun 24, 2015

Thanks, the last try worked 😄 , and also this fix you pointed to. Now docker works correctly. I had to manually stop the VM from the VirtualBox GUI, then start it as usual from cli.

However it still asks me about 4 times for a passphrase and password, but at least it works. Thanks so much!

D:\> boot2docker.exe -v up
Boot2Docker-cli version: v1.7.0
Git commit: 7d89508
2015/06/24 17:08:27 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machineread
able
2015/06/24 17:08:27 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe guestproperty set boot2docker-vm /Virtu
alBox/GuestAdd/SharedFolders/MountPrefix /
2015/06/24 17:08:28 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe guestproperty set boot2docker-vm /Virtu
alBox/GuestAdd/SharedFolders/MountDir /
2015/06/24 17:08:28 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe sharedfolder add boot2docker-vm --name
c/Users --hostpath C:\Users --automount
VBoxManage.exe: error: Shared folder named 'c/Users' already exists
VBoxManage.exe: error: Details: code VBOX_E_OBJECT_IN_USE (0x80bb000c), component SessionMachine, interface IMachine, ca
llee IUnknown
VBoxManage.exe: error: Context: "CreateSharedFolder(Bstr(name).raw(), Bstr(hostpath).raw(), fWritable, fAutoMount)" at l
ine 1015 of file VBoxManageMisc.cpp
2015/06/24 17:08:28 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe setextradata boot2docker-vm VBoxInterna
l2/SharedFoldersEnableSymlinksCreate/c/Users 1
2015/06/24 17:08:28 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe startvm boot2docker-vm --type headless
Waiting for VM "boot2docker-vm" to power on...
VM "boot2docker-vm" has been successfully started.
2015/06/24 17:08:31 executing: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe showvminfo boot2docker-vm --machineread
able
Waiting for VM and Docker daemon to start...
.Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://loc
alhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://loc
alhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0)
.Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://loc
alhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0).Connecting to tcp://localhost:2022 (attempt #0)
2015/06/24 17:08:45 executing: C:\Program Files (x86)\OpenSSH\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChec
king=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\Calin\.ssh\id_boot2docker docker@localhost
 ip addr show dev eth1
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
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:01:1a:f5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.59.103/24 brd 192.168.59.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe01:1af5/64 scope link
       valid_lft forever preferred_lft forever

END SSH
VM Host-only IP address: 192.168.59.103
Waiting for Docker daemon to start...
o2015/06/24 17:08:49 executing: C:\Program Files (x86)\OpenSSH\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChe
cking=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\Calin\.ssh\id_boot2docker docker@localhos
t grep tcp:// /proc/$(cat /var/run/docker.pid)/cmdline
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
SSH returned: tcp://0.0.0.0:2376

END SSH
2015/06/24 17:08:53 executing: C:\Program Files (x86)\OpenSSH\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChec
king=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\Calin\.ssh\id_boot2docker docker@localhost
 ip addr show dev eth1
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
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:01:1a:f5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.59.103/24 brd 192.168.59.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe01:1af5/64 scope link
       valid_lft forever preferred_lft forever

END SSH

Started.
2015/06/24 17:08:56 executing: C:\Program Files (x86)\OpenSSH\bin\ssh.exe ssh -o IdentitiesOnly=yes -o StrictHostKeyChec
king=no -o UserKnownHostsFile=/dev/null -o LogLevel=quiet -p 2022 -i C:\Users\Calin\.ssh\id_boot2docker docker@localhost
 tar c /home/docker/.docker/*.pem
Enter passphrase for key 'C:\Users\Calin\.ssh\id_boot2docker':
docker@localhost's password: [typed tcuser]
tar: removing leading '/' from member names
Writing C:\Users\Calin\.boot2docker\certs\boot2docker-vm\ca.pem
Writing C:\Users\Calin\.boot2docker\certs\boot2docker-vm\cert.pem
Writing C:\Users\Calin\.boot2docker\certs\boot2docker-vm\key.pem
Your environment variables are already set correctly.

D:\> docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): windows/amd64
Server version: 1.7.0
Server API version: 1.19
Go version (server): go1.4.2
Git commit (server): 0baf609
OS/Arch (server): linux/amd64

@clns clns closed this as completed Jan 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants