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

单例部署报 ERR NOAUTH Authentication required #2043

Closed
zhangshf opened this issue Sep 26, 2023 · 7 comments
Closed

单例部署报 ERR NOAUTH Authentication required #2043

zhangshf opened this issue Sep 26, 2023 · 7 comments
Assignees
Labels

Comments

@zhangshf
Copy link

pika 3.5.0 k8s部署

requirepass:123456
masterauth:123456
userpass:123456

spring-data-redis 2.7.7
lettuce-core 6.1.10.RELEASE
配置了密码验证:spring.redis.password=123456
程序启动的时候报错:ERR NOAUTH Authentication required

用Another Redis Desktop Manager连接没有问题。
考虑安全性,密码必须设置。请问怎么设置才能让程序连上pika?

@Mixficsol
Copy link
Collaborator

pika 3.5.0 k8s部署

requirepass:123456 masterauth:123456 userpass:123456

spring-data-redis 2.7.7 lettuce-core 6.1.10.RELEASE 配置了密码验证:spring.redis.password=123456 程序启动的时候报错:ERR NOAUTH Authentication required

用Another Redis Desktop Manager连接没有问题。 考虑安全性,密码必须设置。请问怎么设置才能让程序连上pika?

可以问下你的部署方式是怎么样的吗

@Mixficsol
Copy link
Collaborator

Mixficsol commented Sep 27, 2023

环境准备

  1. 启动 Docker

    open -a Docker
    

    这里我配置的规格是 8 核 CPU,16G 内存

  2. 下载 KIND

    brew install kind
    
  3. 创建一个 KIND 集群

    kind create cluster
    
  4. 下载 kbcli

    curl -fsSL https://kubeblocks.io/installer/install_cli.sh | bash
    
  5. 下载l kubeblock

    kbcli kubeblocks install --version 0.5.3 -v1
    
  6. 检查 Kubublocks 状态

    kbcli kubeblocks status
    
截屏2023-09-27 10 54 30
  1. 进入 kubeblocks_helm 目录

    cd pika/tools/kubeblocks_helm
    
  2. 下载 Pika

    helm install pika ./pika
    
  3. 下载 Pika-cluster

    helm install pika-cluster ./pika-cluster
    
  4. 查看集群启动状态

    kubectl get pods --all-namespaces -o wide
    
截屏2023-09-27 10 55 26
  1. 访问 codis-fe,转发暴露 codis-fe 到 8080 端口

    kubectl port-forward svc/pika-cluster-codis-fe 8080
    

    截屏2023-08-21 14.57.29.png

  2. 连接到 proxy 访问 pika-cluster

    kubectl port-forward svc/pika-cluster-codis-proxy 19000
    

    截屏2023-08-21 15.00.14.png

  3. 连接 codis

    redis-cli -p 19000
    

    截屏2023-08-21 15.01.33.png

@Mixficsol
Copy link
Collaborator

pika 3.5.0 k8s部署

requirepass:123456 masterauth:123456 userpass:123456

spring-data-redis 2.7.7 lettuce-core 6.1.10.RELEASE 配置了密码验证:spring.redis.password=123456 程序启动的时候报错:ERR NOAUTH Authentication required

用Another Redis Desktop Manager连接没有问题。 考虑安全性,密码必须设置。请问怎么设置才能让程序连上pika?

如果您对 K8s 熟悉的话,欢迎一起看下 #2045 这个问题呀

@zhangshf
Copy link
Author

zhangshf commented Oct 7, 2023

pika 3.5.0 k8s部署
requirepass:123456 masterauth:123456 userpass:123456
spring-data-redis 2.7.7 lettuce-core 6.1.10.RELEASE 配置了密码验证:spring.redis.password=123456 程序启动的时候报错:ERR NOAUTH Authentication required
用Another Redis Desktop Manager连接没有问题。 考虑安全性,密码必须设置。请问怎么设置才能让程序连上pika?

可以问下你的部署方式是怎么样的吗

Helm单容器部署,字典挂载config文件
image
配置文件中设置密码:
image
deployment文件:
image
容器内:
image

@machinly machinly self-assigned this Oct 27, 2023
@machinly machinly added the k8s label Oct 27, 2023
@machinly
Copy link
Collaborator

machinly commented Dec 1, 2023

请问链接本地的 pika 实例可以正常工作吗?

@machinly
Copy link
Collaborator

machinly commented Dec 1, 2023

可以参考这个例子
https://github.com/machinly/spring-lettuce-pika

@machinly
Copy link
Collaborator

machinly commented Dec 7, 2023

可以参考这个例子 https://github.com/machinly/spring-lettuce-pika

我测试是可以正常运行的,具体可以参考这个例子,所以这个issue我先关闭了,如果有任何新的问题,请随时再打开

@machinly machinly closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants