GVKun编程网logo

Redis 报错 : (error) NOAUTH Authentication required.(redis 报错)

16

如果您对Redis报错:(error)NOAUTHAuthenticationrequired.和redis报错感兴趣,那么这篇文章一定是您不可错过的。我们将详细讲解Redis报错:(error)NO

如果您对Redis 报错 : (error) NOAUTH Authentication required.redis 报错感兴趣,那么这篇文章一定是您不可错过的。我们将详细讲解Redis 报错 : (error) NOAUTH Authentication required.的各种细节,并对redis 报错进行深入的分析,此外还有关于407 Proxy Authentication Required、An application is attempting to perform an action that requires privileges. Authentication is requir、Android Studio 配置 svn 时提示需要证书:authentication required 的解决方法、asp.net – 如何在不使用FormsAuthentication.RedirectFromLoginPage时将Request.IsAuthenticated设置为true?的实用技巧。

本文目录一览:

Redis 报错 : (error) NOAUTH Authentication required.(redis 报错)

Redis 报错 : (error) NOAUTH Authentication required.(redis 报错)

原文: Redis 报错 : (error) NOAUTH Authentication required.

这个错误是因为没有用密码登陆认证,先输入密码试试 .

127.0.0.1:6379> auth "yourpassword"

例如密码是‘root’, 当出现认证问题时候,输入 “auth ‘root’” 就可以了.

127.0.0.1:6379> set name "hello"
(error) NOAUTH Authentication required.
127.0.0.1:6379> (error) NOAUTH Authentication required.
(error) ERR unknown command ''(error)''
127.0.0.1:6379> auth "root"

如果输入密码后出现以下提示:

(error) ERR invalid password

那么就是你的密码输入错误,如果你忘记密码了,那么这样做来查看自己的密码 :

  1. 进入 redis 的安装目录(是安装目录的),查看 redis.config 文件
    我的是windows下的redis:
  2. 用记事本打开,找到 “requirepass foobared”, 就能找到你的密码了.
    比如我的密码是这样的: requirepass 123456 也就是 123456
    密码

  3. 接着 cmd 重新进入 redis 的安装目录 :
    (1) redis-server.exe redis.windows.conf 打开服务器
    (2) 在另一个窗口重新进入该目录,输入 redis-cli.exe 打开客户端.
    (3) 在客户端 中 输入 auth “123456” 就可以进去了 (你输入的是你查到的密码) .
    比如 (3), 我的是这样的:

C:\Program Files\redis64-2.8.2101>redis-cli.exe
127.0.0.1:6379> auth "123456"
OK


补充:报错
MISCONF Redis is configured to save RDB snapshots
具体如下:

(error) MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error.
127.0.0.1:6379> config set stop-writes-on-bgsave-error no

翻译:(错误)misconf redis 被配置以保存数据库快照,但 misconf redis 目前不能在硬盘上持久化。用来修改数据集合的命令不能用,请使用日志的错误详细信息。

解决办法:
运行 config set stop-writes-on-bgsave-error no 命令关闭配置项 stop-writes-on-bgsave-error 解决该问题。
如下:

127.0.0.1:6379> config set stop-writes-on-bgsave-error no
OK
127.0.0.1:6379> set a 110
OK
127.0.0.1:6379> get a
"110"

407 Proxy Authentication Required

407 Proxy Authentication Required

The only way I''m currently aware of for disabling proxies entirely is the following:

  • Create a session
  • Set session.trust_env to False
  • Create your request using that session
import requests

session = requests.Session()
session.trust_env = False
url = "xxxxx"
response = session.get(url)

If however you only want to disable proxies for a particular domain (like localhost), you can use the NO_PROXY environment variable:

import os
import requests

os.environ[''NO_PROXY''] = ''qq.com''

response = requests.get(''http://www.qq.com'')

An application is attempting to perform an action that requires privileges. Authentication is requir

An application is attempting to perform an action that requires privileges. Authentication is requir

An application is attempting to perform an action that requires privileges. Authentication is required to perform this action.
resolve  :   sudo command...

Android Studio 配置 svn 时提示需要证书:authentication required 的解决方法

Android Studio 配置 svn 时提示需要证书:authentication required 的解决方法

http://blog.csdn.net/wblyuyang/article/details/50721367

asp.net – 如何在不使用FormsAuthentication.RedirectFromLoginPage时将Request.IsAuthenticated设置为true?

asp.net – 如何在不使用FormsAuthentication.RedirectFromLoginPage时将Request.IsAuthenticated设置为true?

我使用表单身份验证,并向服务器发送Aajx请求进行身份验证。基于json结果,客户端决定去哪里和做什么。这是我不使用FormsAuthentication.RedirectFromLoginPage不干扰ajax / json响应的原因。

在这种情况下,即使在使用Membership.ValidateUser验证用户后,Request.IsAuthenticated也返回false。然后我设置cookie使用

FormsAuthentication.SetAuthCookie(username,false);

虽然第二个参数,持久cookie,是false,cookie仍然有效跨浏览器会话。

任何想法如何使Request.IsAuthenticated工作,而不使用FormsAuthentication.RedirectFromLoginPage?

解决方法

您需要更新请求的当前安全主体。当您调用Response。重定向(…)一个新的请求完成,安全主体被重新初始化,并且Request.IsAuthenticated在你的case返回true。 FormsAuthentication.RedirectFromLoginPage内部调用响应。重定向(…)。您可以手动更新当前请求的安全主体,如下所示:
public void RenewCurrentUser()
{
    System.Web.HttpCookie authCookie =
        System.Web.HttpContext.Current.Request.Cookies[FormsAuthentication.FormsCookieName];
    if (authCookie != null)
    {
        FormsAuthenticationTicket authTicket = null;
        authTicket = FormsAuthentication.Decrypt(authCookie.Value);

        if (authTicket != null && !authTicket.Expired)
        {
            FormsAuthenticationTicket newAuthTicket = authTicket;

            if (FormsAuthentication.SlidingExpiration)
            {
                newAuthTicket = FormsAuthentication.RenewTicketIfOld(authTicket);
            }
            string userData = newAuthTicket.UserData;
            string[] roles = userData.Split(',');

            System.Web.HttpContext.Current.User =
                new System.Security.Principal.GenericPrincipal(new FormsIdentity(newAuthTicket),roles);
        }
    }
}

今天关于Redis 报错 : (error) NOAUTH Authentication required.redis 报错的分享就到这里,希望大家有所收获,若想了解更多关于407 Proxy Authentication Required、An application is attempting to perform an action that requires privileges. Authentication is requir、Android Studio 配置 svn 时提示需要证书:authentication required 的解决方法、asp.net – 如何在不使用FormsAuthentication.RedirectFromLoginPage时将Request.IsAuthenticated设置为true?等相关知识,可以在本站进行查询。

本文标签: