繁体   English   中英

Docker中的Docker - SSL问题

[英]Docker In Docker - SSL problems

我在CI管道中使用Docker In Docker for Jenkins Slaves。

我遇到过有关SSL的问题。 问题是maven无法访问位于我们Nexus仓库中的工件,它只是挂起。

我尝试使用curl进行调试。

在DinD容器内,一切都很好:

$ curl -I https://www.google.com
HTTP/1.1 200 OK

但是,如果我运行:

bash-4.3# curl -I --insecure  https://nexus.eng.myco.com/nexus
curl: (35) Unknown SSL protocol error in connection to nexus.eng.myco.com:443`

它挂了很长时间然后我收到这个错误:

curl: (35) Unknown SSL protocol error in connection to nexus.eng.myco.com:443`

我可以运行有问题的curl语句一级(运行问题docker容器的docker容器),一切都很好。

我应该注意,如果我在我的笔记本电脑上运行有问题的DinD容器(不是在DinD中),它没有问题。

使用调试信息更新:

bash-4.3#  curl -v -I https://nexus.eng.myco.com/nexus/content/groups/this>
*   Trying 54.164.137.27...
* Connected to nexus.eng.my.com (44.164.137.27) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):

有任何想法吗?

可能现在回答已经太晚了,但我会把它放在这里以防其他有类似问题的陌生人。
我建议检查父母和子容器中的MTU。

ip addr | grep mtu

如果你看到MTU的差异
例如

3: eth0@if14: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1402 qdisc noqueue state UP group default
4: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default

它需要被纠正为相同。
例如

ip link set dev eth0 mtu 1500

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM