zsxsoft/danmu-server

封禁用户查询失败

Closed this issue · 7 comments

Dear zsx,

我今天测试的时候剩下最后2条弹幕(分别是:aha和newdanmu,看起来比较正常的内容)要推送时,发现服务器报错,并停止推送弹幕了,以下是我这边的报错信息,需要我提供其他信息的话请尽管说哈:

[2015-9-4 19:16:24.64] 推送1条弹幕到default,剩余3条。
[2015-9-4 19:16:29.67] 推送1条弹幕到default,剩余2条。
[2015-9-4 19:16:31.828] 封禁用户查询失败
[Error: Timed out while trying to establish connection]
[2015-9-4 19:16:31.829] 自动封号检测7e54601d0d8201046f1c311b45a2f6f0次数为undefined
/var/www/tom/tom_danmu1/node_modules/memcached/lib/utils.js:152
return value.replace(/(\r|\n)/g, '$1');
^
TypeError: Cannot read property 'replace' of undefined
at Object.exports.escapeValue (/var/www/tom/tom_danmu1/node_modules/memcached/lib/utils.js:152:15)
at Client.setters (/var/www/tom/tom_danmu1/node_modules/memcached/lib/memcached.js:919:19)
at Client.bowlofcurry as set
at Client. (/var/www/tom/tom_danmu1/lib/ext/ext/autoban/index.js:33:12)
at Client.memcached.makeCallback (/var/www/tom/tom_danmu1/node_modules/memcached/lib/memcached.js:695:11)
at allocateMemcachedConnection (/var/www/tom/tom_danmu1/node_modules/memcached/lib/memcached.js:332:44)
at allocate (/var/www/tom/tom_danmu1/node_modules/memcached/node_modules/jackpot/index.js:125:5)
at Socket.timeout (/var/www/tom/tom_danmu1/node_modules/memcached/node_modules/jackpot/index.js:177:5)
at Socket.emit (events.js:129:20)
at Socket._onTimeout (net.js:348:8)

npm ERR! Linux 3.2.0-29-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! danmu-server@0.0.1 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the danmu-server@0.0.1 start script 'node app.js'.
npm ERR! This is most likely a problem with the danmu-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls danmu-server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/tom/tom_danmu1/npm-debug.log

你这里很明显memcached的连接断了之类的,检查下memcached出了什么问题。
对应地,我回去也会加个容错机制。
2015年9月4日 19:24于 phperwuhan notifications@github.com写道:Dear zsx,

我今天测试的时候剩下最后2条弹幕(分别是:aha和newdanmu,看起来比较正常的内容)要推送时,发现服务器报错,并停止推送弹幕了,以下是我这边的报错信息:

[2015-9-4 19:16:24.64] 推送1条弹幕到default,剩余3条。
[2015-9-4 19:16:29.67] 推送1条弹幕到default,剩余2条。
[2015-9-4 19:16:31.828] 封禁用户查询失败
[Error: Timed out while trying to establish connection]
[2015-9-4 19:16:31.829] 自动封号检测7e54601d0d8201046f1c311b45a2f6f0次数为undefined
/var/www/tom/tom_danmu1/node_modules/memcached/lib/utils.js:152
return value.replace(/(\r|\n)/g, '$1');
^
TypeError: Cannot read property 'replace' of undefined
at Object.exports.escapeValue (/var/www/tom/tom_danmu1/node_modules/memcached/lib/utils.js:152:15)
at Client.setters (/var/www/tom/tom_danmu1/node_modules/memcached/lib/memcached.js:919:19)
at Client.bowlofcurry as set
at Client. (/var/www/tom/tom_danmu1/lib/ext/ext/autoban/index.js:33:12)
at Client.memcached.makeCallback (/var/www/tom/tom_danmu1/node_modules/memcached/lib/memcached.js:695:11)
at allocateMemcachedConnection (/var/www/tom/tom_danmu1/node_modules/memcached/lib/memcached.js:332:44)
at allocate (/var/www/tom/tom_danmu1/node_modules/memcached/node_modules/jackpot/index.js:125:5)
at Socket.timeout (/var/www/tom/tom_danmu1/node_modules/memcached/node_modules/jackpot/index.js:177:5)
at Socket.emit (events.js:129:20)
at Socket._onTimeout (net.js:348:8)

npm ERR! Linux 3.2.0-29-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! danmu-server@0.0.1 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the danmu-server@0.0.1 start script 'node app.js'.
npm ERR! This is most likely a problem with the danmu-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls danmu-server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/tom/tom_danmu1/npm-debug.log

—Reply to this email directly or view it on GitHub.

我把配置改为了:

"cache": {
    "type": "none", // 缓存类型,支持memcached和aliyun。后者需要npm install aliyun-sdk
    "host" : "", // 缓存服务器地址,可用socket
    "auth": false, // 是否打开身份验证
    "authUser": "", // 身份验证账号
    "authPassword": "" // 身份验证密码
},

现在我一次发多个接口调用并且其中包含禁词内容(例如:蛤蟆镜困了啊)时报这个错误信息:
TypeError: Cannot read property 'get' of null
at /var/www/tom/tom_danmu1/lib/ext/ext/autoban/index.js:14:9
at process._tickCallback (node.js:355:11)

npm ERR! Linux 3.2.0-29-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! danmu-server@0.0.1 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the danmu-server@0.0.1 start script 'node app.js'.
npm ERR! This is most likely a problem with the danmu-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls danmu-server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/tom/tom_danmu1/npm-debug.log

按照readme里写的,关闭缓存后应同时关闭autoban功能,这一点我回去也要修改一下
2015年9月6日 11:29于 phperwuhan notifications@github.com写道:我把配置改为了:

"cache": {
"type": "none", // 缓存类型,支持memcached和aliyun。后者需要npm install aliyun-sdk
"host" : "", // 缓存服务器地址,可用socket
"auth": false, // 是否打开身份验证
"authUser": "", // 身份验证账号
"authPassword": "" // 身份验证密码
},

现在我一次发多个接口调用并且其中包含禁词内容(例如:蛤蟆镜困了啊)时报这个错误信息:
TypeError: Cannot read property 'get' of null
at /var/www/tom/tom_danmu1/lib/ext/ext/autoban/index.js:14:9
at process._tickCallback (node.js:355:11)

npm ERR! Linux 3.2.0-29-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! danmu-server@0.0.1 start: node app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the danmu-server@0.0.1 start script 'node app.js'.
npm ERR! This is most likely a problem with the danmu-server package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node app.js
npm ERR! You can get their info via:
npm ERR! npm owner ls danmu-server
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /var/www/tom/tom_danmu1/npm-debug.log

—Reply to this email directly or view it on GitHub.

关闭缓存后应同时关闭autoban功能?
但我在你的readme里面没有看到相关信息啊?是不是需要查看和修改服务端的config?

注意事项里,是的
2015年9月6日 21:55于 phperwuhan notifications@github.com写道:关闭缓存后应同时关闭autoban功能?
但我在你的readme里面没有看到相关信息啊?是不是需要查看和修改服务端的config?

—Reply to this email directly or view it on GitHub.

目前server端的memcache主要是用于缓存什么信息的啊?如果我把memcache和autoban都去掉了,会有什么性能或功能损失吗?

不会
2015年9月7日 10:34于 phperwuhan notifications@github.com写道:目前server端的memcache主要是用于缓存什么信息的啊?如果我把memcache和autoban都去掉了,会有什么性能或功能损失吗?

—Reply to this email directly or view it on GitHub.