i'm having issue in node-red when in flow have several http requests services in node-red. far can see error comes when second call same domain (i.e.: localhost, although domain)
as summary: have 2 different flows:
- one gitlab interface retrieving files there. here call gitlab server (flow 1)
- another 1 application, needs retrieve 2 different files. flow, call 2 times previous flow (flow 2)
so, once second flow started, , after javascript , switch nodes, call first time to first flow, calls gitlab. works absolutely fine second flow continues , calls again, after javascript nodes, first flow, , seems flow freezes , nothing happens, , after 2 minutes error:
4 apr 16:18:11 - [error] [http request:get_file] no response server 4 apr 16:18:11 - [error] [http request:get_file] error: socket hang 4 apr 16:18:11 - [warn] [function:prepare_output] [navigations 3ef90eaf.c106f2] error retrieving data storage error: socket hang : http://localhost:1880/gitlab_interface/file?... 4 apr 16:18:11 - [warn] [function:init] [navigations 3ef90eaf.c106f2] let's raise error: econnreset | error retrieving data storage 4 apr 16:18:11 - [info] [function:init] [navigations 3ef90eaf.c106f2] error raised: econnreset | error retrieving data storage error: request aborted @ incomingmessage.onaborted (...\node-red-0.16.2\node_modules\body-parser\node_modules\raw-body\index.js:269:10) @ emitnone (events.js:67:13) @ incomingmessage.emit (events.js:166:7) @ abortincoming (_http_server.js:280:11) @ socket.serversocketcloselistener (_http_server.js:293:5) @ emitone (events.js:82:20) @ socket.emit (events.js:169:7) @ tcp._onclose (net.js:477:12)
do have idea error?
i've searched in internet error in nodejs, instance:
nodejs socket hang & econnreset - http post request meteor node js server node.js post causes [error: socket hang up] code: 'econnreset' node js econnreset i've been testing locally of these possible solutions (modifying library follow-redirects , node 21-httprequest.js) without success, i'm lost why error occurs
i've tried set delay, sure it's not timing issue
i'm using node-red v0.16.2 , nodejs v4.4.3
thanks in advance, regards.
ps: i've done test metrics active:
λ node red.js 5 apr 18:17:31 - [info] welcome node-red =================== 5 apr 18:17:31 - [info] node-red version: v0.16.2 5 apr 18:17:31 - [info] node.js version: v4.4.3 5 apr 18:17:31 - [info] windows_nt 6.1.7601 x64 le 5 apr 18:17:32 - [info] loading palette nodes 5 apr 18:17:34 - [warn] ------------------------------------------------------ 5 apr 18:17:34 - [warn] [rpi-gpio] info : ignoring raspberry pi specific node 5 apr 18:17:34 - [warn] [tail] not supported on windows. 5 apr 18:17:34 - [warn] ------------------------------------------------------ 5 apr 18:17:34 - [info] settings file : c:\users\myuser\.node-red\settings.js 5 apr 18:17:34 - [info] user directory : c:\users\myuser\.node-red 5 apr 18:17:34 - [info] flows file : c:\users\myuser\.node-red\flows_laptop.json 5 apr 18:17:34 - [info] server running @ http://127.0.0.1:1880/ 5 apr 18:17:34 - [debug] loaded flow revision: 2c8bff6298ad76b74c43e90797e50981 5 apr 18:17:34 - [debug] red/runtime/nodes/credentials.load : no user key present 5 apr 18:17:34 - [debug] red/runtime/nodes/credentials.load : using default key 5 apr 18:17:34 - [info] starting flows 5 apr 18:17:34 - [info] started flows 5 apr 18:17:34 - [audit] {"event":"comms.open","level":98,"timestamp":1491409054876} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"eb5384b9.2266c8","event":"node.http in.send","msgid":"1a5f4041.e5a0c","timestamp":1491409060573} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"25a9b4b.377a64c","event":"node.function.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409060575} 5 apr 18:17:40 - [info] [function:init] [flow2 1a5f4041.e5a0c] url: '/mygroup/mysecondflow?query=string' | headers json: '{"host":"localhost:1880","connection":"keep-alive","cache-control":"no-cache","user-agent":"mozilla/5.0 (windows nt 6.1; win64; x64) applewebkit/537.36 (khtml, gecko) chrome/57.0.2987.110 safari/537.36","postman-token":"e84cf5b7-2d90-af9f-7367-93e758b5fbf1","accept":"*/*","accept-encoding":"gzip, deflate, sdch, br","accept-language":"en-us,en;q=0.8"}' 5 apr 18:17:40 - [info] [function:init] [flow2 1a5f4041.e5a0c] received token: undefined 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"25a9b4b.377a64c","event":"node.function.send","msgid":"1a5f4041.e5a0c","timestamp":1491409060585} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"a03d1790.77f638","event":"node.function.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409060586} 5 apr 18:17:40 - [info] [function:validations] [flow2 1a5f4041.e5a0c] 'ok' 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"a03d1790.77f638","event":"node.function.send","msgid":"1a5f4041.e5a0c","timestamp":1491409060588} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"4911f030.be699","event":"node.switch.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409060589} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"4911f030.be699","event":"node.switch.send","msgid":"1a5f4041.e5a0c","timestamp":1491409060593} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"3d1c9dd1.ab5c02","event":"node.switch.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409060594} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"3d1c9dd1.ab5c02","event":"node.switch.send","msgid":"1a5f4041.e5a0c","timestamp":1491409060596} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"404be498.cbc77c","event":"node.http request.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409060597} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"a03d1790.77f638","event":"node.function.duration","msgid":"1a5f4041.e5a0c","value":40.66,"timestamp":1491409060628} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"25a9b4b.377a64c","event":"node.function.duration","msgid":"1a5f4041.e5a0c","value":52.38,"timestamp":1491409060629} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"fbe50847.a50258","event":"node.http in.send","msgid":"81687733.7e9788","timestamp":1491409060644} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"4aa21f88.5424d","event":"node.function.receive","msgid":"81687733.7e9788","timestamp":1491409060645} 5 apr 18:17:40 - [info] [function:init] [flow1 81687733.7e9788] url: '/gitlab_interface/file?query=string' | headers json: '{"host":"localhost:1880","connection":"close"}' 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"4aa21f88.5424d","event":"node.function.send","msgid":"81687733.7e9788","timestamp":1491409060653} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"7fe7c062.5373b","event":"node.function.receive","msgid":"81687733.7e9788","timestamp":1491409060654} 5 apr 18:17:40 - [info] [function:validations] [flow1 81687733.7e9788] validations ok 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"7fe7c062.5373b","event":"node.function.send","msgid":"81687733.7e9788","timestamp":1491409060663} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"29d0fe16.a77122","event":"node.switch.receive","msgid":"81687733.7e9788","timestamp":1491409060663} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"29d0fe16.a77122","event":"node.switch.send","msgid":"81687733.7e9788","timestamp":1491409060664} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"266fb8b2.d3bc78","event":"node.function.receive","msgid":"81687733.7e9788","timestamp":1491409060665} 5 apr 18:17:40 - [info] [function:prepare_request_2_gitlab] [flow1 81687733.7e9788] gitlab server retrieved: https://gitlab.myserver.com 5 apr 18:17:40 - [info] [function:prepare_request_2_gitlab] [flow1 81687733.7e9788] url calling gitlab: https://gitlab.myserver.com/api/v3/projects/123/repository/files?file_path=... 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"266fb8b2.d3bc78","event":"node.function.send","msgid":"81687733.7e9788","timestamp":1491409060668} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"30f49e7b.f00732","event":"node.http request.receive","msgid":"81687733.7e9788","timestamp":1491409060669} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"266fb8b2.d3bc78","event":"node.function.duration","msgid":"81687733.7e9788","value":34.25,"timestamp":1491409060700} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"7fe7c062.5373b","event":"node.function.duration","msgid":"81687733.7e9788","value":39.82,"timestamp":1491409060701} 5 apr 18:17:40 - [metric] {"level":99,"nodeid":"4aa21f88.5424d","event":"node.function.duration","msgid":"81687733.7e9788","value":55.35,"timestamp":1491409060701} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"30f49e7b.f00732","event":"node.http request.duration.millis","msgid":"81687733.7e9788","value":"763.865","timestamp":1491409061433} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"30f49e7b.f00732","event":"node.http request.size.bytes","msgid":"81687733.7e9788","value":786,"timestamp":1491409061434} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"30f49e7b.f00732","event":"node.http request.send","msgid":"81687733.7e9788","timestamp":1491409061435} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"8cb13df8.2bdf8","event":"node.function.receive","msgid":"81687733.7e9788","timestamp":1491409061436} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"8cb13df8.2bdf8","event":"node.function.send","msgid":"81687733.7e9788","timestamp":1491409061436} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"982f8a3a.44e808","event":"node.function.receive","msgid":"81687733.7e9788","timestamp":1491409061437} 5 apr 18:17:41 - [info] [function:base64] ewogicjkyxrvmsi6icj2ywxvcjeilaogicjkyxrvmii6icj2ywxvcjiiicakfqo= 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"982f8a3a.44e808","event":"node.function.send","msgid":"81687733.7e9788","timestamp":1491409061440} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"dda129a5.c079c8","event":"node.http response.receive","msgid":"81687733.7e9788","timestamp":1491409061441} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"fbe50847.a50258","event":"node.http in.response.time.millis","msgid":"81687733.7e9788","value":"803.156","timestamp":1491409061447} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"fbe50847.a50258","event":"node.http in.response.content-length.bytes","msgid":"81687733.7e9788","value":"60","timestamp":1491409061448} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"982f8a3a.44e808","event":"node.function.duration","msgid":"81687733.7e9788","value":13.29,"timestamp":1491409061451} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"8cb13df8.2bdf8","event":"node.function.duration","msgid":"81687733.7e9788","value":15.6,"timestamp":1491409061452} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"404be498.cbc77c","event":"node.http request.duration.millis","msgid":"1a5f4041.e5a0c","value":"885.579","timestamp":1491409061485} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"404be498.cbc77c","event":"node.http request.size.bytes","msgid":"1a5f4041.e5a0c","value":492,"timestamp":1491409061491} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"404be498.cbc77c","event":"node.http request.send","msgid":"1a5f4041.e5a0c","timestamp":1491409061493} 5 apr 18:17:41 - [metric] {"level":99,"nodeid":"f78329d7.a270d8","event":"node.delay.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409061495} 5 apr 18:17:46 - [metric] {"level":99,"event":"runtime.memory.rss","value":104001536,"timestamp":1491409066252} 5 apr 18:17:46 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409066253} 5 apr 18:17:46 - [metric] {"level":99,"event":"runtime.memory.heapused","value":55347176,"timestamp":1491409066254} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"f78329d7.a270d8","event":"node.delay.send","msgid":"1a5f4041.e5a0c","timestamp":1491409071498} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"408b745e.9f3f2c","event":"node.function.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409071498} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"408b745e.9f3f2c","event":"node.function.send","msgid":"1a5f4041.e5a0c","timestamp":1491409071505} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"f259e413.5ae2f8","event":"node.switch.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409071505} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"f259e413.5ae2f8","event":"node.switch.send","msgid":"1a5f4041.e5a0c","timestamp":1491409071506} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"f4d72980.fc5ef8","event":"node.function.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409071506} 5 apr 18:17:51 - [info] [function:prepare_another_call] [flow2 1a5f4041.e5a0c] url: http://localhost:1880/gitlab_interface/file?query=string2 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"f4d72980.fc5ef8","event":"node.function.send","msgid":"1a5f4041.e5a0c","timestamp":1491409071508} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"79b169c0.1f8908","event":"node.http request.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409071508} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"f4d72980.fc5ef8","event":"node.function.duration","msgid":"1a5f4041.e5a0c","value":7.91,"timestamp":1491409071515} 5 apr 18:17:51 - [metric] {"level":99,"nodeid":"408b745e.9f3f2c","event":"node.function.duration","msgid":"1a5f4041.e5a0c","value":11.38,"timestamp":1491409071516} 5 apr 18:18:01 - [metric] {"level":99,"event":"runtime.memory.rss","value":104493056,"timestamp":1491409081255} 5 apr 18:18:01 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409081256} 5 apr 18:18:01 - [metric] {"level":99,"event":"runtime.memory.heapused","value":56854872,"timestamp":1491409081256} 5 apr 18:18:16 - [metric] {"level":99,"event":"runtime.memory.rss","value":104493056,"timestamp":1491409096258} 5 apr 18:18:16 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409096259} 5 apr 18:18:16 - [metric] {"level":99,"event":"runtime.memory.heapused","value":56866328,"timestamp":1491409096261} 5 apr 18:18:31 - [metric] {"level":99,"event":"runtime.memory.rss","value":104497152,"timestamp":1491409111266} 5 apr 18:18:31 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409111270} 5 apr 18:18:31 - [metric] {"level":99,"event":"runtime.memory.heapused","value":56881696,"timestamp":1491409111274} 5 apr 18:18:46 - [metric] {"level":99,"event":"runtime.memory.rss","value":104525824,"timestamp":1491409126276} 5 apr 18:18:46 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409126277} 5 apr 18:18:46 - [metric] {"level":99,"event":"runtime.memory.heapused","value":56954688,"timestamp":1491409126277} 5 apr 18:19:01 - [metric] {"level":99,"event":"runtime.memory.rss","value":104529920,"timestamp":1491409141279} 5 apr 18:19:01 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409141280} 5 apr 18:19:01 - [metric] {"level":99,"event":"runtime.memory.heapused","value":56967392,"timestamp":1491409141281} 5 apr 18:19:16 - [metric] {"level":99,"event":"runtime.memory.rss","value":104529920,"timestamp":1491409156283} 5 apr 18:19:16 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409156284} 5 apr 18:19:16 - [metric] {"level":99,"event":"runtime.memory.heapused","value":56979184,"timestamp":1491409156285} 5 apr 18:19:31 - [metric] {"level":99,"event":"runtime.memory.rss","value":104529920,"timestamp":1491409171290} 5 apr 18:19:31 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409171291} 5 apr 18:19:31 - [metric] {"level":99,"event":"runtime.memory.heapused","value":56990832,"timestamp":1491409171292} 5 apr 18:19:46 - [metric] {"level":99,"event":"runtime.memory.rss","value":104529920,"timestamp":1491409186294} 5 apr 18:19:46 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409186296} 5 apr 18:19:46 - [metric] {"level":99,"event":"runtime.memory.heapused","value":57021800,"timestamp":1491409186296} 5 apr 18:19:51 - [error] [http request:get_file] no response server 5 apr 18:19:51 - [error] [http request:get_file] error: socket hang 5 apr 18:19:51 - [metric] {"level":99,"nodeid":"79b169c0.1f8908","event":"node.http request.send","msgid":"1a5f4041.e5a0c","timestamp":1491409191542} 5 apr 18:19:51 - [metric] {"level":99,"nodeid":"5c0d3d14.99fc94","event":"node.function.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409191543} 5 apr 18:19:51 - [warn] [function:prepare_output] [flow2 1a5f4041.e5a0c] error retrieving data storage error: socket hang : http://localhost:1880/gitlab_interface/file?query=string2 5 apr 18:19:51 - [warn] [function:init] [flow2 1a5f4041.e5a0c] let's raise error: econnreset | error retrieving data storage 5 apr 18:19:51 - [info] [function:init] [flow2 1a5f4041.e5a0c] error raised: econnreset | error retrieving data storage 5 apr 18:19:51 - [metric] {"level":99,"nodeid":"5c0d3d14.99fc94","event":"node.function.send","msgid":"1a5f4041.e5a0c","timestamp":1491409191549} 5 apr 18:19:51 - [metric] {"level":99,"nodeid":"54690181.c294f","event":"node.http response.receive","msgid":"1a5f4041.e5a0c","timestamp":1491409191550} 5 apr 18:19:51 - [metric] {"level":99,"nodeid":"eb5384b9.2266c8","event":"node.http in.response.time.millis","msgid":"1a5f4041.e5a0c","value":"130973.155","timestamp":1491409191554} 5 apr 18:19:51 - [metric] {"level":99,"nodeid":"eb5384b9.2266c8","event":"node.http in.response.content-length.bytes","msgid":"1a5f4041.e5a0c","value":"105","timestamp":1491409191578} 5 apr 18:19:51 - [metric] {"level":99,"nodeid":"5c0d3d14.99fc94","event":"node.function.duration","msgid":"1a5f4041.e5a0c","value":35.34,"timestamp":1491409191580} error: request aborted @ incomingmessage.onaborted (...\node-red-0.16.2\node_modules\body-parser\node_modules\raw-body\index.js:269:10) @ emitnone (events.js:67:13) @ incomingmessage.emit (events.js:166:7) @ abortincoming (_http_server.js:280:11) @ socket.serversocketcloselistener (_http_server.js:293:5) @ emitone (events.js:82:20) @ socket.emit (events.js:169:7) @ tcp._onclose (net.js:477:12) 5 apr 18:20:01 - [metric] {"level":99,"event":"runtime.memory.rss","value":104878080,"timestamp":1491409201297} 5 apr 18:20:01 - [metric] {"level":99,"event":"runtime.memory.heaptotal","value":84781392,"timestamp":1491409201297} 5 apr 18:20:01 - [metric] {"level":99,"event":"runtime.memory.heapused","value":57427712,"timestamp":1491409201298} 5 apr 18:20:02 - [info] stopping flows
when have 2 http request
nodes in same flow, must ensure delete msg.headers
property returned first node before passing msg second node. because headers
first node response headers, , passing them second node asking node use headers in making request.
you should make use of debug node see flow getting to; second call gitlab_interface
flow hanging - adding debug nodes after each node in flow tell flow getting to.
Comments
Post a Comment