alibaba / macaca

Automation solution for multi-platform. 多端自动化解决方案
https://macacajs.github.io
MIT License
3.17k stars 418 forks source link

reliable-master can't adduser #469

Closed whitiancai closed 7 years ago

whitiancai commented 7 years ago

@CodeToSurvive1 我按照 https://testerhome.com/topics/6318 实现,成功启动了reliable-master

$ make server ./bin/reliable-master server -p 3333 -w 1 --verbose

index.js:44:14 [master] pid:7324 worker fork success index.js:62:14 [master] pid:7324 worker online index.js:23:10 [worker:1] pid:10712 workder init with config: { server: { worker: '1', port: '3333', protocol: 'http', verbose: true }, database: 'mongodb://localhost/reliable', site: { title: 'Reliable', baseurl: 'http://reliable-test.com', locale: 'en-US', docurl: 'reliablejs.github.io', issueurl: 'https://github.com/alibaba/reliable/issues', login: true }, auth: { github: { client_id: '8bb3d4f7fa7d3d346a58', client_secret: '416bdc362cefb378587aa75c1db9bdd4c84a3461' }, gitlab: { protocol: 'http', server_url: '127.0.0.1:3000', client_id: '8bb3d4f7fa7d3d346a58', client_secret: '416bdc362cefb378587aa75c1db9bdd4c84a3461' } }, mail: { name: 'reliable test', port: 465, host: 'smtp.reliable-test.com', secure: true, ignoreTLS: true, auth: { user: 'test@reliable-test.com', pass: 'reliable' }, sloganImage: 'https://avatars0.githubusercontent.com/u/9263042?v=3&s=200' }, plugins: {}, pluginTextPrefix: 'reliable-plugin', pkg: { name: 'reliable-master', version: '2.0.0', description: 'Distributed reliable continuous integration service.', keywords: [ 'ci', 'automation', [length]: 2 ], bin: { 'reliable-master': './bin/reliable-master' }, repository: { type: 'git', url: 'git@github.com:reliablejs/reliable-master.git' }, dependencies: { 'ansi-to-html': '~0.3.0', babel: '~5.6.14', badgeboard: '~0.1.1', bcryptjs: '~2.2.1', chalk: '~1.1.1', co: '~4.6', 'co-body': '~1.1.0', 'co-request': '^0.2.1', commander: '~2.0.0', 'detect-port': '~0.1.3', koa: '~0.21.0', 'koa-csrf': '2.1.3', 'koa-favicon': '~1.2.0', 'koa-generic-session': '~1.10.0', 'koa-redis': '~1.0.1', 'koa-router': '~3.7.0', 'koa-static': '~1.4.7', mongoose: '=4.1.5', nodemailer: '~1.4.0', 'npm-update': '1.0.2', react: '~0.14.0', 'react-dom': '~0.14.2', redis: '~2.3.1', 'reliable-events': '^0.1.4', 'reliable-github-oauth': '^1.0.0', 'reliable-gitlab-oauth': '^1.0.0', 'reliable-logger': '^1.0.7', 'reliable-mail': '^0.2.0', 'reliable-plugin': '^0.1.9', validator: '~3.37.0', xutil: '~1.0.0', yamljs: '~0.2.4', zmq: '2.15.3' }, devDependencies: { 'co-mocha': '~1.1.2', 'command-line-test': '^1.0.5', eslint: '~1.1.0', 'eslint-plugin-react': '~3.2.3', istanbul: '', 'json-loader': '~0.5.2', 'jsx-loader': '~0.13.2', killing: '~1.0.1', mocha: '~2.4.5', 'pre-commit': '~1.1.1', 'react-d3-components': '~0.6.0', should: '', webpack: '^1.13.1' }, scripts: { test: 'make test', lint: 'make lint' }, 'pre-commit': [ 'lint', [length]: 1 ], engines: { node: '>=4.2.1' }, homepage: 'https://reliablejs.github.io/reliable', license: 'MIT' } } index.js:32:10 [worker:1] pid:10712 base middlewares attached index.js:36:12 [worker:1] pid:10712 middleware: i18n registed render.js:15:8 [worker:1] pid:10712 render view path: F:\laji\reliable-master\web\views index.js:36:12 [worker:1] pid:10712 middleware: inject registed index.js:36:12 [worker:1] pid:10712 middleware: favicon registed index.js:36:12 [worker:1] pid:10712 middleware: powerby registed index.js:36:12 [worker:1] pid:10712 middleware: static registed router.js:41:10 [worker:1] pid:10712 router set index.js:67:14 [master] pid:7324 listening worker id: 1, pid: 10712, address: 192.168.31.202:3333 Server start at 2017-03-02 17:23:17 | http://192.168.31.202:3333

而且我启动了mongodb,reliable数据也恢复进去了。也启动了redis。

但是我在执行完make adduser之后数据库并没有我创建的用户信息,登录网页也提示该用户不存在。

$ make adduser ./bin/reliable-master adduser y

Do you want create an account? [Y/N]y

User Id: admin1 admin1

Email address: admin1@qq.com admin1@qq.com

Password: Admin123 Admin123

isAdmin [Y/N]: F:\laji\reliable-master\bin\reliable-master-adduser:82 process.stdout.clearLine(); ^

TypeError: process.stdout.clearLine is not a function at Socket.passwordListener (F:\laji\reliable-master\bin\reliable-master-adduser:82:20) at emitOne (events.js:101:20) at Socket.emit (events.js:189:7) at readableAddChunk (_stream_readable.js:176:18) at Socket.Readable.push (_stream_readable.js:134:10) at Pipe.onread (net.js:551:20)

但是我直接在网页上注册用户可以注册成功

CodeToSurvive1 commented 7 years ago

你node版本是多少的?会不会是版本问题 可以先直接去数据库中把用户的状态改成管理员的

whitiancai commented 7 years ago

@CodeToSurvive1 切换过7.6,6.2,5.6,5.0均不行