I receive the error message in title during login after installing nut plugin via OMV GUI. Around 1 year back I got a UPS and ran the nut plugin successfully, and then I uninstalled it because I had to return the UPS. Now, when I install the nut plugin, I get errors mentioned in this post.
1. Steps I have taken to fix error: uninstall using below code and install nut plugin in OMV GUI. Didn't work.
apt-get remove --purge nut-server nut openmediavault-nut
2. Tried this in incognito mode and cleared browser cache and still getting error in title.
3. Errors Occurring:
3a. Below error after installing nut plugin in OMV GUI:
Failed to execute XPath query '//services/nut'.
Error #0:
OMV\Config\DatabaseException: Failed to execute XPath query '//services/nut'. in /usr/share/php/openmediavault/config/database.inc:78
Stack trace:
#0 /usr/share/openmediavault/engined/module/nut.inc(38): OMV\Config\Database->get('conf.service.nu...')
#1 /usr/share/openmediavault/engined/rpc/services.inc(60): NetworkUPSTools->getStatus()
#2 [internal function]: Engined\Rpc\Services->getStatus(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getStatus', Array, Array)
#5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Services', 'getStatus', Array, Array, 1)
#6 {main}
Failed to execute XPath query '//services/nut'.
Error #0:
OMV\Config\DatabaseException: Failed to execute XPath query '//services/nut'. in /usr/share/php/openmediavault/config/database.inc:78
Stack trace:
#0 /usr/share/openmediavault/engined/module/nut.inc(38): OMV\Config\Database->get('conf.service.nu...')
#1 /usr/share/openmediavault/engined/rpc/services.inc(60): NetworkUPSTools->getStatus()
#2 [internal function]: Engined\Rpc\Services->getStatus(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('getStatus', Array, Array)
#5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Services', 'getStatus', Array, Array, 1)
#6 {main}
Alles anzeigen
3b. Below error after uninstalling nut plugin OMV GUI:
Error #0:
OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export DEBIAN_FRONTEND=noninteractive; apt-get --yes --auto-remove --purge remove openmediavault-nut 2>&1' with exit code '100': Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
openmediavault-nut*
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
3 not fully installed or removed.
After this operation, 282 kB disk space will be freed.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 61886 files and directories currently installed.)
Removing openmediavault-nut (5.2.2-1) ...
debian:
----------
Deleted some code here because only 10,000 characters allowed. Full error message in screenshot attached.
Summary for debian
-------------
Succeeded: 16 (changed=3)
Failed: 0
-------------
Total states run: 16
Total run time: 4.206 s
Setting up nut-server (2.7.4-8) ...
nut-driver.service is a disabled or a static unit, not starting it.
Job for nut-server.service failed because the control process exited with error code.
See "systemctl status nut-server.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nut-server, action "start" failed.
● nut-server.service - Network UPS Tools - power devices information server
Loaded: loaded (/lib/systemd/system/nut-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2022-05-13 06:15:34 IST; 16ms ago
Process: 8966 ExecStart=/sbin/upsd (code=exited, status=1/FAILURE)
May 13 06:15:34 marcus upsd[8966]: listening on 127.0.0.1 port 3493
May 13 06:15:34 marcus upsd[8966]: listening on ::1 port 3493
May 13 06:15:34 marcus upsd[8966]: Warning: no UPS definitions in ups.conf
May 13 06:15:34 marcus upsd[8966]: Fatal error: at least one UPS must be defined in ups.conf
May 13 06:15:34 marcus upsd[8966]: Network UPS Tools upsd 2.7.4
May 13 06:15:34 marcus upsd[8966]: Warning: no UPS definitions in ups.conf
May 13 06:15:34 marcus systemd[1]: nut-server.service: Control process exited, code=exited, status=1/FAILURE
May 13 06:15:34 marcus upsd[8966]: Fatal error: at least one UPS must be defined in ups.conf
May 13 06:15:34 marcus systemd[1]: nut-server.service: Failed with result 'exit-code'.
May 13 06:15:34 marcus systemd[1]: Failed to start Network UPS Tools - power devices information server.
dpkg: error processing package nut-server (--configure):
installed nut-server package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nut:
nut depends on nut-server; however:
Package nut-server is not configured yet.
dpkg: error processing package nut (--configure):
dependency problems - leaving unconfigured
Processing triggers for openmediavault (5.6.26-1) ...
Restarting engine daemon ...
Updating file permissions ...
Purging internal cache ...
Errors were encountered while processing:
nut-server
nut
E: Sub-process /usr/bin/dpkg returned an error code (1) in /usr/share/openmediavault/engined/rpc/pluginmgmt.inc:153
Stack trace:
#0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): Engined\Rpc\PluginMgmt->Engined\Rpc\{closure}('/tmp/bgstatusb3...', '/tmp/bgoutputRD...')
#1 /usr/share/openmediavault/engined/rpc/pluginmgmt.inc(157): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#2 [internal function]: Engined\Rpc\PluginMgmt->remove(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('remove', Array, Array)
#5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Plugin', 'remove', Array, Array, 1)
#6 {main}
Alles anzeigen
Please help me fix this. I got a new UPS and would have to test it out before the return date gets over. I am not really tech savvy and not good with shell language, would really appreciate solutions in code block to run them. Thank you in advance.