egg
egg copied to clipboard
egg-scripts启动报错:[app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
这些日志只能看出app worker进程失联了,有没有可以复现的例子
同样的问题。主要是把容器在本地运行,又没有问题。
yarn run v1.22.19
$ egg-scripts start --require=$(pwd)/preload.js --daemon --title=egg-server-xaccount --ignore-stderr --worker=2
[egg-scripts] Starting egg application at /xaccount/backend
[egg-scripts] Run node --no-deprecation --require /xaccount/backend/preload.js --require /xaccount/backend/node_modules/source-map-support/register.js /xaccount/backend/node_modules/egg-scripts/lib/start-cluster {"title":"egg-server-xaccount","worker":2,"baseDir":"/xaccount/backend","framework":"/xaccount/backend/node_modules/egg"} --title=egg-server-xaccount
[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: 8...
[egg-scripts] Wait Start: 9...
[egg-scripts] Wait Start: 10...
[egg-scripts] Wait Start: 11...
[egg-scripts] Wait Start: 12...
[egg-scripts] Wait Start: 13...
[egg-scripts] Wait Start: 14...
[egg-scripts] Wait Start: 15...
[egg-scripts] Wait Start: 16...
[egg-scripts] Wait Start: 17...
[egg-scripts] Wait Start: 18...
[egg-scripts] Wait Start: 19...
[egg-scripts] Wait Start: 20...
[egg-scripts] Wait Start: 21...
[egg-scripts] Wait Start: 22...
[egg-scripts] Wait Start: 23...
[egg-scripts] Wait Start: 24...
[egg-scripts] Wait Start: 25...
[egg-scripts] Wait Start: 26...
[egg-scripts] Wait Start: 27...
[egg-scripts] Wait Start: 28...
[egg-scripts] Wait Start: 29...
[egg-scripts] Wait Start: 30...
[egg-scripts] Wait Start: 31...
[egg-scripts] Wait Start: 32...
[egg-scripts] Wait Start: 33...
[egg-scripts] Wait Start: 34...
[egg-scripts] Wait Start: 35...
[egg-scripts] Wait Start: 36...
[egg-scripts] Wait Start: 37...
[egg-scripts] Wait Start: 38...
[egg-scripts] Wait Start: 39...
[egg-scripts] Wait Start: 40...
[egg-scripts] Wait Start: 41...
[egg-scripts] Wait Start: 42...
[egg-scripts] Wait Start: 43...
[egg-scripts] Wait Start: 44...
[egg-scripts] Wait Start: 45...
[egg-scripts] Wait Start: 46...
[egg-scripts] Wait Start: 47...
[egg-scripts] Wait Start: 48...
[egg-scripts] Wait Start: 49...
[egg-scripts] Wait Start: 50...
[egg-scripts] Wait Start: 51...
[egg-scripts] tail -n 100 /root/logs/master-stderr.log
[egg-scripts] Got error when startup:
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 124 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 173 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 186 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 147 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 74 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 49 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 492 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 506 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 481 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 499 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 363 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 632 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,682 ERROR 1068 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 537 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,780 ERROR 449 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 411 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 688 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 711 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,780 ERROR 271 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,780 ERROR 55 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 529 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,780 ERROR 404 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 538 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 298 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 601 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 239 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:10,781 ERROR 1320 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 442 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 342 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 977 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 329 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 517 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 645 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 457 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 263 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 369 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 376 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 315 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 840 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 638 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 223 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 616 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 410 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 336 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,781 ERROR 95 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 744 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 435 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 103 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 555 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 158 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 474 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 396 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 88 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 613 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 428 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 308 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 81 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 738 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,782 ERROR 327 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 819 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 250 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,783 ERROR 1600 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,783 ERROR 110 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,783 ERROR 179 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,783 ERROR 131 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 779 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,783 ERROR 160 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,783 ERROR 38 [agent_worker] receive disconnect event on child_process fork mode, exiting with code:110
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 236 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 200 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 581 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 67 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 285 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,684 ERROR 137 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] Error: write EPIPE
[egg-scripts] at process.target._send (node:internal/child_process:874:20)
[egg-scripts] at process.target.send (node:internal/child_process:747:19)
[egg-scripts] at Object.<anonymous> (/xaccount/backend/node_modules/egg-cluster/lib/app_worker.js:34:9)
[egg-scripts] at Module._compile (node:internal/modules/cjs/loader:1155:14)
[egg-scripts] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
[egg-scripts] at Module.load (node:internal/modules/cjs/loader:1033:32)
[egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:868:12)
[egg-scripts] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[egg-scripts] at node:internal/main/run_main_module:22:47
[egg-scripts] 2023-09-21 07:03:11,683 ERROR 1249 [app_worker] exit with code:1
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 553 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 252 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts] 2023-09-21 07:03:11,781 ERROR 38 [agent_worker] exit with code:110
[egg-scripts] Error: write EPIPE
[egg-scripts] at process.target._send (node:internal/child_process:874:20)
[egg-scripts] at process.target.send (node:internal/child_process:747:19)
[egg-scripts] at Object.<anonymous> (/xaccount/backend/node_modules/egg-cluster/lib/app_worker.js:34:9)
[egg-scripts] at Module._compile (node:internal/modules/cjs/loader:1155:14)
[egg-scripts] at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
[egg-scripts] at Module.load (node:internal/modules/cjs/loader:1033:32)
[egg-scripts] at Function.Module._load (node:internal/modules/cjs/loader:868:12)
[egg-scripts] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[egg-scripts] at node:internal/main/run_main_module:22:47
[egg-scripts] 2023-09-21 07:03:11,783 ERROR 1257 [app_worker] exit with code:1
[egg-scripts] 2023-09-21 07:03:09,683 ERROR 383 [app_worker] receive disconnect event in cluster fork mode, exitedAfterDisconnect:false
[egg-scripts]
[egg-scripts] Start got error, see /root/logs/master-stderr.log
[egg-scripts] Or use `--ignore-stderr` to ignore stderr at startup.
Done in 55.73s.
在 docker 里面要手动指定下 worker 个数
在 docker 里面要手动指定下 worker 个数
$ egg-scripts start --require=$(pwd)/preload.js --daemon --title=egg-server-xaccount --ignore-stderr --worker=2
哈哈,我就是从你那个答案过来的。。事实上,我指定了,如上
好像知道了,是workers 而非worker, 对吧?
好像知道了,是workers 而非worker, 对吧?
--workers=2 worker 数,默认创建与 CPU 核数等量的 app worker,利用 CPU 资源。 文档在这里https://www.eggjs.org/zh-CN/core/deployment