I was playing around with Docker locally and somehow ended up with this error when I tried to list my docker machines:

$ docker-machine ls

NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS

default - virtualbox Running tcp: Unknown Unable to query docker version: Get https://192.168.99.101:2376/v1.15/version: x509: certificate is valid for 192.168.99.100, not 192.168.99.101

My Google Fu was weak I couldn't find any suggestions for what this might mean so I tried shutting it down and starting it again!

On the restart I actually got some helpful advice:

$ docker-machine stop

Stopping "default"...

Machine "default" was stopped.

$ docker-machine start

Starting "default"...

(default) Check network to re-create if needed...

(default) Waiting for an IP...

Machine "default" was started.

Waiting for SSH to be available...

Detecting the provisioner...

Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.

$ docker-machine env

Error checking TLS connection: Error checking and/or regenerating the certs: There was an error validating certificates for host "192.168.99.101:2376": x509: certificate is valid for 192.168.99.100, not 192.168.99.101

You can attempt to regenerate them using 'docker-machine regenerate-certs [name]'.

Be advised that this will trigger a Docker daemon restart which will stop running containers.

 

 

 

So I tried that:

And then regenerates my certificates:

$ docker-machine regenerate-certs

Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y

Regenerating TLS certificates

Waiting for SSH to be available...

Detecting the provisioner...

Copying certs to the local machine directory...

Copying certs to the remote machine...

Setting Docker configuration on the remote daemon...

And now everything is happy again!

$ docker-machine ls

NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS

default - virtualbox Running tcp: v1.9.0

Be Sociable, Share!

 

来自:http://www.markhneedham.com/blog/2016/12/21/docker-unknown-unable-to-query-docker-version-x509-certificate-is-valid-for/

 

说明:

  1. 如果有多台虚机的时候,需要在命令的后面加机器名。
  2. 直接运行docker-machine env或者regenerate-certs可能不行,会报连接不上的错误,那么就从头执行:stop->start->env->regenerate-certs.

Docker: Unknown – Unable to query docker version: x509: certificate is valid for的更多相关文章

  1. x509: certificate is valid for 10.96.0.1, 172.18.255.243, not 120.79.23.226

    服务器:阿里云服务器 master:120.79.23.226 node:39.108.131.246 系统:Centos 7.4 node节点加入集群中是报错: x509: certificate ...

  2. docker 报错:x509: certificate has expired or is not yet valid

    环境:centos 7 程序:docker 下载镜像报错: # docker pull centos Pulling repository centos FATA[0004] Get https:// ...

  3. docker push 出现:x509: certificate signed by unknown authority

    今天,部署生产的程序的时候,出现一个问题:编译正常,但是,docker 把编译好的image 推送到生产环境上去的时候,出现:x509: certificate signed by unknown a ...

  4. docker从私有镜像库pull/push镜像问题:Error response from daemon: Get https://xxxx.com/: x509: certificate signed by unknown authority

    docker从私有镜像库pull/push镜像问题:Error response from daemon: Get https://harbor.op.xxxx.com/v2/: x509: cert ...

  5. gitlab runner使用docker报错(x509: certificate signed by unknown authority)定位

    如果gitlab runner使用docker,docker是普通配置,配置好后,runner就可以正常执行任务了. 另外一个环节Docker配置了tls加密连接,添加runner后,runner的配 ...

  6. Unable to connect to the server: x509: certificate signed by unknown authority

    0x00 Problem 在使用二进制搭建 k8s 集群的过程中,使用 kubectl get 等操作时始终显示 x509: certificate signed by unknown authori ...

  7. docker x509: certificate has expired or is not yet valid

    系统环境:centos 6.5 内核版本:2.6.32-696.1.1.el6.x86_64 程序版本:Docker version 1.7.1, build 786b29d/1.7.1 问题:下载镜 ...

  8. docker报错: x509: certificate has expired or is not yet valid

    环境:最小化安装centos7 问题:docker 启动没问题,但是查询 镜像时报错 Error response from daemon: Get https://index.docker.io/v ...

  9. Docker私有云管理平台————Docker Shipyard

    一.shipyard中文版安装(CentOS) 注:本文安装操作均在root用户下,安装前需先安装Docker (传送门) 下载所需docker镜像 docker pull rethinkdb doc ...

随机推荐

  1. sublime text2 用ctags插件实现方法定位(转)

    我们用sublime几乎都会首先安装这个插件,这个插件是管理插件的功能,先安装它,再安装其他插件就方便了. 点击sublime的菜单栏 view->show console :现在打开了控制台, ...

  2. CAS服务器配置

    参考文献: http://sucre.blog.51cto.com/1084905/683624 1.安装部署CAS Server 从官网下载CAS Server,今天发现CAS Server的官网居 ...

  3. 如何运行Hadoop自带的例子

    bin/hadoop jar share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.4.jar wordcount /WordCount/WordC ...

  4. linux socket talkclient talkserver示例

    cleint: #define _GNU_SOURCE 1 #include <sys/types.h> #include <sys/socket.h> #include &l ...

  5. socket listen参数中的backlog

    服务器监听时,在每次处理一个客户端的连接时是需要一定时间的,这个时间非常的短(也许只有1ms 或者还不到),但这个时间还是存在的.而这个backlog 存在的意义就是:在这段时间里面除了第一个连接请求 ...

  6. 查询死锁的Session SQL 语句

    /* Formatted on 2018/3/14 23:34:49 (QP5 v5.256.13226.35538) */ SELECT dob.object_name table_name , l ...

  7. 【java】判断某段字符串的编码方式,并按照新的编码方式输出

    具体操作: String destination ="testå¾·ç\u008E\u009B西äº\u009A"; try { if(destination.equals(n ...

  8. Facebook工程师是如何改进他们Android客户端的

    from://http://greenrobot.me/devnews/facebook-engineer-improve-android-app/ Facebook工程师是如何改进他们Android ...

  9. ExtJS学习-----------Ext.Array,ExtJS对javascript中的Array的扩展(实例)

    (1)clean var arr = [1,2,null,3,'']; alert(Ext.Array.clean(arr)); //clean的对象:(value === null) || (val ...

  10. Ioc:The basic pattern for integrating Autofac into your application

    The basic pattern for integrating Autofac into your application is: Structure your app with inversio ...