senecajs / seneca

A microservices toolkit for Node.js.
http://senecajs.org
MIT License
3.96k stars 312 forks source link

legacy.transport = false/v3.4.2 errors: `Client request error: read ECONNRESET` and `transport_client_null` #676

Open bretthex opened 7 years ago

bretthex commented 7 years ago

Hi, I'm running the latest Seneca Mesh and Seneca using the new transport and frequently get Client request error: read ECONNRESET and transport_client_null errors on services.

Any insight into why these errors occur would be appreciated.

Node version: 8.4.0

package.json

    "seneca": "3.4.2",
    "seneca-balance-client": "0.6.1"
    "seneca-mesh": "0.11.0",

Seneca options

Seneca = require('seneca')({
  legacy: {
    transport: false
  }
})

ERROR LOG

Seneca Fatal Error
==================

Message: seneca: transport_client_null

Code: transport_client_null

Details: { model: 'observe',
  host: '192.33.99.103',
  port: 56494,
  ismesh: true,
  type: 'web',
  path: '/act',
  protocol: 'http',
  role: 'transport',
  hook: 'listen',
  modify_response: {},
  pin: 'timesync:pong',
  id: 'hook:listen,host:192.33.99.103,ismesh:true,model:observe,modify_response:[object Object],path:/act,pin:timesync:pong,port:56494,protocol:http,role:transport,type:web~alffye6k7wfw/1505397210540/1/3.4.2/service2~timesync:pong~1505397210833',
  pg: 'timesync:pong' }

Stack:
    at Object.errormaker [as error] (/usr/src/app/node_modules/eraro/eraro.js:94:15)
    at Seneca.<anonymous> (/usr/src/app/node_modules/seneca/lib/api.js:235:22)
    at Object.intern.handle_reply (/usr/src/app/node_modules/seneca/seneca.js:1383:13)
    at Seneca.action_reply (/usr/src/app/node_modules/seneca/seneca.js:904:24)
    at Seneca.<anonymous> (/usr/src/app/node_modules/seneca/lib/transport.js:166:5)
    at Object.intern.handle_reply (/usr/src/app/node_modules/seneca/seneca.js:1383:13)
    at Seneca.action_reply (/usr/src/app/node_modules/seneca/seneca.js:904:24)
    at Object.intern.handle_inward_break (/usr/src/app/node_modules/seneca/seneca.js:1438:11)
    at Object.intern.execute_action (/usr/src/app/node_modules/seneca/seneca.js:1273:12)
    at Object.act_fn [as fn] (/usr/src/app/node_modules/seneca/seneca.js:896:18)

Instance: Seneca/dr/base
  ALL ERRORS FATAL: action called with argument fatal$:true (probably a plugin init error, or using a plugin seneca instance)
    at Seneca.<anonymous> (/usr/src/app/node_modules/seneca/lib/api.js:234:21)

When: 2017-09-14T13:55:55.894Z

Log: {kind:null,plugin:seneca,tag:3.4.2,id:dr/base,code:transport_client_null,notice:seneca: transport_client_null,e

Node:
  { http_parser: '2.7.0', node: '8.4.0', v8: '6.0.286.52', uv: '1.13.1', zlib: '1.2.11', ares: '1.10.1-DEV', modules: '57', nghttp2: '1.22.0', openssl: '1.0.2l', icu: '59.1', unicode: '9.0', cldr: '31.0.1', tz: '2017b' },
  { debug: false, uv: true, ipv6: true, tls_npn: true, tls_alpn: true, tls_sni: true, tls_ocsp: true, tls: true },
Seneca Fatal Error
==================

Message: Client request error: read ECONNRESET

Code: ECONNRESET

Details: undefined

Stack:
    at _errnoException (util.js:1041:11)
    at TCP.onread (net.js:606:25)

Instance: Seneca/z5tpobconhag/1505396586585/1/3.4.2/service1
  ALL ERRORS FATAL: action called with argument fatal$:true (probably a plugin init error, or using a plugin seneca instance)
    at Object.intern.handle_reply (/usr/src/app/node_modules/seneca/seneca.js:1343:23)

When: 2017-09-14T13:46:06.502Z

Log: {kind:null,plugin:seneca,tag:3.4.2,id:z5tpobconhag/1505396586585/1/3.4.2/service1,code:ECONNRESET,no

Node:
  { http_parser: '2.7.0', node: '8.4.0', v8: '6.0.286.52', uv: '1.13.1', zlib: '1.2.11', ares: '1.10.1-DEV', modules: '57', nghttp2: '1.22.0', openssl: '1.0.2l', icu: '59.1', unicode: '9.0', cldr: '31.0.1', tz: '2017b' },
  { debug: false, uv: true, ipv6: true, tls_npn: true, tls_alpn: true, tls_sni: true, tls_ocsp: true, tls: true },
rjrodger commented 6 years ago

Try using https://github.com/voxgig/seneca-monitor to see if your mesh network is stable. We're adding more observability to debug issues like this as they can have multiple causes due to network issues etc.

danielo515 commented 6 years ago

I have the same exact problem with the client_transport_null The more load the mesh has, the more often this issue arises