Blog

Blog

PHODAL

Node Redis:not able to persist on disk

在服务器上为http://mqtt.phodal.com部署Node Redis的时候发现一会就挂 了,报了下面的错误:

node_redis: no callback to send error: 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.

/home/www/diaonan/node_modules/redis/index.js:511
        throw err;
              ^
Error: 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.

后面一查看到是没有配置redis数据库文件的路径

打开

redis-cli

输入

127.0.0.1:6379> CONFIG SET dir /tmp/var/dredis
OK
127.0.0.1:6379> CONFIG SET dbfilename temp.rdb
OK
127.0.0.1:6379>exit

接着我们就可以继续使用

Node root does not have permission

接着又报了个钷

 Warning "root" does not have permission to access the dev dir

需要添加参数--unsafe-perm

sudo npm install --unsafe-perm

关于我

Github: @phodal     微博:@phodal     知乎:@phodal    

微信公众号(Phodal)

围观我的Github Idea墙, 也许,你会遇到心仪的项目

QQ技术交流群: 321689806
comment

Feeds

RSS / Atom

最近文章

关于作者

Phodal Huang

Engineer, Consultant, Writer, Designer

ThoughtWorks 技术专家

工程师 / 咨询师 / 作家 / 设计学徒

开源深度爱好者

出版有《前端架构:从入门到微前端》、《自己动手设计物联网》、《全栈应用开发:精益实践》

联系我: h@phodal.com

微信公众号: 最新技术分享

标签