thinkjs / thinkjs

Use full ES2015+ features to develop Node.js applications, Support TypeScript.
https://thinkjs.org/
MIT License
5.31k stars 616 forks source link

运行process.send('think-cluster-reload-workers'); 不起作用报错。 #820

Closed arterli closed 7 years ago

arterli commented 7 years ago

DESC

[2017-09-02 01:15:44.590] [16933] [ERROR] - uncaughtException, times: 1, pid: 16933 [2017-09-02 01:15:44.591] [16933] [ERROR] - TypeError: Cannot read property 'on' of undefined at Worker.disableKeepAlive (/Users/Arterli/Projects/www.cmswing.com/node_modules/think-cluster/lib/worker.js:40:11) at Worker.closeServer (/Users/Arterli/Projects/www.cmswing.com/node_modules/think-cluster/lib/worker.js:52:10) at Worker.worker.once.message (/Users/Arterli/Projects/www.cmswing.com/node_modules/think-cluster/lib/worker.js:85:16) at Object.onceWrapper (events.js:318:30) at emitTwo (events.js:125:13) at Worker.emit (events.js:213:7) at process.Worker.process.on (internal/cluster/worker.js:42:12) at emitTwo (events.js:130:20) at process.emit (events.js:213:7) at process.emit (/Users/Arterli/Projects/www.cmswing.com/node_modules/source-map-support/source-map-support.js:431:21) at emit (internal/child_process.js:774:12) at _combinedTickCallback (internal/process/next_tick.js:141:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2017-09-02 01:15:44.602] [16933] [ERROR] - TypeError: Cannot read property 'on' of undefined at Worker.disableKeepAlive (/Users/Arterli/Projects/www.cmswing.com/node_modules/think-cluster/lib/worker.js:40:11) at Worker.closeServer (/Users/Arterli/Projects/www.cmswing.com/node_modules/think-cluster/lib/worker.js:52:10) at Worker.worker.once.message (/Users/Arterli/Projects/www.cmswing.com/node_modules/think-cluster/lib/worker.js:85:16) at Object.onceWrapper (events.js:318:30) at emitTwo (events.js:125:13) at Worker.emit (events.js:213:7) at process.Worker.process.on (internal/cluster/worker.js:42:12) at emitTwo (events.js:130:20) at process.emit (events.js:213:7) at process.emit (/Users/Arterli/Projects/www.cmswing.com/node_modules/source-map-support/source-map-support.js:431:21) at emit (internal/child_process.js:774:12) at _combinedTickCallback (internal/process/next_tick.js:141:11) at process._tickCallback (internal/process/next_tick.js:180:9) [2017-09-02 01:15:44.634] [16934] [ERROR] - uncaughtException, times: 1, pid: 16934 [2017-09-02 01:15:44.637] [16935] [ERROR] - uncaughtException, times: 1, pid: 16935 [2017-09-02 01:15:44.635] [16934] [ERROR] - TypeError: Cannot read property 'on' of undefined

ENV

think-cluster@1.0.10 Platform:

Node.js Version: 8.4 ThinkJS Version: 3.1

welefen commented 7 years ago

已经修复,请升级 think-cluster@1.0.11

arterli commented 7 years ago

刚测试了,在开发模式下没有问题,但是线上pm2 维护,还是不起作用。

arterli commented 7 years ago

有好了,刚才是pm2 restart ,我delete掉重新 pm2 start 好了