聚合Aggregate问题

发布问题 回首页

聚合Aggregate问题

★ 1 1 person favorited this question

聚合统计时报了这么一个错:
[Wed Mar 25 2015 10:55:56 GMT+0800 (CST)] SW.MTC_CDMA_1X_SW_201503 ag Star exec…
assert: command failed: {
“errmsg” : “exception: socket exception [SEND_ERROR] for 132.121.91.169:27017″,
“code” : 9001,
“ok” : 0,
“$gleStats” : {
“lastOpTime” : Timestamp(1427252158, 2),
“electionId” : ObjectId(“550f7cedddeb6e93783893fe”)
}
} : aggregate failed
Error: command failed: {
“errmsg” : “exception: socket exception [SEND_ERROR] for 132.121.91.169:27017″,
“code” : 9001,
“ok” : 0,
“$gleStats” : {
“lastOpTime” : Timestamp(1427252158, 2),
“electionId” : ObjectId(“550f7cedddeb6e93783893fe”)
}
} : aggregate failed
at Error ()
at doassert (src/mongo/shell/assert.js:11:14)
at Function.assert.commandWorked (src/mongo/shell/assert.js:244:5)
at DBCollection.aggregate (src/mongo/shell/collection.js:1149:12)
at ag_kb.js:56:7
2015-03-25T10:55:56.881+0800 Error: command failed: {
“errmsg” : “exception: socket exception [SEND_ERROR] for 132.121.91.169:27017″,
“code” : 9001,
“ok” : 0,
“$gleStats” : {
“lastOpTime” : Timestamp(1427252158, 2),
“electionId” : ObjectId(“550f7cedddeb6e93783893fe”)
}
} : aggregate failed at src/mongo/shell/assert.js:13
failed to load: ag_kb.js
求大神指导下,是那些方面出问题了?js大部分代码如下:
var tablename = ‘MTC_CDMA_1X_’+dbn+’_’+act;
var table = db.getCollection(tablename);
var outc = ‘CDMA_1X_’+dbn+’_’+act+’_agkb’;

table.aggregate([{$match:{"I":{$gte:kaishi,$lt:jieshu}}},
{$match:{"Y131":{$exists:true}}},
{$project:{"Y64":1,"Y7":1,"Y1":1,"Y61.M0":1,"Y32":1,"Y99":1,"Y256":1,"Y131":1,"Y201":1,"Y311":1,"Y71":1,"Y502":1,"Y92":1,"Y93":1,"Y109":1,"Y117":1,"Y529":1}},
{$group:{_id:{sdate:"$Y64",szone:"$Y7",uid:"$Y1",phone:"$Y61.M0",utype:"$Y32",ptype:"$Y99",sid:"$Y256",pid:"$Y131",did:"$Y201",pjx:"$Y311",dtype:"$Y71",rtype:"$Y502"},uv:{$sum:"$Y92"},dv:{$sum:"$Y93"},tv:{$sum:"$Y109"},tt:{$sum:"$Y117"},tf:{$sum:"$Y529"}}},
{$out:outc}],
{"allowDiskUse":true},
{cursor:{batchSize:0}})

eshujiushiwo 在大约 之前 回答了
  • 提问于
  • Answers2 个
  • 浏览 810 次
  • 最新活跃于

2 个回答2

0
eshujiushiwo answered about

HI
这段日志log:“errmsg” : “exception: socket exception [SEND_ERROR] for 132.121.91.169:27017″,
看起来像无法正常连接至该机器,请看看 该机器当时是否正常。
如果进程或者,建议检查看看该机器当时的connection 数目和open files之类的ulimit 系统参数。
这个会百分百复现么?

0
贝贝 answered about

看起来 132.121.91.169:27017 这个机器挂了.

xiaocainiao 在大约 之前评论了回答
1 Comment
To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create