apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.6k stars 3.25k forks source link

[Bug] GUI: The login information has expired. Click OK to jump to the login page. #37375

Open josedev-union opened 3 months ago

josedev-union commented 3 months ago

Search before asking

Version

2.1

What's Wrong?

I am not able to use Doris GUI because this message is popping up always from the start. image

What You Expected?

The login session should be usable.

How to Reproduce?

Anything Else?

I can ignore this tip by clicking cancel button and go to any page and this tip message will pop everytime. But sometimes the GUI works regardless of this message. So i think this expiration notification is false negative.

Are you willing to submit PR?

Code of Conduct

greypale163 commented 3 months ago

我也存在同样的问题,不过找到了原因。我这里通过配置apisix路由进行访问,apisix的路由配置的上游服务里,设置的doris节点有3个,默认是带权轮询,这样设置后去访问doris就会出现登录即session过期的问题。 解决办法是apisix路由配置的上游服务设置改为一致性哈希,或访问节点只设置成1个。

Asakiny commented 3 months ago

基于Doris Operator部署的Doris on K8S,多fe的情况下,也会遇到这个bug,似乎需要设置svc的spec.sessionAffinity=ClusterIP来保持会话,但是发现目前的官方提供的doris helm不支持修改

josedev-union commented 3 months ago

我也存在同样的问题,不过找到了原因。我这里通过配置apisix路由进行访问,apisix的路由配置的上游服务里,设置的doris节点有3个,默认是带权轮询,这样设置后去访问doris就会出现登录即session过期的问题。 解决办法是apisix路由配置的上游服务设置改为一致性哈希,或访问节点只设置成1个。

do you mean you use apisix as the gateway infront of doris FE Or doris FE uses apisix as builtin?

josedev-union commented 3 months ago

基于Doris Operator部署的Doris on K8S,多fe的情况下,也会遇到这个bug,似乎需要设置svc的spec.sessionAffinity=ClusterIP来保持会话,但是发现目前的官方提供的doris helm不支持修改

I think your idea is to set ClientIP for sessionAffinity. Btw, this cannot be a perfect solution because normally FE is exposed using LoadBalancer service type or Ingress. In those cases, ClientIP is overridden by LB ip or ingress controller's ip.

Asakiny commented 3 months ago

在云环境下,您的观点是没问题的,通常私有环境部署是使用的是NodePort,Doris也提供了NodePort的配置方式,这种情况下既然提供了NodePort的配置方式,我理解对应的多fe的svc配置也是需要匹配的,目前我临时edit svc添加spec.sessionAffinity=ClientIP是暂时可以解决的,仅供各位遇到同样问题可以参考。 In a cloud environment, your point is valid. Usually, in a private environment deployment, NodePort is used frequently, and Doris also provides a NodePort configuration method. In this case, since NodePort configuration is provided, I understand that the corresponding multi-FE svc configuration also needs to match. Currently, I temporarily edited the svc to add spec.sessionAffinity=ClientIP, which can temporarily solve the problem. This is provided as a reference for anyone encountering the same issue.

catpineapple commented 3 months ago

hi, 我是doris-operator 的开发者, 仅就基于 doris-operator 部署的多 fe 来讲:这个 webUI 带的 session 在切换中间负载均衡节点时会断掉,尤其是轮询的策略,我们在 operator的 service 里面默认加上了这个 SessionAffinity 的配置, 保证 在service 的负载到 fe 的过程中,同一个 ip 尽可能 访问固定的 fe. 如果在你的浏览器访问 k8s service 的时候,又做了 负载均衡,那么这个负载均衡没有类似于 SessionAffinity = clientip 的配置的话,还是会频繁断链。 当然,其他的情况也可以依照这个思路定位一下问题,只要是客户端ip 出现切换的情况,都可能造成session 过期的情况。

Hi, I am the developer of doris-operator. Just speaking of multiple FEs deployed based on doris-operator: the session with this webUI will be disconnected when switching the intermediate load balancing node, especially the polling strategy. We have added this SessionAffinity configuration by default in the operator's service to ensure that in the process of service load to FE, the same IP accesses the fixed FE as much as possible. If you do load balancing when your browser accesses the k8s service, then if this load balancing does not have a configuration similar to SessionAffinity = clientip, it will still frequently disconnect. Of course, other situations can also locate the problem according to this idea. As long as the client IP is switched, it may cause the session to expire.

Cookiery commented 1 month ago

Same here, I created a ingress and fe service has SessionAffinity = clientip. Still has the problems. @catpineapple

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    konghq.com/sess-affinity: 'true'
    konghq.com/sess-affinity-ttl: '3600'
  name: fe-ingress
  namespace: doris-2-1
  resourceVersion: '1048376613'
spec:
  ingressClassName: kong
  rules:
    - host: doris2-web.r2d2.narwal.com
      http:
        paths:
          - backend:
              service:
                name: doriscluster-fe-service
                port:
                  number: 8030
            path: /
            pathType: ImplementationSpecific
  tls:
    - hosts:
        - doris2-web.r2d2.narwal.com
      secretName: auto-https