Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS7.6部署v1.2.0使用ts-cli输入认证信息无反应且无法认证成功 #594

Closed
zealzhangz opened this issue May 13, 2024 · 8 comments · Fixed by openGemini/go-prompt#1
Assignees
Labels
bug Something isn't working

Comments

@zealzhangz
Copy link
Contributor

Describe the bug(Bug 描述)

使用社区二进制版本openGemini-1.2.0-linux-amd64在CentOS Linux release 7.6. 上部署成功后,使用自带的ts-cli工具集群认证,连接使用输入用户名无反应,多次输入回车命令行界面显示异常,退出ts-cli后发现Linux shell 回车也会显示异常,经测试目前使用v1.1.1正常。如下图:
image

社区其他群友反馈,,windows上使用正常,银河麒麟 4.19.90-52.22.v2207.ky10.x86_64使用和CentOS 7.6 异常信息一致,使用不正常,如下图:
image

To Reproduce(Bug 复现步骤)

  1. 使用二进制版本(openGemini-1.2.0-linux-amd64)部署
  2. 使用ts-cli连接集群
  3. 使用auth命令进行认证,回车再现问题

Expected behavior(期望结果)

使用ts-cli连接集群,auth命令进行认证正常,访问集群正常

Screenshots(屏幕截图)

image

Logs(完整的错误日志)

No response

Additional context(其他的一些补充内容)

No response

@zealzhangz zealzhangz added the bug Something isn't working label May 13, 2024
@xiangyu5632 xiangyu5632 self-assigned this May 13, 2024
xiangyu5632 pushed a commit to xiangyu5632/openGemini that referenced this issue Jul 27, 2024
@xiangyu5632
Copy link
Member

This issue is caused by go-prompt
Thanks to @xuthus5 for the demo program, which can reproduce the problem stably

package main

import (
	"fmt"
	"os"

	"github.com/c-bata/go-prompt"
	"golang.org/x/term"
)

func main() {
	var pr *prompt.Prompt
	pr = prompt.New(
		func(_ string) {
			fmt.Printf("username: ")
			var username string
			fmt.Scanf("%s\n", &username)
			if username == "exit" {
				os.Exit(0)
			}
			fmt.Printf("Enter your password: ")
			password, err := term.ReadPassword(int(os.Stdin.Fd()))
			if err != nil {
				panic(err)
			}
			fmt.Printf("username: %s, password: %s\n", username, password)
		},
		func(d prompt.Document) []prompt.Suggest {
			return nil
		},
	)
	pr.Run()
}

@StepY1aoZz
Copy link
Contributor

@xiangyu5632 Could you please assign this issue to me?

@xuthus5
Copy link
Member

xuthus5 commented Sep 2, 2024

Suggest fork c-bata/go-prompt to the openGemini org.

@shoothzj
Copy link
Member

shoothzj commented Sep 3, 2024

@StepY1aoZz I have assigned this issue to you, have fun

@shoothzj
Copy link
Member

shoothzj commented Sep 3, 2024

@xuthus5 Could you please seek for any alternatives?

@StepY1aoZz
Copy link
Contributor

I have made some changes in the go-prompt repo and now the behavior of auth looks good in my terminal (zsh+Konsole). Maybe someone else could try this to see whether the fix is really working in different environment? Please see #1 for detailed info.

@xuthus5
Copy link
Member

xuthus5 commented Sep 5, 2024

Can you verify it in the bash environment? This is most of the scene.

@StepY1aoZz
Copy link
Contributor

Can you verify it in the bash environment? This is most of the scene.

Also looks good in bash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants