egg icon indicating copy to clipboard operation
egg copied to clipboard

nodejs.Error: register to channel: Watcher failed, will retry after 3s, [TCPBase] The socket was closed. (address: 127.0.0.1:45951)

Open DragWeb opened this issue 8 years ago • 8 comments

  • Node Version:8.9.3
  • Egg Version:^2.0.0
  • Plugin Name:
  • Plugin Version:
  • Platform:
  • Mini Showcase Repository:
2018-03-29 19:11:43,169 WARN 9670 nodejs.Error: register to channel: Watcher failed, will retry after 3s, [TCPBase] The socket was closed. (address: 127.0.0.1:45951)
    at Follower.send (/data/online/open-webhook/node_modules/tcp-base/lib/base.js:184:19)
    at Follower.send (/data/online/open-webhook/node_modules/cluster-client/lib/follower.js:106:18)
    at Follower._registerChannel (/data/online/open-webhook/node_modules/cluster-client/lib/follower.js:216:10)
    at Timeout.setTimeout [as _onTimeout] (/data/online/open-webhook/node_modules/cluster-client/lib/follower.js:225:31)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)
id: 453
data: 'AQAAAAAAAAAAAAHFAADqYAAAADMAAAAAeyJ0eXBlIjoicmVnaXN0ZXJfY2hhbm5lbCIsImNoYW5uZWxOYW1lIjoiV2F0Y2hlciJ9'
pid: 9670
hostname: app5centos7p170

open-webhook服务接收kafka消息,跑十几分钟就一直报上面错误,怎么回事儿?

DragWeb avatar Mar 29 '18 11:03 DragWeb

@gxcsoccer 是不是长时间agent没有发消息给workers 造成的?

DragWeb avatar Mar 29 '18 11:03 DragWeb

agent 总是挂掉,跑一会儿就挂了,求解答

2018-03-29 22:17:+08:00: 2018-03-29 22:17:58,631 ERROR 29981 nodejs.AgentWorkerDiedError: [master] agent_worker#1:29992 died (code: null, signal: SIGABRT)
    at Master.onAgentExit (/data/online/open-webhook/node_modules/egg-cluster/lib/master.js:317:17)
    at emitOne (events.js:116:13)
    at Master.emit (events.js:211:7)
    at Messenger.sendToMaster (/data/online/open-webhook/node_modules/egg-cluster/lib/utils/messenger.js:122:17)
    at Messenger.send (/data/online/open-webhook/node_modules/egg-cluster/lib/utils/messenger.js:87:12)
    at ChildProcess.agentWorker.once (/data/online/open-webhook/node_modules/egg-cluster/lib/master.js:216:22)
    at Object.onceWrapper (events.js:317:30)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
name: 'AgentWorkerDiedError'
pid: 29981
hostname: app5centos7p170

DragWeb avatar Mar 29 '18 14:03 DragWeb

@gxcsoccer @atian25

DragWeb avatar Mar 29 '18 14:03 DragWeb

看 common-error 日志

atian25 avatar Mar 29 '18 14:03 atian25

2018-03-29 18:52:21,103 ERROR 9655 nodejs.ClusterClientNoResponseError: client no response in 85944ms exceeding maxIdleTime 60000ms, maybe the connection is close on other side.
    at Timeout.Leader._heartbeatTimer.setInterval [as _onTimeout] (/data/online/open-webhook/node_modules/cluster-client/lib/leader.js:73:23)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)
name: 'ClusterClientNoResponseError'
pid: 9655
hostname: app5centos7p170

是不是长时间agent没有发消息给workers 造成的? 不应该呀,本地也没这毛病

DragWeb avatar Mar 29 '18 14:03 DragWeb

@atian25 大大,这个问题如何解决,模拟心跳收不到kafka消息了

DragWeb avatar Mar 29 '18 15:03 DragWeb

@DragWeb 提供完整的错误日志,关键是看 agent 为啥老是挂,agent 是不能随便挂的,在线上 agent 即使挂了也不会退出,这样就会导致你上面发的错误。

在 egg 的设计里面,agent 不能做业务相关的事情,必须保证稳定

cc: @dead-horse

gxcsoccer avatar Mar 30 '18 19:03 gxcsoccer

没有进一步信息,先关了

dead-horse avatar Sep 04 '18 06:09 dead-horse