Error: read ECONNRESET
at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)
AWS ワークスペースで実行されている NodeJS からこのエラーを取得します。ワークスペースから nodejs を実行している場合にのみ、osx から実行してもエラーは発生しません。Postman からの呼び出しを再作成しましたが、Workspaces とラップトップの両方から機能します。タイムアウトの増加を示唆するスレッドはたくさんありますが、最終的に受け入れられたスレッドはありません。
response = await request(config.get('oath2Url'))
.post('/public/oauth2/token')
.set('Content-Type','application/x-www-form-urlencoded')
.field('grant_type', 'client_credentials')
.field('client_id', '4256f935-a829-49c6-962e-5ab0bf1614da')
.field('client_secret', 'steve-demo')
.field('client_assertion_type',
'urn:ietf:params:oauth:client_assertion_type:jwt-bearer')
.field('client_assertion',Jwt)
return response.body.access_token;