apache / rocketmq-operator

Apache RocketMQ Operator
https://rocketmq.apache.org/
Apache License 2.0
314 stars 127 forks source link

Cannot access name-service by kubernetes Service #145

Closed chaoyoung closed 1 year ago

chaoyoung commented 1 year ago

After setting the network of name-server to non-host mode, the name-service cannot be accessed by adding Service,the address rocketmq-console.rocketmq.svc.cluster.local can be pinged, but telnet fails, prompt Connection refused.

apiVersion: v1
kind: Service
metadata:
  name: name-service
  namespace: rocketmq
  labels:
    app: name-service
spec:
  type: ClusterIP
  selector:
    app: name-service
  ports:
  - name: main
    port: 80
    protocol: TCP
    targetPort: 9876
xinggengchang commented 1 year ago

After setting the network of name-server to non-host mode, the name-service cannot be accessed by adding Service,the address rocketmq-console.rocketmq.svc.cluster.local can be pinged, but telnet fails, prompt Connection refused.

apiVersion: v1
kind: Service
metadata:
  name: name-service
  namespace: rocketmq
  labels:
    app: name-service
spec:
  type: ClusterIP
  selector:
    app: name-service
  ports:
  - name: main
    port: 80
    protocol: TCP
    targetPort: 9876

我也用ingress暴露了nameservice,客户端报send request to failed 错,抓包看状态码返回的是400。 直接访问ingress-nginx域名端口返回的是502状态码,也不知道啥问题。

caigy commented 1 year ago

@chaoyoung It seems that rocketmq-console.rocketmq.svc.cluster.local is domain of rocketmq-console, which has nothing to do with access to name server.

caigy commented 1 year ago

@xinggengchang name server does NOT process HTTP and it does NOT response HTTP code like 4xx, 5xx.