• Redis服务器开启远程访问



    Traceback (most recent call last): File
    "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/twisted/internet/defer.py", line 1418, in _inlineCallbacks result = g.send(result) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/scrapy/crawler.py", line 82, in crawl yield self.engine.open_spider(self.spider, start_requests) redis.exceptions.ResponseError: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.

    远程连接,本来想把配置文件:

    bind:127.0.0.1 改成 bind:0.0.0.0就可以了

    结果发现不行,无法进行远程连接,报了上面的错误,百度翻译了一下发现,说有保护,然后把电脑的防火墙关闭了,还是不行,最后发现是配置文件里面还有一个保护

    然后重启一下redis就可以了

  • 相关阅读:
    NOIP2010 关押罪犯
    NOIP2010 乌龟棋
    static属性
    数组的拷贝
    数组在类中的声明与创建
    两个数组之间的引用
    java数组实现买彩票(二个一维数组的比较思想)
    java数组实现买彩票(通过标识符进行判断的思想)
    java数组实现买彩票(重复则重新遍历查询思想)
    java数组实现买彩票(平移覆盖思想)
  • 原文地址:https://www.cnblogs.com/liangliangzz/p/10209396.html
Copyright © 2020-2023  润新知