GKE上的Kubernetes入口导致HTTP上的502响应/ https上的SSL_ERROR_SYSCALL

时间:2019-06-13 18:42:14

标签: google-cloud-platform google-kubernetes-engine

我已经在minikube上测试了我的配置,该配置可以完美地工作,但是在GKE上,当HTTPS终止连接时,我遇到了HTTP响应为502的错误?

我不知道如何诊断此问题,我可以查看哪些日志?

在通过https://

访问时,这是详细的curl日志
* Expire in 0 ms for 1 (transfer 0x1deb470)
* Expire in 0 ms for 1 (transfer 0x1deb470)
* Expire in 0 ms for 1 (transfer 0x1deb470)
*   Trying 35.244.154.110...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x1deb470)
* Connected to chrischrisexample.de (35.244.154.110) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to chrischrisexample.de:443 
* Closing connection 0
curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to chrischrisexample.de:443 

1 个答案:

答案 0 :(得分:0)

Events:
  Type     Reason     Age                     From                     Message
  ----     ------     ----                    ----                     -------
  Warning  Sync       14m (x20 over 157m)     loadbalancer-controller  Could not find TLS certificates. Continuing setup for the load balancer to serve HTTP. Note: this behavior is deprecated and will be removed in a future version of ingress-gce
  Warning  Translate  3m56s (x18 over 9m24s)  loadbalancer-controller  error while evaluating the ingress spec: could not find port "80" in service "default/app"; could not find port "80" in service "default/app"; could not find port "80" in service "default/app"; could not find port "80" in service "default/app"

这些错误显示在kubectl describe ingress上...仍然没有道理为什么在SSL握手/连接上会出错。


一旦我对运行状况检查发出了HTTP 200(来自Google负载平衡器!),并且在入口处设置了虚拟ssl证书机密,一切都将正常工作。