Troubleshooting
Why the InfluxDB node install fails in Node-RED behind a proxy
Short answer
A ping from the edge box proves only name resolution and ICMP. The palette install fetches packages over HTTPS with npm, and npm on the device does not inherit the proxy configured on the company modem, so the install fails while the same install works on a Windows PC. Set the proxy in npm on the device, in the account that runs the install, then retry and restart Node-RED.
On this page
- Why does the install succeed on your Windows PC and fail on the edge box?
- What should you record before changing anything on the device?
- Does a ping from the edge box prove the registry is reachable?
- How do you point npm on the edge box at the company proxy?
- How do you install the InfluxDB nodes and prove the fix?
- What if the install still fails after the proxy is set?
- What is the decision for each outcome?
- Questions asked
The install fails on the edge box because the palette download is an npm fetch run by a process on the device, and that process does not inherit the proxy you configured on the company's internet modem. A ping from the box proves only name resolution and ICMP, not that the package registry is reachable. The same install works on your Windows PC because that machine's npm session already reaches the registry, directly or through its own proxy settings. The fix is to set the proxy in npm on the edge box itself, in the account that runs the install, then retry and restart Node-RED.
Why does the install succeed on your Windows PC and fail on the edge box? #
The proxy you set on the internet modem shapes traffic routed through the modem; it is not inherited by processes on the edge box, whose npm makes its own HTTPS connections that the company network can drop or reset. Whether a modem can force all client traffic through a proxy depends on its operating mode. If it did force everything, the install would pass the same way ping does. When ping passes and the install fails, the box's HTTPS connections are going out direct and being blocked, while your Windows PC reaches the registry because it sits on a different network path, carries system-level proxy settings, or was configured by IT with them.
One distinction before you touch anything: "install InfluxDB on Node-RED" can mean two jobs. Adding the InfluxDB nodes to the palette is an npm download, and that is what this procedure fixes. Deploying the InfluxDB database service itself on the box is a separate package and service, and the nodes never need it locally, because they write to an InfluxDB server somewhere reachable over HTTP.
What should you record before changing anything on the device? #
Record four things before changing anything, because the procedure below applies only to a network-class failure: the exact package, the install route you used, the complete error output, and the account Node-RED runs under.
- The exact package or catalog entry you were installing: the InfluxDB nodes for the palette, not the database service.
- The route you used: the editor's Manage Palette menu, or npm from a shell session.
- The complete error output, unedited, including its last lines.
- The account Node-RED runs under, because npm proxy settings belong to an account, not to the machine.
The decision rule from that record: a network-class error (a timeout, a connection refused or reset, a gateway error) takes the path in this article; a dependency, script or platform error takes a different path, and no proxy change will fix it.
Does a ping from the edge box prove the registry is reachable? #
No. A reply from ping www.google.com in an SSH session on the box proves name resolution and ICMP echo only; the install is an HTTPS download to the package registry, and a company network can demand its proxy for exactly that traffic. Run the ping on the device itself, not from your laptop: a ping from your own machine says nothing about the box's path.
Worked example: the session reports 4 packets transmitted, 4 received, 0 % loss. That is 4 ÷ 4 = 100 % ICMP success, and it proves 0 of the 1 thing the install needs, which is a permitted HTTPS path from the box to the package registry. If instead 4 packets are transmitted and 0 received, stop here: 0 ÷ 4 = 0 % means the device's address, DNS or default gateway is wrong, and no npm setting helps until that path works.
How do you point npm on the edge box at the company proxy? #
Set the proxy in npm's own configuration on the device, in the account that performs the install, with two commands: one for plain HTTP and one for HTTPS, because the registry download travels over HTTPS.
npm config set proxy http://10.20.30.40:3128
npm config set https-proxy http://10.20.30.40:3128
The address and port here, 10.20.30.40:3128, are example values: substitute the proxy address and port your network administrator confirms for the company network. The second command carries the install, since the registry is reached over HTTPS. The settings land in npm's per-user configuration for the account you are logged in as, so run them in the account that actually installs: the palette manager's account, or the shell account you install from. npm also honors the standard proxy environment variables, which suits a one-off session without changing the account's saved configuration. For a device-side walkthrough of the same mechanism, see configuring npm access behind an HTTP proxy on an industrial edge gateway.
How do you install the InfluxDB nodes and prove the fix? #
Install either from the editor, through the main menu's Manage Palette entry and its Palette Manager, or from a shell in the Node-RED user directory, then restart Node-RED so the new nodes load into the palette.
In the editor, open the main menu, choose Manage Palette and use the Palette Manager's install tab to find the InfluxDB nodes and install them. From a shell, change into the Node-RED user directory with cd ~/.node-red, run npm i followed by the node package's name exactly as the palette catalog prints it, then restart the runtime. The proof is not the install log alone: after the restart, the InfluxDB input and output nodes appear in the editor's palette. If Node-RED itself is not yet on the box, installing Node-RED natively on a Linux edge computer covers that first step.
What if the install still fails after the proxy is set? #
Check three things in order: that npm uses the proxy in the account the install actually runs under, that the company firewall lets the proxy reach the package registry, and that the error is still network-class rather than a dependency or platform fault.
First, scope: you may have set the proxy in your administrator shell while the palette manager runs npm under Node-RED's own service account, which keeps a separate configuration, so repeat the two commands in that account. Second, the destination: company firewalls commonly allow the proxy outbound only to an allowlist, so hand the network administrator the exact error text and ask whether the package registry is permitted through the proxy; a proxy that requires authentication also fails until the administrator supplies the credentials. Third, classify the error again. If the proxy answers with the specific gateway code E502, fixing npm E502 when installing Node-RED nodes behind a proxy covers that path in detail.
What is the decision for each outcome? #
Commit to one of four decisions from what the box reports after the proxy is set, and change nothing else until the failing layer is named.
- Ping fails from the box: fix the device's network path first (address, DNS, default gateway). No npm change helps, and this is a network-layer decision, not a Node-RED one.
- Ping works and the install completes: done. Restart Node-RED and confirm the InfluxDB nodes are in the palette.
- Ping works and the install still fails network-class: the proxy is not applied in the right account, or the registry is blocked or unauthenticated at the company firewall. Take the exact error text to the network administrator.
- The error is dependency or platform-class: connectivity is not the cause. Pursue that package's requirements for the box's operating system release instead of touching the proxy again.
Questions asked
Do proxy environment variables work instead of the npm config commands?
Yes. npm reads the standard proxy environment variables for the session they are set in, which suits a one-off install from a shell without changing the account's saved configuration. The config commands write a persistent per-user setting, the better choice when the palette manager or a service performs the install under its own account.
Does the npm proxy setting survive a reboot of the edge box?
Yes, for the account it was set in: npm stores it in that user's configuration and applies it to every later npm run by that user. It does not carry over to other accounts, so if Node-RED runs as a service under a different user, repeat the two commands in that user's context or set the variables in the service's environment.
Do the npm proxy settings change how Node-RED writes to InfluxDB at runtime?
No. The proxy settings affect npm's package downloads only. The InfluxDB nodes open their own HTTP connections to the InfluxDB server at runtime, and those follow the server address configured in the node, not npm. If runtime writes also fail, test the box's route to the InfluxDB server as a separate problem.
Is adding the InfluxDB nodes the same as installing the InfluxDB server on the box?
No. The nodes are a palette package that lets flows write to an InfluxDB server over HTTP, and that server can run anywhere the box can reach it. Installing the database service itself on the edge box is a separate package with its own download, so record which of the two jobs failed before choosing a procedure.