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

启动后提示:redis.exceptions.ResponseError: wrong number of arguments for 'auth' command 怎么办啊 #4

Closed
qy-gopher opened this issue Feb 2, 2020 · 10 comments

Comments

@qy-gopher
Copy link

No description provided.

@staugur
Copy link
Member

staugur commented Feb 2, 2020

  1. 最好给出错误栈
  2. 查看下配置文件(或配置的环境变量),看下picbed_redis_url值,是否匹配redis服务密码

@qy-gopher
Copy link
Author

@staugur
Copy link
Member

staugur commented Feb 2, 2020

我得看下你的 配置文件

@qy-gopher
Copy link
Author

qy-gopher commented Feb 2, 2020

# -*- coding: utf-8 -*-
"""
    config
    ~~~~~~~

    The program configuration file, the preferred configuration item,
    reads the system environment variable first.

    :copyright: (c) 2019 by staugur.
    :license: BSD 3-Clause, see LICENSE for more details.
"""

from os import getenv

GLOBAL = {

    "ProcessName": "picbed",
    # 自定义进程名.

    "Host": getenv("picbed_host", "0.0.0.0"),
    # 监听地址

    "Port": int(getenv("picbed_port", 5050)),
    # 监听端口

    "LogLevel": getenv("picbed_loglevel", "DEBUG"),
    # 应用日志记录级别, 依次为 DEBUG, INFO, WARNING, ERROR, CRITICAL.

    "HookReloadTime": int(getenv("picbed_hookreloadtime", 600)),
    # 钩子管理器默认重载时间,单位:秒

    "SecretKey": getenv("picbed_secretkey"),
    # Web应用密钥,默认随机。如果设置,那么登录态cookie在重启应用后仍有效。
}


#: 存储上传图片的数据,使用redis单实例,请开启持久化!
REDIS = getenv("picbed_redis_url","redis://[]@127.0.0.1:6379/db")
# Redis数据库连接信息,格式:
# redis://[]@127.0.0.1:6379/db
# host,port必填项,如有密码,记得密码前加冒号


#: 存储一些非核心数据的相关设置
STORAGE = {

    "Method": getenv("picbed_storage_method", "redis"),
    #: 存储方法,目前支持: local, redis

    "LocalPath": getenv("picbed_storage_local_path"),
    #: 当存储方法为local时此值有效,格式: path
    #: -- path总是建议为绝对目录,默认为: SysTempDir/picbed.dat

    "RedisURL": getenv("picbed_storage_redis_url","redis://[]@127.0.0.1:6379/db") or REDIS,
    #: 当存储方法为redis时此值有效,格式参考REDIS
    #: -- 仅使用redis单库的一个hash,默认为: picbed:dat
}

@staugur
Copy link
Member

staugur commented Feb 2, 2020

嗯 redis配置是: REDIS = getenv("picbed_redis_url","redis://[]@127.0.0.1:6379/db") ?

@staugur
Copy link
Member

staugur commented Feb 2, 2020

这格式有问题

@qy-gopher
Copy link
Author

以前这样填的可以,,,我就是小白,照着配置文件上面的格式抄的,,,

@staugur
Copy link
Member

staugur commented Feb 2, 2020

。。。 你的redis没密码是吧, 那么设置改为 redis://@127.0.0.1:6379 试试

@qy-gopher
Copy link
Author

@qy-gopher
Copy link
Author

行了,谢谢,谢谢

@staugur staugur closed this as completed Feb 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants