not authorized on egg_cnode to execute command { listIndexes: "topics", cursor: {} }
发布于 2 个月前 作者 vipzrx 377 次浏览 来自 问答

使用egg-cnode 在本地搭建 报错

kk@V1:~/src$ ls
app           bin                     docker-compose.yml  LICENSE       package.json       run
app.js        config                  Dockerfile          logs          package-lock.json  test
appveyor.yml  docker-compose.dev.yml  init.d              node_modules  README.md          tutorials

npm i

kk@V1:~/src$ npm i
npm WARN [email protected] requires a peer of ajv@^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of mocha@>=1.18 <6 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

up to date in 16.837s

npm run dev

kk@V1:~/src$ npm run dev

> [email protected] dev /home/kk/src
> egg-bin dev

2018-06-29 16:22:02,725 INFO 3037 [master] node version v8.11.3
2018-06-29 16:22:02,727 INFO 3037 [master] egg version 2.9.1
2018-06-29 16:22:03,499 INFO 3037 [master] agent_worker#1:3043 started (768ms)
2018-06-29 16:22:05,189 INFO 3037 [master] egg started on http://127.0.0.1:7001 (2462ms)
2018-06-29 16:22:05,236 ERROR 3053 nodejs.MongoError: not authorized on egg_cnode to execute command { listIndexes: "topics", cursor: {} }
    at Function.MongoError.create (/home/kk/src/node_modules/mongodb-core/lib/error.js:31:11)
    at queryCallback (/home/kk/src/node_modules/mongodb-core/lib/cursor.js:212:36)
    at /home/kk/src/node_modules/mongodb-core/lib/connection/pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

name: 'MongoError'
message: 'not authorized on egg_cnode to execute command { listIndexes: "topics", cursor: {} }'
ok: 0
errmsg: 'not authorized on egg_cnode to execute command { listIndexes: "topics", cursor: {} }'
code: 13
pid: 3053
hostname: V1

2018-06-29 16:22:05,241 ERROR 3053 nodejs.MongoError: not authorized on egg_cnode to execute command { listIndexes: "replies", cursor: {} }
    at Function.MongoError.create (/home/kk/src/node_modules/mongodb-core/lib/error.js:31:11)
    at queryCallback (/home/kk/src/node_modules/mongodb-core/lib/cursor.js:212:36)
    at /home/kk/src/node_modules/mongodb-core/lib/connection/pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

name: 'MongoError'
message: 'not authorized on egg_cnode to execute command { listIndexes: "replies", cursor: {} }'
ok: 0
errmsg: 'not authorized on egg_cnode to execute command { listIndexes: "replies", cursor: {} }'
code: 13
pid: 3053
hostname: V1

2018-06-29 16:22:05,245 ERROR 3053 nodejs.MongoError: not authorized on egg_cnode to execute command { listIndexes: "topiccollects", cursor: {} }
    at Function.MongoError.create (/home/kk/src/node_modules/mongodb-core/lib/error.js:31:11)
    at queryCallback (/home/kk/src/node_modules/mongodb-core/lib/cursor.js:212:36)
    at /home/kk/src/node_modules/mongodb-core/lib/connection/pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

name: 'MongoError'
message: 'not authorized on egg_cnode to execute command { listIndexes: "topiccollects", cursor: {} }'
ok: 0
errmsg: 'not authorized on egg_cnode to execute command { listIndexes: "topiccollects", cursor: {} }'
code: 13
pid: 3053
hostname: V1

2018-06-29 16:22:05,248 ERROR 3053 nodejs.MongoError: not authorized on egg_cnode to execute command { listIndexes: "messages", cursor: {} }
    at Function.MongoError.create (/home/kk/src/node_modules/mongodb-core/lib/error.js:31:11)
    at queryCallback (/home/kk/src/node_modules/mongodb-core/lib/cursor.js:212:36)
    at /home/kk/src/node_modules/mongodb-core/lib/connection/pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

name: 'MongoError'
message: 'not authorized on egg_cnode to execute command { listIndexes: "messages", cursor: {} }'
ok: 0
errmsg: 'not authorized on egg_cnode to execute command { listIndexes: "messages", cursor: {} }'
code: 13
pid: 3053
hostname: V1

2018-06-29 16:22:05,249 ERROR 3053 nodejs.MongoError: not authorized on egg_cnode to execute command { listIndexes: "users", cursor: {} }
    at Function.MongoError.create (/home/kk/src/node_modules/mongodb-core/lib/error.js:31:11)
    at queryCallback (/home/kk/src/node_modules/mongodb-core/lib/cursor.js:212:36)
    at /home/kk/src/node_modules/mongodb-core/lib/connection/pool.js:469:18
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

name: 'MongoError'
message: 'not authorized on egg_cnode to execute command { listIndexes: "users", cursor: {} }'
ok: 0
errmsg: 'not authorized on egg_cnode to execute command { listIndexes: "users", cursor: {} }'
code: 13
pid: 3053
hostname: V1


回到顶部