console icon indicating copy to clipboard operation
console copied to clipboard

Login failed with 401 Unauthorized

Open lianchi opened this issue 5 years ago • 5 comments

Describe the bug I clone this repo and configure the backend by adding the file local_config.yaml under the folder server, our config_ip works fine. Then I execute yarn start command, the client and server compiled successfully, but I cannot login with the correct account/password(admin/P@88w0rd) in browser, and the output in terminal is as below:

{
  code: 401,
  statusText: 'Unauthorized',
  message: '401 Unauthorized\n'
}

Versions used(KubeSphere/Kubernetes) KubeSphere: v2.1.1 Kubernetes: v1.15.3

Environment 1 masters: 8cpu/32g 4 nodes: 8cpu/32g

Expected behavior Login successfully and redirect to Dashboard page.

lianchi avatar Jun 10 '20 06:06 lianchi

Please check the logs of ks pods(ks-console, ks-apigateway, ks-account) of kubesphere-system namespace.

leoendless avatar Jun 17 '20 07:06 leoendless

Please check the logs of ks pods(ks-console, ks-apigateway, ks-account) of kubesphere-system namespace.

This is my log information, but I still don't know why the error is?

ks-account log 2020-07-25 10:54:54: I0725 02:54:54.192925 1 im.go:448] auth failed admin LDAP Result Code 49 "Invalid Credentials": ks-apigateway log 2020-07-25 10:54:54: 10.233.70.21 25/Jul/2020:02:54:54 +0000 POST /kapis/iam.kubesphere.io/v1alpha2/login HTTP/1.1 401 63 4ms

konglingjiao0414 avatar Jul 25 '20 03:07 konglingjiao0414

请问解决了么?我也遇到同样得问题了?

kangkang721 avatar May 09 '21 04:05 kangkang721

当时这个问题,是因为前后端的版本不一致搞成的

------------------ 原始邮件 ------------------ 发件人: "kubesphere/console" @.>; 发送时间: 2021年5月9日(星期天) 中午12:47 @.>; @.@.>; 主题: Re: [kubesphere/console] Login failed with 401 Unauthorized (#403)

请问解决了么?我也遇到同样得问题了?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

konglingjiao0414 avatar May 10 '21 02:05 konglingjiao0414

前后端版本不一致导致的

------------------ 原始邮件 ------------------ 发件人: "kubesphere/console" @.>; 发送时间: 2021年5月9日(星期天) 中午12:47 @.>; @.@.>; 主题: Re: [kubesphere/console] Login failed with 401 Unauthorized (#403)

请问解决了么?我也遇到同样得问题了?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

konglingjiao0414 avatar Feb 10 '23 02:02 konglingjiao0414