I have been looking closer are the TCP traffic on the pi3 hosting NodeRed. At this level the behaviour looks very similar to the Chromium browser interrogating the same url. Notable is that the TCP appears to acknoweldge the 200 response to the initial GET request, and every subsequent delivery of a Object. Yet the HTTP Request Node appears to hang so I suspect that is a bug, but it would be nice in a future NODE-Red update that it can handle ‘streams’ , that is it delivers to the output of the Node, each package of data received.
If it helps, I have attached an extract of the dump from TCPDump (I have only included the first two blocks of data). The text in Bold is my interpretation
I assume this is establishing the connection between client (NodeRed on Pi3 @10.0.0.230 and the Server on Linux @ 10.0.0.120)
09:01:45.380662 IP (tos 0x0, ttl 64, id 53321, offset 0, flags [DF], proto TCP (6), length 60)
10.0.0.230.49494 > 10.0.0.120.http: Flags [S], cksum 0x158c (incorrect -> 0x96e8), seq 2407892063, win 29200, options [mss 1460,sackOK,TS val 545814 ecr 0,nop,wscale 7], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 003c d049 4000 4006 5515 0a00 00e6 0a00 .<.I@.@.U…
0x0020: 0078 c156 0050 8f85 845f 0000 0000 a002 .x.V.P……
0x0030: 7210 158c 0000 0204 05b4 0402 080a 0008 r…
0x0040: 5416 0000 0000 0103 0307 T…
09:01:45.381464 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
10.0.0.120.http > 10.0.0.230.49494: Flags [S.], cksum 0xcea2 (correct), seq 4146853035, ack 2407892064, win 14480, options [mss 1460,sackOK,TS val 529878 ecr 545814,nop,wscale 6], length 0
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 003c 0000 4000 4006 255f 0a00 0078 0a00 .<…@.@.%…x…
0x0020: 00e6 0050 c156 f72b f4ab 8f85 8460 a012 …P.V.+….. 0x0030: 3890 cea2 0000 0204 05b4 0402 080a 0008 8............... 0x0040: 15d6 0008 5416 0103 0306 ....T..... 09:01:45.381778 IP (tos 0x0, ttl 64, id 53322, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.230.49494 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0x3518), seq 1, ack 1, win 229, options [nop,nop,TS val 545815 ecr 529878], length 0 0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 ....B..'.l@K..E. 0x0010: 0034 d04a 4000 4006 551c 0a00 00e6 0a00 .4.J@.@.U....... 0x0020: 0078 c156 0050 8f85 8460 f72b f4ac 8010 .x.V.P...
.+…
0x0030: 00e5 1584 0000 0101 080a 0008 5417 0008 …T…
0x0040: 15d6 …
The Client requesting data from Server
09:01:45.391478 IP (tos 0x0, ttl 64, id 53323, offset 0, flags [DF], proto TCP (6), length 126)
10.0.0.230.49494 > 10.0.0.120.http: Flags [P.], cksum 0x15ce (incorrect -> 0xa1ae), seq 1:75, ack 1, win 229, options [nop,nop,TS val 545816 ecr 529878], length 74: HTTP, length: 74
GET /bms/streamstate.php HTTP/1.1
Host: 10.0.0.120
Connection: close
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 ....B..'.l@K..E.
0x0010: 007e d04b 4000 4006 54d1 0a00 00e6 0a00 .~.K@.@.T.......
0x0020: 0078 c156 0050 8f85 8460 f72b f4ac 8018 .x.V.P...`.+....
0x0030: 00e5 15ce 0000 0101 080a 0008 5418 0008 ............T...
0x0040: 15d6 4745 5420 2f62 6d73 2f73 7472 6561 ..GET./bms/strea
0x0050: 6d73 7461 7465 2e70 6870 2048 5454 502f mstate.php.HTTP/
0x0060: 312e 310d 0a48 6f73 743a 2031 302e 302e 1.1..Host:.10.0.
0x0070: 302e 3132 300d 0a43 6f6e 6e65 6374 696f 0.120..Connectio
0x0080: 6e3a 2063 6c6f 7365 0d0a 0d0a n:.close....
09:01:45.392214 IP (tos 0x0, ttl 64, id 57723, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.120.http > 10.0.0.230.49494: Flags [.], cksum 0x34ce (correct), seq 1, ack 75, win 227, options [nop,nop,TS val 529879 ecr 545816], length 0
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 0034 e17b 4000 4006 43eb 0a00 0078 0a00 .4.{@.@.C…x…
0x0020: 00e6 0050 c156 f72b f4ac 8f85 84aa 8010 …P.V.+…
0x0030: 00e3 34ce 0000 0101 080a 0008 15d7 0008 …4…
0x0040: 5418 T.
Server 200 acknowledgement of the GET, NB there is no Data with the Ack but it does inform it will be text/event-stream
09:01:45.393749 IP (tos 0x0, ttl 64, id 57724, offset 0, flags [DF], proto TCP (6), length 338)
10.0.0.120.http > 10.0.0.230.49494: Flags [P.], cksum 0x3b0d (correct), seq 1:287, ack 75, win 227, options [nop,nop,TS val 529879 ecr 545816], length 286: HTTP, length: 286
HTTP/1.1 200 OK
Date: Mon, 04 Jun 2018 23:01:46 GMT
Server: Apache/2.4.7 (Ubuntu)
X-Powered-By: PHP/5.5.9-1ubuntu4.9
Cache-Control: no-cache, must-revalidate
Expires: Sat, 26 Jul 1997 05:00:00 GMT
Content-Length: 1000000000
Connection: close
Content-Type: text/event-stream
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .'.l@K....B...E.
0x0010: 0152 e17c 4000 4006 42cc 0a00 0078 0a00 .R.|@.@.B....x..
0x0020: 00e6 0050 c156 f72b f4ac 8f85 84aa 8018 ...P.V.+........
0x0030: 00e3 3b0d 0000 0101 080a 0008 15d7 0008 ..;.............
0x0040: 5418 4854 5450 2f31 2e31 2032 3030 204f T.HTTP/1.1.200.O
0x0050: 4b0d 0a44 6174 653a 204d 6f6e 2c20 3034 K..Date:.Mon,.04
0x0060: 204a 756e 2032 3031 3820 3233 3a30 313a .Jun.2018.23:01:
0x0070: 3436 2047 4d54 0d0a 5365 7276 6572 3a20 46.GMT..Server:.
0x0080: 4170 6163 6865 2f32 2e34 2e37 2028 5562 Apache/2.4.7.(Ub
0x0090: 756e 7475 290d 0a58 2d50 6f77 6572 6564 untu)..X-Powered
0x00a0: 2d42 793a 2050 4850 2f35 2e35 2e39 2d31 -By:.PHP/5.5.9-1
0x00b0: 7562 756e 7475 342e 390d 0a43 6163 6865 ubuntu4.9..Cache
0x00c0: 2d43 6f6e 7472 6f6c 3a20 6e6f 2d63 6163 -Control:.no-cac
0x00d0: 6865 2c20 6d75 7374 2d72 6576 616c 6964 he,.must-revalid
0x00e0: 6174 650d 0a45 7870 6972 6573 3a20 5361 ate..Expires:.Sa
0x00f0: 742c 2032 3620 4a75 6c20 3139 3937 2030 t,.26.Jul.1997.0
0x0100: 353a 3030 3a30 3020 474d 540d 0a43 6f6e 5:00:00.GMT..Con
0x0110: 7465 6e74 2d4c 656e 6774 683a 2031 3030 tent-Length:.100
0x0120: 3030 3030 3030 300d 0a43 6f6e 6e65 6374 0000000..Connect
0x0130: 696f 6e3a 2063 6c6f 7365 0d0a 436f 6e74 ion:.close..Cont
0x0140: 656e 742d 5479 7065 3a20 7465 7874 2f65 ent-Type:.text/e
0x0150: 7665 6e74 2d73 7472 6561 6d0d 0a0d 0a0a vent-stream.....
09:01:45.394011 IP (tos 0x0, ttl 64, id 53324, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.230.49494 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0x33a6), seq 75, ack 287, win 237, options [nop,nop,TS val 545816 ecr 529879], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 0034 d04c 4000 4006 551a 0a00 00e6 0a00 .4.L@.@.U…
0x0020: 0078 c156 0050 8f85 84aa f72b f5ca 8010 .x.V.P…+…
0x0030: 00ed 1584 0000 0101 080a 0008 5418 0008 …T…
0x0040: 15d7 …
The first data block from the Server to Client (data starts with data: so is not correct JSON format, but that can be fixed once I have it in NodeRed)
09:01:45.756732 IP (tos 0x0, ttl 64, id 46495, offset 0, flags [DF], proto TCP (6), length 653)
10.0.0.120.http > 10.0.0.230.49488: Flags [P.], cksum 0x1451 (correct), seq 2688096208:2688096809, ack 1388210686, win 243, options [nop,nop,TS val 529915 ecr 545523], length 601: HTTP
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 028d b59f 4000 4006 6d6e 0a00 0078 0a00 …@.@.mn…x…
0x0020: 00e6 0050 c150 a039 17d0 52be 69fe 8018 …P.P.9…R.i…
0x0030: 00f3 1451 0000 0101 080a 0008 15fb 0008 …Q…
0x0040: 52f3 6461 7461 3a20 7b22 7379 7374 656d R.data:.{“system
0x0050: 5f70 6d72 223a 2031 312e 3735 3033 3939 _pmr”:.11.750399
0x0060: 3939 3939 3939 3939 392c 2022 7063 5f73 999999999,.“pc_s
0x0070: 7973 7465 6d5f 7374 6174 655f 6f66 5f63 ystem_state_of_c
0x0080: 6861 7267 6522 3a20 342e 3337 3138 3430 harge”:.4.371840
0x0090: 3935 3832 3837 3432 312c 2022 7379 7374 958287421,.“syst
0x00a0: 656d 5f74 656d 7065 7261 7475 7265 223a em_temperature”:
0x00b0: 2031 382e 3931 3636 3636 3636 3636 3636 .18.916666666666
0x00c0: 3636 382c 2022 7379 7374 656d 5f76 6d72 668,.“system_vmr
0x00d0: 223a 2035 372e 362c 2022 7379 7374 656d “:.57.6,.“system
0x00e0: 5f69 6d72 223a 2032 3034 2e30 2c20 2273 imr":.204.0,.“s
0x00f0: 7973 7465 6d5f 706f 7765 7222 3a20 302e ystem_power”:.0.
0x0100: 3237 3833 3233 3534 3230 3030 3030 3030 2783235420000000
0x0110: 332c 2022 7379 7374 656d 5f67 726f 756e 3,.“system_groun
0x0120: 645f 6661 756c 745f 766f 6c74 6167 6522 d_fault_voltage”
0x0130: 3a20 302e 302c 2022 7379 7374 656d 5f63 :.0.0,.“system_c
0x0140: 7572 7265 6e74 223a 2035 2e37 3839 3030 urrent”:.5.78900
0x0150: 3030 3030 3030 3030 3031 2c20 2265 7374 0000000001,.“est
0x0160: 6f70 5f65 6e61 626c 6564 223a 2074 7275 op_enabled”:.tru
0x0170: 652c 2022 7379 7374 656d 5f62 6174 7465 e,.“system_batte
0x0180: 7279 5f76 6f6c 7461 6765 223a 2034 382e ry_voltage”:.48.
0x0190: 3037 382c 2022 7379 7374 656d 5f72 6174 078,.“system_rat
0x01a0: 6564 5f65 6e65 7267 7922 3a20 3330 2e30 ed_energy”:.30.0
0x01b0: 2c20 2273 7973 7465 6d5f 696d 6422 3a20 ,.“system_imd”:.
0x01c0: 2d31 3430 2e37 3639 3833 3134 3939 3436 -140.76983149946
0x01d0: 3438 392c 2022 7379 7374 656d 5f66 6175 489,.“system_fau
0x01e0: 6c74 5f63 6f64 6573 223a 2030 2c20 2273 lt_codes”:.0,.“s
0x01f0: 7973 7465 6d5f 766d 6422 3a20 3338 2e30 ystem_vmd”:.38.0
0x0200: 2c20 2273 7973 7465 6d5f 7374 6174 655f ,."system_state
0x0210: 6f66 5f68 6561 6c74 6822 3a20 3932 2e39 of_health”:.92.9
0x0220: 3334 3736 3934 3130 3931 3434 372c 2022 3476941091447,.”
0x0230: 7379 7374 656d 5f70 6d64 223a 202d 362e system_pmd”:.-6.
0x0240: 3730 3333 3536 3837 3031 3036 3136 312c 703356870106161,
0x0250: 2022 7379 7374 656d 5f73 7461 7465 5f6f .“system_state_o
0x0260: 665f 6368 6172 6765 223a 2032 312e 3338 f_charge”:.21.38
0x0270: 3132 3334 3935 3038 3431 3236 342c 2022 1234950841264,."
0x0280: 7379 7374 656d 5f77 6172 6e69 6e67 5f63 system_warning_c
0x0290: 6f64 6573 223a 2030 7d0a 0a odes":.0}…
The response from the client (TCP), note that it acknowledges it [.] at this level so the server will deliver the next block in 3 seconds
09:01:45.756897 IP (tos 0x0, ttl 64, id 7588, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.230.49488 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0xb92d), seq 1, ack 601, win 1323, options [nop,nop,TS val 545852 ecr 529915], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 0034 1da4 4000 4006 07c3 0a00 00e6 0a00 .4…@.@…
0x0020: 0078 c150 0050 52be 69fe a039 1a29 8010 .x.P.PR.i…9.)…
0x0030: 052b 1584 0000 0101 080a 0008 543c 0008 .+…T<…
0x0040: 15fb …
The next periodic block of data, this continues on with more blocks I have not copied here
09:01:46.661738 IP (tos 0x0, ttl 64, id 57725, offset 0, flags [DF], proto TCP (6), length 631)
10.0.0.120.http > 10.0.0.230.49494: Flags [P.], cksum 0x85a8 (correct), seq 287:866, ack 75, win 227, options [nop,nop,TS val 530006 ecr 545816], length 579: HTTP
0x0000: b827 eb6c 404b 0019 b801 4289 0800 4500 .’.l@K…B…E.
0x0010: 0277 e17d 4000 4006 41a6 0a00 0078 0a00 .w.}@.@.A…x…
0x0020: 00e6 0050 c156 f72b f5ca 8f85 84aa 8018 …P.V.+…
0x0030: 00e3 85a8 0000 0101 080a 0008 1656 0008 …V…
0x0040: 5418 6461 7461 3a20 7b22 7379 7374 656d T.data:.{“system
0x0050: 5f70 6d72 223a 2031 312e 3735 3033 3939 pmr":.11.750399
0x0060: 3939 3939 3939 3939 392c 2022 7063 5f73 999999999,.“pc_s
0x0070: 7973 7465 6d5f 7374 6174 655f 6f66 5f63 ystem_state_of_c
0x0080: 6861 7267 6522 3a20 342e 3337 3331 3033 harge”:.4.373103
0x0090: 3030 3637 3335 3538 3035 2c20 2273 7973 0067355805,.“sys
0x00a0: 7465 6d5f 7465 6d70 6572 6174 7572 6522 tem_temperature”
0x00b0: 3a20 3138 2e39 3339 3939 3939 3939 3939 :.18.93999999999
0x00c0: 3939 3938 2c20 2273 7973 7465 6d5f 766d 9998,.“system_vm
0x00d0: 7222 3a20 3537 2e36 2c20 2273 7973 7465 r”:.57.6,.“syste
0x00e0: 6d5f 696d 7222 3a20 3230 342e 302c 2022 m_imr”:.204.0,."
0x00f0: 7379 7374 656d 5f70 6f77 6572 223a 2030 system_power":.0
0x0100: 2e32 3934 3935 3739 362c 2022 7379 7374 .29495796,."syst
0x0110: 656d 5f67 726f 756e 645f 6661 756c 745f em_ground_fault
0x0120: 766f 6c74 6167 6522 3a20 302e 302c 2022 voltage”:.0.0,."
0x0130: 7379 7374 656d 5f63 7572 7265 6e74 223a system_current":
0x0140: 2036 2e31 3232 2c20 2265 7374 6f70 5f65 .6.122,.“estop_e
0x0150: 6e61 626c 6564 223a 2074 7275 652c 2022 nabled”:.true,."
0x0160: 7379 7374 656d 5f62 6174 7465 7279 5f76 system_battery_v
0x0170: 6f6c 7461 6765 223a 2034 382e 3138 2c20 oltage":.48.18,.
0x0180: 2273 7973 7465 6d5f 7261 7465 645f 656e “system_rated_en
0x0190: 6572 6779 223a 2033 302e 302c 2022 7379 ergy”:.30.0,.“sy
0x01a0: 7374 656d 5f69 6d64 223a 202d 3134 302e stem_imd”:.-140.
0x01b0: 3737 3438 3136 3837 3438 3938 3638 2c20 77481687489868,.
0x01c0: 2273 7973 7465 6d5f 6661 756c 745f 636f “system_fault_co
0x01d0: 6465 7322 3a20 302c 2022 7379 7374 656d des”:.0,.“system
0x01e0: 5f76 6d64 223a 2033 382e 302c 2022 7379 _vmd”:.38.0,.“sy
0x01f0: 7374 656d 5f73 7461 7465 5f6f 665f 6865 stem_state_of_he
0x0200: 616c 7468 223a 2039 322e 3933 3437 3639 alth”:.92.934769
0x0210: 3431 3039 3134 3437 2c20 2273 7973 7465 41091447,.“syste
0x0220: 6d5f 706d 6422 3a20 2d36 2e37 3033 3634 m_pmd”:.-6.70364
0x0230: 3232 3237 3433 3338 3336 2c20 2273 7973 2227433836,.“sys
0x0240: 7465 6d5f 7374 6174 655f 6f66 5f63 6861 tem_state_of_cha
0x0250: 7267 6522 3a20 3231 2e33 3831 3732 3034 rge”:.21.3817204
0x0260: 3035 3139 3535 312c 2022 7379 7374 656d 0519551,.“system
0x0270: 5f77 6172 6e69 6e67 5f63 6f64 6573 223a _warning_codes”:
0x0280: 2030 7d0a 0a .0}…
09:01:46.662056 IP (tos 0x0, ttl 64, id 53325, offset 0, flags [DF], proto TCP (6), length 52)
10.0.0.230.49494 > 10.0.0.120.http: Flags [.], cksum 0x1584 (incorrect -> 0x305c), seq 75, ack 866, win 246, options [nop,nop,TS val 545943 ecr 530006], length 0
0x0000: 0019 b801 4289 b827 eb6c 404b 0800 4500 …B…’.l@K…E.
0x0010: 0034 d04d 4000 4006 5519 0a00 00e6 0a00 .4.M@.@.U…
0x0020: 0078 c156 0050 8f85 84aa f72b f80d 8010 .x.V.P…+…
0x0030: 00f6 1584 0000 0101 080a 0008 5497 0008 …T…
0x0040: 1656 .V