Repository: boot2docker/boot2docker

Issue #824: boot2docker(v 1.4.1 and 1.5) bad cert issues on OSX 10.9.3
Created: 2015-04-10T18:19:23Z
Keep running into the following error I attempt to run the hello-world app.
An error occurred trying to connect: Post https://192.168.59.103:2376/v1.16/containers/create: remote error: bad certificate
Have attempted to do boot2docker stop,delete and init multiple times. Also tried manually removing the .bootdocker directory and starting over
The following is what I see in the /var/log/docker.log file
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D PREROUTING -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -D OUTPUT -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -F DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -X DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -N DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER]"
time="2015-04-10T18:25:26Z" level="debug" msg="/usr/local/sbin/iptables, [-t nat -A OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER]"
time="2015-04-10T18:25:26Z" level="info" msg="-job init_networkdriver() = OK (0)"
time="2015-04-10T18:25:26Z" level="debug" msg="Restarting containers..."
time="2015-04-10T18:25:26Z" level="info" msg="docker daemon: 1.4.1 5bc2ff8; execdriver: native-0.2; graphdriver: aufs"
time="2015-04-10T18:25:26Z" level="info" msg="+job acceptconnections()"
time="2015-04-10T18:25:26Z" level="info" msg="-job acceptconnections() = OK (0)"
2015/04/10 18:08:43 http: TLS handshake error from 192.168.59.3:53358: tls: failed to verify client's certificate: x509: certificate has expired or is not yet valid

Duplicate issue #953: Invalid certificate connecting to daemon
Created: 2015-06-24T13:37:55Z
I just upgraded to 1.7 and it looks like a possible timing issue when starting the boot2docker VM. During startup the 192 interface isn't up when docker -d is started. I modified /etc/init.d/boot2docker to print the output of ifconfig during startup and this is what I see.
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
   valid_lft forever preferred_lft forever
inet6 ::1/128 scope host 
   valid_lft forever preferred_lft forever
2: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default 
    link/ether 3e:8b:d2:d2:5d:ec brd ff:ff:ff:ff:ff:ff
3: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:fe:88:a1 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fefe:88a1/64 scope link tentative 
       valid_lft forever preferred_lft forever
4: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 08:00:27:6a:7f:44 brd ff:ff:ff:ff:ff:ff
-------------------
Need TLS certs for boot2docker,127.0.0.1,10.0.2.15
-------------------

This leads to the following error when trying to run docker
An error occurred trying to connect: Get https://192.168.59.103:2376/v1.19/containers/json: x509: certificate is valid for 127.0.0.1, 10.0.2.15, not 192.168.59.103

Closing comment (2015-06-24T14:51:30Z): Duplicate of #824
Fix in PR #411