question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nodejs-ClusterClientNoResponseError-client-no-response.md

See original GitHub issue
  • Node Version: 6.9.4 npm 4.1.1
  • Egg Version: 0.12.0
  • Plugin Name:
  • Plugin Version:
  • Platform: centos

egg.js部署在alpha环境下,发现时常出现卡的现象,首次卡差不多在5-20秒之间。查看日志记录如下:

  • egg-web.log
2017-02-27 10:40:19,002 INFO 25022 [tcp-base] the connection: 127.0.0.1:43504 is closed by other side
2017-02-27 10:40:19,004 WARN 25022 [ClusterClient#Watcher] follower closed, and try to init it again
2017-02-27 10:40:19,017 INFO 25022 [ClusterClient#Watcher] failed to seize port 43504, and this is follower client.
2017-02-27 10:40:19,020 INFO 25022 [Follower#Watcher] register to channel: Watcher success
2017-02-27 10:41:40,605 INFO 25022 [tcp-base] the connection: 127.0.0.1:43504 is closed by other side
2017-02-27 10:41:40,606 WARN 25022 [ClusterClient#Watcher] follower closed, and try to init it again
2017-02-27 10:41:40,611 INFO 25022 [ClusterClient#Watcher] failed to seize port 43504, and this is follower client.
2017-02-27 10:41:40,613 INFO 25022 [Follower#Watcher] register to channel: Watcher success
2017-02-27 10:43:05,202 INFO 25022 [tcp-base] the connection: 127.0.0.1:43504 is closed by other side
2017-02-27 10:43:05,204 WARN 25022 [ClusterClient#Watcher] follower closed, and try to init it again
2017-02-27 10:43:05,216 INFO 25022 [ClusterClient#Watcher] failed to seize port 43504, and this is follower client.
2017-02-27 10:43:05,219 INFO 25022 [Follower#Watcher] register to channel: Watcher success
2017-02-27 10:44:36,837 INFO 25022 [tcp-base] the connection: 127.0.0.1:43504 is closed by other side
2017-02-27 10:44:36,838 WARN 25022 [ClusterClient#Watcher] follower closed, and try to init it again
2017-02-27 10:44:36,845 INFO 25022 [ClusterClient#Watcher] failed to seize port 43504, and this is follower client.
2017-02-27 10:44:36,847 INFO 25022 [Follower#Watcher] register to channel: Watcher success

egg-agent.log

2017-02-27 10:27:44,949 INFO 25012 [Leader#Watcher] socket connected, port: 52294
2017-02-27 10:29:12,108 INFO 25012 [Leader#Watcher] socket connected, port: 52332
2017-02-27 10:30:35,432 INFO 25012 [Leader#Watcher] socket connected, port: 52398
2017-02-27 10:32:01,630 INFO 25012 [Leader#Watcher] socket connected, port: 52584
2017-02-27 10:33:23,592 INFO 25012 [Leader#Watcher] socket connected, port: 52618
2017-02-27 10:34:47,405 INFO 25012 [Leader#Watcher] socket connected, port: 52628
2017-02-27 10:36:10,506 INFO 25012 [Leader#Watcher] socket connected, port: 52680
2017-02-27 10:37:32,651 INFO 25012 [Leader#Watcher] socket connected, port: 52690
2017-02-27 10:38:55,057 INFO 25012 [Leader#Watcher] socket connected, port: 52744
2017-02-27 10:40:19,019 INFO 25012 [Leader#Watcher] socket connected, port: 52784
2017-02-27 10:41:40,612 INFO 25012 [Leader#Watcher] socket connected, port: 53028
2017-02-27 10:43:05,218 INFO 25012 [Leader#Watcher] socket connected, port: 53096
2017-02-27 10:44:36,846 INFO 25012 [Leader#Watcher] socket connected, port: 53196

common-error.log

2017-02-27 00:01:25,445 ERROR 25012 nodejs.ClusterClientNoResponseError: client no response in 12397ms, maybe the connection is close on other side.
    at Timeout.Leader._heartbeatTimer.setInterval [as _onTimeout] (/pathxx/node_modules/cluster-client/lib/leader.js:59:23)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)
name: 'ClusterClientNoResponseError'
pid: 25012
hostname: host-192-168-51-80

2017-02-27 00:02:45,501 ERROR 25012 nodejs.ClusterClientNoResponseError: client no response in 17120ms, maybe the connection is close on other side.
    at Timeout.Leader._heartbeatTimer.setInterval [as _onTimeout] (/pathxx/node_modules/cluster-client/lib/leader.js:59:23)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)
name: 'ClusterClientNoResponseError'
pid: 25012
hostname: host-192-168-51-80

此日志文件记录内容最多

web.log 此日志文件为空

启动命令为

nohup node index.js > np-show20170220.log 2>&1 &

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:66 (24 by maintainers)

github_iconTop GitHub Comments

6reactions
kylezhangcommented, Jan 26, 2018

依然还有这个问题。

image

2reactions
itsky365commented, Mar 14, 2017

@atian25

[root@host-192-168-1-1 code]# cat common-error.log 
2017-03-14 13:28:13,655 ERROR 28134 nodejs.ClusterClientNoResponseError: client no response in 31752ms exceeding maxIdleTime 30000ms, maybe the connection is close on other side.
    at Timeout.Leader._heartbeatTimer.setInterval [as _onTimeout] (/root/code/node_modules/.1.5.1@cluster-client/lib/leader.js:63:23)
    at ontimeout (timers.js:365:14)
    at tryOnTimeout (timers.js:237:5)
    at Timer.listOnTimeout (timers.js:207:5)
name: 'ClusterClientNoResponseError'
pid: 28134
hostname: host-192-168-1-1

现在还报这样的错误,只是比 egg@rc-2 、cluster-client@1.5.0 少些

运行环境 egg@rc-3 cluster-client@1.5.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found