Bug #11591
closedCould not install node exporter
0%
Description
I tried to install node_exporter and whilst the install appeared to complete successfully, I noticed it did not appear to be running.
1) I first tried curling <ip address of router>:9100 and got no response.
2) The confirmed it was not running by ssh'ing into the pfsense box and running both ps and sockstat
3) Examined the logs and saw: "/rc.start_packages: ERROR: Could not open {/usr/local/etc/rc.conf.d/node_exporter} for writing"
I then attempted to reinstall the package. Got the following response: ==========================================================================
Upgrading pfSense-pkg-node_exporter...
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be REINSTALLED:
pfSense-pkg-node_exporter-0.18.1_2 [pfSense]
Number of packages to be reinstalled: 1
7 KiB to be downloaded.
[1/1] Fetching pfSense-pkg-node_exporter-0.18.1_2.txz: . done
Checking integrity... done (0 conflicting)
[1/1] Reinstalling pfSense-pkg-node_exporter-0.18.1_2...
[1/1] Extracting pfSense-pkg-node_exporter-0.18.1_2: ....... done
Removing node_exporter components...
Menu items... done.
Services... done.
Loading package instructions...
Saving updated package information...
overwrite!
Loading package configuration... done.
Configuring package components...
Loading package instructions...
Custom commands...
Executing custom_php_install_command()...>>> Cleaning up cache... done.
Success
==========================================================================
Then checked the logs again and saw the same errror:
/rc.start_packages: ERROR: Could not open {/usr/local/etc/rc.conf.d/node_exporter} for writing
Its also worth noting that there is no menu entry for node_exporter under services either, indicating that more than the rc file failed to be created.
After ssh'ing into the pfsense box I can see the directory /usr/local/etc/rc.conf.d does not exist. After creating the directory and attempting to reinstall the package again: ==========================================================================
Upgrading pfSense-pkg-node_exporter...
Updating pfSense-core repository catalogue...
pfSense-core repository is up to date.
Updating pfSense repository catalogue...
pfSense repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
Installed packages to be REINSTALLED:
pfSense-pkg-node_exporter-0.18.1_2 [pfSense]
Number of packages to be reinstalled: 1
7 KiB to be downloaded.
[1/1] Fetching pfSense-pkg-node_exporter-0.18.1_2.txz: . done
Checking integrity... done (0 conflicting)
[1/1] Reinstalling pfSense-pkg-node_exporter-0.18.1_2...
[1/1] Extracting pfSense-pkg-node_exporter-0.18.1_2: ....... done
Removing node_exporter components...
Menu items... done.
Services... done.
Loading package instructions...
Saving updated package information...
overwrite!
Loading package configuration... done.
Configuring package components...
Loading package instructions...
Custom commands...
Executing custom_php_install_command()...done.
Executing custom_php_resync_config_command()...done.
Menu items... done.
Services... done.
Writing configuration... done.
Cleaning up cache... done.
Success ==========================================================================
This time I can see the menu item node_exporter but the logs state the service did not start. From the logs I can see:
/usr/local/etc/rc.d/node_exporter.sh: WARNING: failed to start node_exporter
However I can read metrics from <ip address of router>:9100
Looking at the directory I see both /usr/local/etc/rc.d/node_exporter.sh and /usr/local/etc/rc.d/node_exporter