我有一台运行mongo的ec2机器。当我尝试从另一台ec2机器连接时,我遇到了以下错误
PublishSubject<Object> timeout = PublishSubject.create();
Observable.from(sources).concatMapDelayError(v -> v.onErrorResumeNext(e -> {
if (e instanceof TimeoutException) {
timeout.onError(e);
return Observable.empty();
}
return Observable.error(e);
}))
.takeUntil(timeout)
.subscribe(...);
我的sails db有以下用户:
MongoError: not authorized on sails to execute command { listIndexes: "sessions", cursor: {} }
at Function.MongoError.create (/home/ec2-user/backstage/node_modules/connect-mongo/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/ec2-user/backstage/node_modules/connect-mongo/node_modules/mongodb-core/lib/cursor.js:281:36)
at Callbacks.emit (/home/ec2-user/backstage/node_modules/connect-mongo/node_modules/mongodb-core/lib/topologies/server.js:95:3)
at Connection.messageHandler (/home/ec2-user/backstage/node_modules/connect-mongo/node_modules/mongodb-core/lib/topologies/server.js:249:23)
at Socket.<anonymous> (/home/ec2-user/backstage/node_modules/connect-mongo/node_modules/mongodb-core/lib/connection/connection.js:265:22)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at TCP.onread (net.js:547:20)