简体   繁体   English

使用 ingress(Kubernetes) 路由服务时访问 perforce 服务器失败

[英]Failed to access perforce server when using ingress(Kubernetes) to route the service

I am getting "partner is not a Perforce client/server" when using ingress to route the service, but I am able to directly query the perforce server in the Kubernetes cluster.使用入口路由服务时,我收到“合作伙伴不是 Perforce 客户端/服务器”的消息,但我能够直接查询 Kubernetes 集群中的 perforce 服务器。

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-notls
  namespace: default
  annotations:
    kubernetes.io/ingress.class: "gce"
spec:
  rules:
  - host: perforce.domain.com
    http:
      paths:
      - path: /*
        backend:
          serviceName: p4-server
          servicePort: 80

p4 service p4服务

apiVersion: v1
kind: Service
metadata: 
  name: p4-server
spec:
  type: NodePort
  ports:
    - port: 80
      targetPort: 1666
      nodePort: 30166
      name: p4-server

  selector: 
    run: p4-server

if I am in the cluster:如果我在集群中:

$ p4 -p p4-server:80 info       
User name: root
Client name: platform-3101934619-wtxs5
Client host: platform-3101934619-wtxs5
Client unknown.
Current directory: /
Peer address: 10.4.0.218:49924
Client address: 10.4.0.218
Server address: p4-server-1400441787-fcmd9:1666
Server root: /codelingo
Server date: 2017/10/04 02:19:17 +0000 UTC
Server uptime: 380:53:52
Server version: P4D/LINUX26X86_64/2017.1/1511680 (2017/05/05)
Server license: none
Case Handling: sensitive

p4 logs: p4 日志:

Perforce server info:
    2017/10/04 02:19:17 pid 23038 root@platform-3101934619-wtxs5 10.4.0.218 [p4/2017.1/LINUX26X86_64/1511680] 'user-info'

Failed attempt via ingress:通过入口尝试失败:

$ p4 -p perforce.domain.com:80 info 
(hangs)

p4 logs: p4 日志:

Perforce server error:
    Date 2017/10/04 02:18:30:
    Pid 23012
    Connection from 10.4.0.1:38622 broken.
    RpcTransport: partner is not a Perforce client/server.
    RpcTransport: partner is not a Perforce client/server.
    RpcTransport: partner is not a Perforce client/server.

Peer address: 10.4.0.218:49924对等地址:10.4.0.218:49924

looks suspiciously like a bi-directional protocol, meaning that client and server expect to have unfettered access to one another, ala (non-passive mode) ftp看起来像一个双向协议,这意味着客户端和服务器希望可以不受限制地相互访问,ala(非被动模式)ftp

http: paths: - path: /*

I don't believe that http: stanza is an accurate statement, as I doubt super, super seriously that Perforce speaks http between the client and the server.我不相信http: stanza 是一个准确的陈述,因为我非常怀疑 Perforce 在客户端和服务器之间说 http 。 There are ongoing discussions around teaching Ingress about TCP, but for the time being I think you've gotten most of the way to where you want to go by already having a NodePort for :1666有关于教授 Ingress 关于 TCP 的持续讨论,但就目前而言,我认为你已经拥有了一个NodePort for :1666

Create a GCE tcp load balancer (which effectively is just a firewall to keep the wild Internet away from your cluster) and point its 1666 to port 30166 on every Node in your cluster.创建一个 GCE tcp负载均衡器(它实际上只是一个防火墙,可以让疯狂的 Internet 远离您的集群)并将其 1666 指向集群中每个节点上的端口 30166。 It's unclear if anything further needs to happen around Perforce, but from the "establishing tcp/ip connectivity between outsiders and your in-cluster P4" point of view, I think that would do it目前尚不清楚 Perforce 是否需要进一步处理,但从“在外部人员和集群内 P4 之间建立 tcp/ip 连接”的角度来看,我认为可以做到

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

相关问题 使用 Ingress 主机名的 Kubernetes 路由到服务 | 钥匙斗篷 - Kubernetes Route to Service using Ingress hostname | Keycloak 使用入口在远程Kubernetes集群中的访问服务 - Access service in remote Kubernetes cluster using ingress 如何禁用 http 使用 Kube.netes Nginx ingress controller 访问服务? - How to disable http access to service using Kubernetes Nginx ingress controller? 使用 Ingress 在 Kubernetes 中公开服务 - Expose Service in Kubernetes using Ingress Kube.netes ingress - 访问web服务容器子路径 - Kubernetes ingress - access to web service container subpaths Kubernetes 中进入 ClusterIP 和 Headless 服务的入口路由连接有什么区别? - What is the different between ingress route connection into ClusterIP and Headless service in Kubernetes? 无法使用 Ingress Kubernetes 连接到服务 - Unable to Connect to a service using Ingress Kubernetes Kube.netes 入口 nginx 路由到同一路径(不同的服务;不同的端口) - Kubernetes ingress nginx route to same path (different service; different port) Azure Kubernetes Nginx Ingress: How do I properly route to an API service and an Nginx web server with HTTPS and avoid 502? - Azure Kubernetes Nginx Ingress: How do I properly route to an API service and an Nginx web server with HTTPS and avoid 502? Kubernetes - Ingress / Service / LB. - Kubernetes - Ingress / Service / LB
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM