Error creating index WriteConcern detected an error 'not master'
2016-04-26 16:09
239 查看
Error creating index
WriteConcern detected an error 'not master'. (Response was { "lastOp" : { "$timestamp" : NumberLong(0) }, "connectionId" : 2152576, "err" : "not master", "code" : 8, "n" : 0, "ok" : 1.0 }).
Type: MongoDB.Driver.WriteConcernException
Stack: 在 MongoDB.Driver.Operations.InsertOperation.Execute(MongoConnection connection)
在 MongoDB.Driver.MongoCollection.InsertBatch(Type nominalType, IEnumerable documents, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection.Insert[TNominalType](TNominalType document, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection`1.Insert(TDefaultDocument document, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection.CreateIndex(IMongoIndexKeys keys, IMongoIndexOptions options)
在 MangoUI.MIndexes.Create(String db, String col, String name, BsonDocument fields, Boolean unique, Boolean dropDups, Boolean background)
在 MangoUI.WinIndexNew.btnCreate_Click(Object sender, EventArgs e)
Inputs::
results: System.Collections.Generic.List`1[MongoDB.Driver.WriteConcernResult]
Command: getlasterror
Ok: True
ErrorMsg:
Request: { "getlasterror" : 1, "w" : 1 }
Response: { "lastOp" : { "$timestamp" : NumberLong(0) }, "connectionId" : 2152576, "err" : "not master", "code" : 8, "n" : 0, "ok" : 1.0 }
解释
当前mongodb不是master,索引只能在master上建。
WriteConcern detected an error 'not master'. (Response was { "lastOp" : { "$timestamp" : NumberLong(0) }, "connectionId" : 2152576, "err" : "not master", "code" : 8, "n" : 0, "ok" : 1.0 }).
Type: MongoDB.Driver.WriteConcernException
Stack: 在 MongoDB.Driver.Operations.InsertOperation.Execute(MongoConnection connection)
在 MongoDB.Driver.MongoCollection.InsertBatch(Type nominalType, IEnumerable documents, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection.Insert(Type nominalType, Object document, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection.Insert[TNominalType](TNominalType document, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection`1.Insert(TDefaultDocument document, MongoInsertOptions options)
在 MongoDB.Driver.MongoCollection.CreateIndex(IMongoIndexKeys keys, IMongoIndexOptions options)
在 MangoUI.MIndexes.Create(String db, String col, String name, BsonDocument fields, Boolean unique, Boolean dropDups, Boolean background)
在 MangoUI.WinIndexNew.btnCreate_Click(Object sender, EventArgs e)
Inputs::
results: System.Collections.Generic.List`1[MongoDB.Driver.WriteConcernResult]
Command: getlasterror
Ok: True
ErrorMsg:
Request: { "getlasterror" : 1, "w" : 1 }
Response: { "lastOp" : { "$timestamp" : NumberLong(0) }, "connectionId" : 2152576, "err" : "not master", "code" : 8, "n" : 0, "ok" : 1.0 }
解释
当前mongodb不是master,索引只能在master上建。
相关文章推荐
- c++对内存的浅谈以及内存泄漏问题的探讨之八
- 2016年中国虚拟现实(VR)行业研究报告
- ASP.net 实现禁止用户重复登录
- js修改浏览器url
- C#中 Thread.Sleep精度问题
- 关于ShapeDrawable应用的一些介绍(下)
- Bootstrap每天必学之模态框(Modal)插件
- iOS7 imageWithContentsOfFile 加载不出图片
- QuartzCore画图框架粗浅使用
- spring注解方式实现DI和IOC
- windows系统上安装与使用Android NDK r5(转)
- c++对内存的浅谈以及内存泄漏问题的探讨之七
- 一个聊天小程序
- C语言中内存对齐详解
- 虚幻4 动画系统概述
- 邮箱和手机电话的正则表达式
- Spring AOP 常用的四种实现方式
- nginx+nginx-rtmp-module+ffmpeg搭建流媒体服务器
- eclipse.ini 优化
- linux启动级别