Troubleshooting
Node-RED writes to InfluxDB on another PC time out
Short answer
The write is an HTTP request to TCP 8086, and a successful ping proves only ICMP reachability. In the reported case the PC's firewall dropped the InfluxDB inbound rule on the Public profile; enabling it restored the writes. Diagnose the gateway-to-PC hop on its own and confirm which URL field the node actually dials.
On this page
RequestTimedOutError at the InfluxDB node means the HTTP write to the database PC never completed — and a successful ping proves nothing about it, because ping is ICMP and the write is an HTTP request to TCP 8086. In the case this article works through, gateway and PC pinged each other, the OPC UA read kept delivering values, and every write still timed out: the PC's Windows firewall was dropping inbound 8086 because the InfluxDB entry was unchecked on the Public profile the adapter was using. Enabling that entry restored the data transfer. Diagnose the gateway-to-PC hop on its own, confirm which URL field the node dials, and prove the path with a local control write before touching payload formatting.
What the timeout tells you #
The RequestTimedOutError: Request timed out message comes from the InfluxDB output node of the node-red-contrib-influxdb package: its HTTP request to the configured endpoint produced no response before the client gave up. An InfluxDB 2.x server serves its HTTP API on TCP 8086 by default — the port can be moved with influxd flags or a configuration file — and a v2 write is a request authorized by the token and aimed at the configured organization and bucket.
That matters because of what a timeout is not. A request that reaches a listening service and is rejected — wrong token, wrong bucket — comes back as an error response almost immediately. A timeout means no round trip completed at all: the request never reached a listener, or the response never got back. Ping cannot separate those cases because it exercises ICMP, not TCP 8086, and a firewall can answer echo requests all day while silently dropping the database traffic.
Two hops, two diagnoses #
The flow contains two independent network paths, and the error names only the second one.
| Hop | Destination in the reported flow | Proof it works |
|---|---|---|
| Gateway to PLC OPC UA server | opc.tcp://192.168.0.82:4840, subscribe | Debug sidebar keeps showing the PLC value |
| Gateway to InfluxDB PC | http://192.168.0.24:8086, write | The InfluxDB node stops timing out and the bucket gains points |
The debug output kept showing the PLC value while the writes failed, so acquisition was healthy and the fault lived between the gateway and the PC. Work the write path alone. When the value itself is missing before the database — no payload in the debug pane — the fault is on the read side instead, and troubleshooting Node-RED OPC UA when UaExpert connects is the article for that.
Confirm which destination the node dials #
The reported flow export carried two competing-looking destinations: a legacy-style pair with hostname 127.0.0.1 and port 8086, and a version 2.0 configuration with url http://192.168.0.24:8086.
| Field in the export | Value | Commissioning check |
|---|---|---|
| url | http://192.168.0.24:8086 | Must be the PC's address and the server's HTTP port |
| hostname | 127.0.0.1 | Loopback — the Node-RED host itself, not the PC |
| port | 8086 | Belongs to the 1.x-style pair, not the active 2.0 destination |
| version | 2.0 | Selects the URL field as the destination the node dials |
Before touching the network, open the InfluxDB node's configuration and make the destination shown there the remote PC. 127.0.0.1 is loopback: if that field were the active destination, the node would be writing to the gateway and the PC's firewall would be irrelevant. Clear the leftover fields where the editor permits, redeploy, and re-inject. For what the organization, bucket and token fields of the v2 API must each contain, see connecting Node-RED to InfluxDB 2.6 with the v2 API.
The fix: the inbound rule on the PC #
The documented resolution in the reported case: the InfluxDB entry in Windows Defender Firewall had its Public profile checkbox off, and the PC's adapter sat on the Public profile. Enabling the entry restored the writes. Reproduce it in order:
- On the PC, confirm InfluxDB is running and listening on the address and port the gateway targets — test from the PC itself first.
- Identify the firewall profile the adapter is actually using; Windows frequently classifies plant LANs as Public, which is why enabling the Private checkbox alone changes nothing.
- In the Windows Defender Firewall inbound rules, open the entry for the InfluxDB service.
- On its profile settings, enable the profile the adapter uses — Public in the reported case. If no entry exists, create an inbound rule for TCP 8086 for the InfluxDB service.
- Scope the rule to TCP 8086 and, where the rule editor allows, to the gateway's address or subnet, and leave the firewall itself enabled — that is the whole security note.
- From the gateway, exercise the write path again — the inject node, not a ping — and confirm the bucket gains the point.
Worked example: proving the firewall blocks the write to 192.168.0.24:8086 #
Inputs, each from the reported deployment:
- Injection period: 15 s per write attempt (the flow's inject node, repeat 15).
- Read path: opc.tcp://192.168.0.82:4840, with the debug value present throughout the failures.
- Write path: url http://192.168.0.24:8086, InfluxDB 2.0, organization, bucket and token configured.
- Control destination: InfluxDB installed on the gateway, URL and token repointed to it, writes succeed.
- Firewall: InfluxDB inbound entry unchecked for the Public profile active on the PC's adapter.
Rule in words: a blocked path fails uniformly — every attempt times out regardless of payload — while a working flow fails nowhere else. Count the attempts the injection period produces, then compare the two destinations on the same flow.
Arithmetic:
- 60 s ÷ 15 s = 4 write attempts per minute.
- 4 × 60 = 240 attempts per hour.
- 240 × 24 = 5760 attempts per day, each a PLC sample lost while the rule stays off.
- Remote PC destination: 0 of the 4 attempts per minute complete — a 100% timeout rate on the reported system.
- Gateway-local control: the same flow writes successfully.
Result: 100% of remote attempts time out while the identical flow succeeds locally, which confines the fault to the gateway-to-PC path — listener, address binding or firewall — and the PC's firewall entry was the confirmed cause; enabling it for the Public profile restored the writes.
Decision: with every attempt timing out, fix the path first — the inbound rule and the binding — and spend no time on payload formatting. The threshold for moving on: if only some of the 4-per-minute attempts fail, the path is open and the remaining fault is capacity or response time on the service, not a blocked port.
Faults that look like this but are not the firewall #
- A refused error rather than a timeout means the request reached the PC and nothing was listening on 8086 — the service is stopped or bound to loopback only. The same refused-versus-timeout read applies when Node-RED gets ECONNREFUSED against a remote SQL database.
- A wrong token, organization or bucket answers with an HTTP error as soon as the request arrives — a fast, descriptive failure, not
RequestTimedOutError. - An active 127.0.0.1 destination makes the node write to the gateway itself; the PC and its firewall are out of the picture entirely.
- Payload shape: the reported case produced the identical timeout on a separate boolean flow, and converting the boolean to an integer changed nothing — formatting faults surface only after a write arrives.
- Writes landing but the dashboard staying empty means the path is fine and the fault is downstream; work through missing data in a Node-RED InfluxDB Grafana stack instead.
Questions asked
Why does ping succeed while the InfluxDB write times out?
Ping tests ICMP echo; the InfluxDB write is an HTTP request to TCP 8086. A host firewall can answer echo requests and still silently drop inbound TCP 8086, so the PC replies to ping while the write never completes. A silent drop produces a timeout; a port with nothing listening usually produces a refused error instead, which is how you tell the two apart.
The flow export shows hostname 127.0.0.1 and url http://192.168.0.24:8086 — which one wins?
With the node version set to 2.0, the destination dialed comes from the URL field; the hostname and port pair belongs to the older 1.x-style configuration left over in the export. 127.0.0.1 is loopback — the Node-RED host itself — so if that field were active the node would write to the gateway, not the PC. Open the node editor, confirm the displayed destination, and clear the leftovers where the editor permits.
Does a successful write to InfluxDB on the gateway prove the flow is correct?
It proves the flow, the node and the payload serialization can store a point. It does not prove the remote URL, token or firewall. Because the local test changed the URL and the token at the same time, it cannot separate those two remote settings — but combined with a 100 percent timeout rate on the remote destination, it confines the fault to the gateway-to-PC path.
How much data is lost while the firewall rule stays off?
At the flow's 15-second injection period the gateway attempts 4 writes per minute, 240 per hour and 5760 per day, and every one is dropped before the database sees it. That is the cost of leaving the inbound rule disabled, and the reason to treat a uniform timeout as a path fault rather than a nuisance message in the log.
What is the safe firewall change on an OT network?
Enable the InfluxDB inbound entry for the profile the PC's network adapter actually uses — Public in the reported case — and scope it to TCP 8086, restricted to the gateway's address or subnet where the rule editor allows. If no entry exists, create an inbound TCP 8086 rule for the InfluxDB service. Leave the firewall itself enabled; disabling it is not a fix.