Skip to content

fresh install - could not read CA certificate. The system cannot find the path specified. #1746

Closed
@JimPruitt

Description

@JimPruitt
  • Fresh install on Windows 10.
  • Virtual machine "Moby" created successfully in Hyper-V and is able to start successfully.
  • Tray application states "Docker is up and running!".

Expected behavior

  • Issue a "docker images" at command prompt
  • docker should return an (empty) list of images.

Actual behavior

  • Issue a "docker images" at command prompt
  • an error message is presented stating
    "could not read CA certificate "C:\\Users\\...\\.docker\\machine\\machines\\default\\ca.pem": open C:\Users\...\.docker\machine\machines\default\ca.pem: The system cannot find the path specified."
    (*note the "..." in the path is my username for my home directory)

I'd expect that the default docker-machine would automatically generate certificates in the correct location. Instead ...\.docker\machine\machines is empty.

Information

  • Diagnostic ID from "Diagnose & Feedback" in the menu.
    A diagnostic was uploaded with id: 922D6223-5E7B-4382-9261-2357D39E22AC/2018-02-23_09-04-38

  • host distribution and version (Windows version, build number, etc)
    Windows version: Windows 10 Enterprise
    OS Build: 14393.2035
    Version: 1607

Docker Version: Version 17.12.0-ce-win47 (15139)

Steps to reproduce the behavior

  1. Download and run (elevated) "Docker for Windows Installer.exe" (MD5: 8427cee2e9ee0c2c342e0ce8747c4217 )
  2. After installation, execute "Docker for Windows" shortcut on desktop (elevated).
  3. Wait until dialog pops up saying "Docker is running!".
  4. Open PowerShell and type 'docker images'
  5. Sit and stare the the error message for a moment, and then go on a hunt for missing certificates...

Activity

JimPruitt

JimPruitt commented on Feb 23, 2018

@JimPruitt
Author

I've discovered that if I run docker-machine create --driver hyperv vm, new certs are successfully generated at 'C:\Users\...\.docker\machine\certs'. But this is a different path than what is stated in the initial error message.

Additionally, at the end of the 'vm' creation, was presented with another error message:
Warning: got an invalid line error parsing /etc/os-release: Expected The system cannot find the path specified. to split by '=' char into two strings, instead got 1 strings Error creating machine: Error detecting OS: OS type not recognized

georaldc

georaldc commented on Mar 26, 2018

@georaldc

Do you have any DOCKER environment variables that would have been interfering with the application? I had the same problem after moving from Docker Toolbox to the native app and had to just delete those environment variables to get things working.

JimPruitt

JimPruitt commented on Apr 13, 2018

@JimPruitt
Author

Thanks @georaldc . That does appear to be the case here. Great suggestion!

Ebeid

Ebeid commented on Apr 18, 2018

@Ebeid

what environment variables you removed @georaldc ?

bobd-biz

bobd-biz commented on Apr 18, 2018

@bobd-biz

Just went through this myself and things seem to be working. I deleted

  • DOCKER_TLS_VERIFY
  • DOCKER_CERT_PATH
  • DOCKER_HOST
  • DOCKER_TOOLBOX_INSTALL_PATH

If you have any other variables set, you probably want to delete those as well. You can experiment by opening a command window, doing one or more SET DOCKER_HOST= (or whatever variable), and then trying a docker command.

leehaskings

leehaskings commented on Apr 27, 2018

@leehaskings

Hit the same issue. I suspect it's come from first having Docker Toolbox installed and then later on installing Docker for Windows.

One additional thing I did to fix this issue was also uninstall Virtualbox to remove any clashes there.

The solution from @rwdietrich above fixed it for me, but took me a while to work out how to remove these variables. Here's how:

(from: https://apilevel.wordpress.com/2017/11/23/docker-for-windows-certificate-error-solution/)

  1. Go to Control Panel\All Control Panel Items\System Then click Advanced system settings, In System Properties, Go to Advanced Tab and Click Environment Variables. Delete all DOCKER_* from System/User variables.

  2. Remove DOCKER_* from command prompt or PowerShell, i used PowerShell. using following steps

[Environment]::SetEnvironmentVariable("DOCKER_CERT_PATH", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_HOST", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_MACHINE_NAME", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_TLS_VERIFY", $null, "User")
[Environment]::SetEnvironmentVariable("DOCKER_TOOLBOX_INSTALL_PATH", $null, "User")

umairsarwar

umairsarwar commented on Jun 18, 2018

@umairsarwar

I removed the environment variables through UI but it didn't work. Then I had to manually set all the docker related variables to empty through command line i.e SET DOCKER_HOST= etc.

Btw this problem happened when I switched from Docker Toolbox to Native Docker for windows and tried to run docker command for the first time.

a-florian-h

a-florian-h commented on Jul 5, 2018

@a-florian-h

Following up on @leehaskings for the UI solutions and @umairsarwar for the command lines,
the problem was fixed for me.

Below are the plain text command lines.

SET DOCKER_CERT_PATH= $null, "User"
SET DOCKER_HOST= $null, "User"
SET DOCKER_MACHINE_NAME= $null, "User"
SET DOCKER_TLS_VERIFY= $null, "User"
SET DOCKER_TOOLBOX_INSTALL_PATH= $null, "User"

I ran into the problem after an upgrade from windows 7 pro and the use of Docker Toolbox + oracle virtual box to windows 10 pro and native docker.

gkimpson

gkimpson commented on Aug 24, 2018

@gkimpson

I had the same issues - I had to remove the following from the System Environment variables :-
DOCKER_TLS_VERIFY
DOCKER_CERT_PATH
DOCKER_HOST
DOCKER_TOOLBOX_INSTALL_PATH

Once I removed Docker then re-installed Docker this seems to work fine 👍

26 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @guillaumerose@georaldc@gkimpson@EnnioWolsink@bobd-biz

        Issue actions

          fresh install - could not read CA certificate. The system cannot find the path specified. · Issue #1746 · docker/for-win