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

启动server失败,xvfb-run: error: Xvfb failed to start #24

Open
Chenjm08 opened this issue Jun 7, 2023 · 1 comment
Open

启动server失败,xvfb-run: error: Xvfb failed to start #24

Chenjm08 opened this issue Jun 7, 2023 · 1 comment

Comments

@Chenjm08
Copy link

Chenjm08 commented Jun 7, 2023

  • 启动命令:xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L
  • 报错信息:
~/workspace/H5/shida$ npm run dev-server
Debugger listening on ws://127.0.0.1:53787/d8ef2411-675d-4e38-b46a-42e243d35039
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.

> [email protected] dev-server /home/chenjm/workspace/H5/shida
> xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L

xvfb-run: error: Xvfb failed to start
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev-server: `xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] dev-server 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!     /home/admin/.npm/_logs/2023-06-07T03_05_00_835Z-debug.log
Waiting for the debugger to disconnect...
  • 启动失败后,尝试使用 pm2 start -f server/app.js,就可以启动了。不知道为什么 xvfb-run -s '-ac -screen 0 1280x1024x24' nodemon server/app.js dev -L 启动不了了,昨天还可以启动的。
~/workspace/H5/shida$ pm2 start -f server/app.js
Debugger listening on ws://127.0.0.1:53372/32caf6df-fa33-4ced-9e57-b1d5660f73fc
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
[PM2] Applying action restartProcessId on app [app](ids: 0,1)
[PM2] [app](0) ✓
[PM2] [app](1) ✓
[PM2] Process successfully started
┌────┬────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name   │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
├────┼────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0  │ app    │ default     │ 0.1.0   │ fork    │ 937890   │ 0s     │ 0    │ online    │ 0%       │ 20.5mb   │ admin   │ disabled │
│ 1  │ app    │ default     │ 0.1.0   │ fork    │ 937896   │ 0s     │ 136  │ online    │ 0%       │ 20.3mb   │ admin   │ disabled │
└────┴────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[PM2][WARN] Current process list is not synchronized with saved list. Type 'pm2 save' to synchronize.
Waiting for the debugger to disconnect...
@drawcall
Copy link
Member

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

No branches or pull requests

2 participants