ssl - TLS 握手错误

标签 ssl docker handshake docker-registry

我已经设置了一个使用自签名证书的 docker 注册表,但是我收到了这个错误。这个握手错误是什么意思?每次我尝试将图像推送到我的注册表时,日志都会增加。 (这是我的注册表关于 tls 的日志)

$ docker logs 30273f6ed90f | grep tls
    2015/12/15 13:42:25 http: TLS handshake error from 10.0.0.xx:43393: EOF
    2015/12/15 13:42:30 http: TLS handshake error from 10.0.0.xx:43396: EOF
    2015/12/15 13:42:40 http: TLS handshake error from 10.0.0.xx:43401: EOF
    2015/12/15 13:44:34 http: TLS handshake error from 10.0.0.xx:43442: EOF
    2015/12/15 13:44:39 http: TLS handshake error from 10.0.0.xx:43443: EOF
    2015/12/15 13:44:49 http: TLS handshake error from 10.0.0.xx:43460: EOF
    2015/12/15 13:45:25 http: TLS handshake error from 10.0.0.xx:43479: tls: first record does not look like a TLS handshake
    2015/12/15 13:45:58 http: TLS handshake error from 10.0.0.xx:43488: EOF
    2015/12/15 13:46:03 http: TLS handshake error from 10.0.0.xx:43491: EOF
    2015/12/15 13:46:13 http: TLS handshake error from 10.0.0.xx:43496: EOF
    2015/12/15 13:49:08 http: TLS handshake error from 10.0.0.xx:43546: EOF
    2015/12/15 13:50:14 http: TLS handshake error from 10.0.0.xx:43600: EOF
    2015/12/15 13:50:19 http: TLS handshake error from 10.0.0.xx:43603: EOF
    2015/12/15 13:50:29 http: TLS handshake error from 10.0.0.xx:43608: EOF
    2015/12/15 13:57:03 http: TLS handshake error from 10.0.0.xx:43695: EOF
    2015/12/15 13:57:28 http: TLS handshake error from 10.0.0.xx:43781: EOF
    2015/12/15 13:59:35 http: TLS handshake error from 10.0.0.xx:43834: tls: first record does not look like a TLS handshake
    2015/12/15 14:00:41 http: TLS handshake error from 10.0.0.xx:43860: EOF
    2015/12/15 14:00:46 http: TLS handshake error from 10.0.0.xx:43863: EOF
    2015/12/15 14:00:56 http: TLS handshake error from 10.0.0.xx:43868: EOF
    2015/12/15 14:18:40 http: TLS handshake error from 10.0.0.xx:44300: EOF
    2015/12/15 14:18:45 http: TLS handshake error from 10.0.0.xx:44303: EOF
    2015/12/15 14:18:55 http: TLS handshake error from 10.0.0.xx:44308: EOF
    2015/12/15 14:27:54 http: TLS handshake error from 10.0.0.xx:44531: EOF
    2015/12/15 14:27:59 http: TLS handshake error from 10.0.0.xx:44534: EOF
    2015/12/15 14:28:09 http: TLS handshake error from 10.0.0.xx:44539: EOF
    2015/12/15 14:31:55 http: TLS handshake error from 10.0.0.xx:44637: EOF
    2015/12/15 14:32:10 http: TLS handshake error from 10.0.0.xx:44644: EOF
    2015/12/15 14:32:33 http: TLS handshake error from 10.0.0.xx:44656: EOF
    2015/12/15 14:40:20 http: TLS handshake error from 10.0.0.xx:44855: EOF
    time="2015-12-15T13:41:22Z" level=info msg="listening on [::]:5000, tls" go.version=go1.5.2 instance.id=1e35bbf3-4337-4df5-8a57-bdeccaac5203 version=v2.2.1 
    time="2015-12-15T13:44:05Z" level=info msg="listening on [::]:5000, tls" go.version=go1.5.2 instance.id=a785b46c-6eac-4fff-9d78-0774abd46a8c version=v2.2.1 
    time="2015-12-15T14:37:40Z" level=info msg="listening on [::]:5000, tls" go.version=go1.5.2 instance.id=9d0c50e7-bfd8-4ec1-8531-6b3e0a23af6b version=v2.2.1 

最佳答案

很难理解您是如何在问题中提供的有限上下文的情况下访问 Docker 注册表的,但是查看 Go 代码(因为 Docker 是用 Go 编写的):https://golang.org/src/crypto/tls/conn.go ,您用于连接到 Docker 注册表的客户端未使用 HTTPS 访问注册表。

根据错误,您需要使用启用了 TLS 的客户端访问 docker 注册表,该客户端使用的证书由同一自签名 CA 信任,该 CA 用于为 Docker 注册表创建证书。

引用:http://tech.paulcz.net/2016/01/deploying-a-secure-docker-registry/

关于ssl - TLS 握手错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34292339/

相关文章:

java - Netty websocket SSL 连接 HANDSHAKE_ISSUED

python 扭曲套接字失败

java - 异常 CertificateException 永远不会在相应的 try 语句的主体中抛出

java - 从 eclipse 插件中连接到 HTTPS 会抛出异常

mysql - Ruby on Rails,乘客收到握手错误

tcp - 二 通用协议(protocol)与TCP握手

WCF 客户端无法验证 Java Web 服务。找不到 X509SecurityToken 的 token 验证器

Docker_swarm 模块 - ansible 的 join_token 参数不起作用

docker - 运行调试 session 时Xdebug超时(PhpFarm | phpFcgi)

mongodb - 无法从Docker中的Flask获取和发布数据到MongoDB