Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux 环境无法通过egg-scripts start启动项目,wait start 300超时退出 #3439

Closed
ppatch opened this issue Jan 31, 2019 · 2 comments

Comments

@ppatch
Copy link

ppatch commented Jan 31, 2019

linux 环境无法通过egg-scripts start启动项目,wait start 300超时退出进程:

1.命令:
[root@VM_0_3_centos sun]# npm run start

[email protected] start /www/sun
egg-scripts start --port=7001 --daemon --env=test --title=sun-dev --ignore-stderr

[egg-scripts] Starting egg application at /www/sun
[egg-scripts] Run node /www/sun/node_modules/egg-scripts/lib/start-cluster {"port":7001,"title":"sun-dev","baseDir":"/www/sun","framework":"/www/sun/node_modules/egg"} --title=sun-dev
[egg-scripts] Save log file to /root/logs
[egg-scripts] Wait Start: 1...
[egg-scripts] Wait Start: 2...
[egg-scripts] Wait Start: 3...
[egg-scripts] Wait Start: 4...
[egg-scripts] Wait Start: 5...
[egg-scripts] Wait Start: 6...
[egg-scripts] Wait Start: 7...
...
...
...

[egg-scripts] Wait Start: 296...
[egg-scripts] Wait Start: 297...
[egg-scripts] Wait Start: 298...
[egg-scripts] Wait Start: 299...
[egg-scripts] Wait Start: 300...
[egg-scripts] Start failed, 300s timeout
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: egg-scripts start --port=7001 --daemon --env=test --title=sun-dev --ignore-stderr
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-01-31T06_51_12_246Z-debug.log

  1. /root/.npm/_logs/2019-01-31T06_51_12_246Z-debug.log 日志:
    0 info it worked if it ends with ok
    1 verbose cli [ '/server/node/node-10.15/bin/node',
    1 verbose cli '/usr/local/bin/npm',
    1 verbose cli 'run',
    1 verbose cli 'start' ]
    2 info using [email protected]
    3 info using [email protected]
    4 verbose run-script [ 'prestart', 'start', 'poststart' ]
    5 info lifecycle [email protected]prestart: [email protected]
    6 info lifecycle [email protected]
    start: [email protected]
    7 verbose lifecycle [email protected]start: unsafe-perm in lifecycle true
    8 verbose lifecycle [email protected]
    start: PATH: /server/node/node-10.15/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/www/sun/node_modules/.bin:/www/src/jdk1.8.0/bin:/www/src/jdk1.8.0/bin:/usr/local/nginx/sbin:/usr/local/php/bin:/usr/local/mysql/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/server/jdk1.8.0/bin:/server/maven/bin:/mongodb-3.2.5/bin:/root/bin
    9 verbose lifecycle [email protected]start: CWD: /www/sun
    10 silly lifecycle [email protected]
    start: Args: [ '-c',
    10 silly lifecycle 'egg-scripts start --port=7001 --daemon --env=test --title=sun-dev --ignore-stderr' ]
    11 silly lifecycle [email protected]start: Returned: code: 1 signal: null
    12 info lifecycle [email protected]
    start: Failed to exec start script
    13 verbose stack Error: [email protected] start: egg-scripts start --port=7001 --daemon --env=test --title=sun-dev --ignore-stderr
    13 verbose stack Exit status 1
    13 verbose stack at EventEmitter. (/server/node/node-10.15/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16)
    13 verbose stack at EventEmitter.emit (events.js:182:13)
    13 verbose stack at ChildProcess. (/server/node/node-10.15/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
    13 verbose stack at ChildProcess.emit (events.js:182:13)
    13 verbose stack at maybeClose (internal/child_process.js:962:16)
    13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
    14 verbose pkgid [email protected]
    15 verbose cwd /www/sun
    16 verbose Linux 3.10.0-693.el7.x86_64
    17 verbose argv "/server/node/node-10.15/bin/node" "/usr/local/bin/npm" "run" "start"
    18 verbose node v10.15.0
    19 verbose npm v6.0.1
    20 error code ELIFECYCLE
    21 error errno 1
    22 error [email protected] start: egg-scripts start --port=7001 --daemon --env=test --title=sun-dev --ignore-stderr
    22 error Exit status 1
    23 error Failed at the [email protected] start script.
    23 error This is probably not a problem with npm. There is likely additional logging output above.
    24 verbose exit [ 1, true ]
  1. package.json:
    {
    "name": "egg-activity",
    "version": "1.0.0",
    "description": "test",
    "private": true,
    "dependencies": {
    "ali-oss": "^6.1.0",
    "cross-env": "5.1.4",
    "crypto-js": "^3.1.9-1",
    "egg": "2.2.1",
    "egg-cors": "2.0.0",
    "egg-logger": "^2.3.1",
    "egg-mysql": "3.0.0",
    "egg-redis": "2.0.0",
    "egg-router-plus": "1.2.0",
    "egg-scripts": "2.5.0",
    "egg-sequelize": "^4.2.0",
    "egg-session": "^3.1.0",
    "egg-session-redis": "1.0.0",
    "egg-static": "2.1.1",
    "egg-validate": "1.0.0",
    "egg-view": "2.1.0",
    "egg-view-ejs": "^2.0.0",
    "md5": "2.2.1",
    "mocha": "^5.2.0",
    "moment": "2.22.1",
    "mysql2": "^1.6.4",
    "parameter": "2.2.3",
    "path-to-regexp": "^2.2.1",
    "sha1": "^1.1.1",
    "upyun": "3.3.4"
    },
    "devDependencies": {
    "autod": "^3.0.1",
    "autod-egg": "^1.0.0",
    "egg-bin": "^4.3.5",
    "egg-ci": "^1.8.0",
    "egg-mock": "^3.14.0",
    "egg-watcher-chokidar": "^2.0.0",
    "eslint": "^4.11.0",
    "eslint-config-egg": "^6.0.0",
    "koa-rewrite": "^3.0.1",
    "sequelize-cli": "^5.4.0",
    "webstorm-disable-index": "^1.2.0"
    },
    "engines": {
    "node": ">=8.9.0"
    },
    "scripts": {
    "start": "egg-scripts start --port=7001 --daemon --env=test --title=sun-dev --ignore-stderr",
    "start1": "cross-env EGG_SERVER_ENV=test NODE_ENV=test egg-scripts start --port=8001 --daemon --title=egg-activity",
    "stop": "egg-scripts stop",
    "prod": "cross-env MOCK_HOME_DIR=/apps/logs/hd/ EGG_SERVER_ENV=prod NODE_ENV=prod egg-scripts start --port=8001 --daemon --title=egg-activity",
    "local": "egg-bin dev",
    "test-local": "egg-bin test",
    "debug": "egg-bin debug",
    "test": "npm run lint -- --fix && npm run test-local",
    "cov": "egg-bin cov",
    "lint": "eslint .",
    "ci": "npm run lint && npm run cov",
    "autod": "autod"
    },
    "ci": {
    "version": "8"
    },
    "repository": {
    "type": "git",
    "url": ""
    },
    "author": "YOLO",
    "license": "MIT"
    }
@atian25
Copy link
Member

atian25 commented Jan 31, 2019

某个插件启动超时了,看下 /root/logs 里面的日志

@egg-bot
Copy link

egg-bot commented Feb 13, 2019

Hello @ppatch. Please provide a reproducible example following the instruction.

Issues labeled by Need Reproduce will be closed if no activities in 7 days.


@ppatch,请根据这个说明提供最小可复现代码。

如果在 7 天内没有进展会被自动关闭。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants