These states define what is switched off to save power, and are supported by most operation systems. Therefore you may read details for example here
Posts by anothernas
-
-
-
Regarding #109:
I have no plans to maintain or add to the plugin except for very easy changes that don't need much testing. You will have to supply pull requests or convince nrandon to work on it again.
ryecoaaron, I know you don't want to work on it, and that's ok. But you also know that it's pointless to create a pull request that nobody looks at, apart from the fact that simple OMV users like me would have to register and learn to use github. And that it's not possible to convince nrandon if he doesn't read messages anymore (which is his decision and not up for discussion here).
My tiny wish would be that the autoshutdown plugin gets a little more love. I hope someone integrates this bugfix [1] or implements an even better solution to the problem.
means:
My tiny wish is that existing OMV plugins do not remain completely unmaintained, and that a maintainer is found for the autoshutdown plugin in particular. It doesn't have to be ryecoaaron.
-
My tiny wish would be that the autoshutdown plugin gets a little more love. I hope someone integrates this bugfix [1] or implements an even better solution to the problem.
-
For future reference, the command I now use is
Codeomv-upgrade && sleep 60s && echo "\nApply changes:" && omv-rpc -u admin "Config" "applyChanges" "{\"modules\": $(cat /var/lib/openmediavault/dirtymodules.json), \"force\": false}"
This is run once a week as user “root” in a scheduled task. It does the upgrade, waits for some time as suggested in #12, and then applies the changes. And since this is a scheduled task, I will receive all the details about the upgrade via email.
Perfect, thank you everyone.
-
I don't know much about this plugin. But it has its own log, see Webfrontend > Diagnostics > System Logs > Logs > Autoshutdown. Is there anything in it?
According to https://github.com/OpenMediaVa…ter/usr/sbin/autoshutdown the code 138 could mean that no valid network card was found.
-
Thank you all
-
When using "omv-upgrade" as user "root" in console or scheduled task, should this be executed with "sudo" or without?
I'm not sure if sudo enables some kind of elevated privileges for user root, or if omv root has any permission in any case.
-
1) How does autoshutdown plugin work?
2) What do these mean: Cycles / Seconds?
3) Shutdown command which is better for power and
4) can it also wake back up if someone starts to use plex etc.. ?
1) The task of the Autoshutdown plugin is to shut down the system. You can select which tests must be passed before the system may be shut down (e.g. no user logged in or processor idle). If any of the selected tests are not passed, the system will not shut down.
2) You can specify that the system is not shut down immediately when all tests are passed, but only when all tests are passed cyclically in succession. The "seconds" are the delay between one test and the next.
3) depends
4) Powering up the system is a separate process from this. However, the autoshutdown plugin is able to switch it on at certain times, even at different times per weekday or only on certain weekdays.
If one wants the system to turn on when the user tries to use the service, please read about Wake on Lan. In short: Make sure that WOL is supported by the network interface and BIOS, that WOL is enabled in the BIOS and OMV, and make sure that your client sends a magic wake-up message. Once set up, it works perfectly! Even the combination of WOL and timed switch-on!
-
However, I have observed that the error message is also reproducible on the console:
Code
Display Moreroot@ananas:~# sudo omv-upgrade Get:1 file:/var/cache/openmediavault/archives InRelease Ign:1 file:/var/cache/openmediavault/archives InRelease Get:2 file:/var/cache/openmediavault/archives Release Ign:2 file:/var/cache/openmediavault/archives Release Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Ign:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Get:3 file:/var/cache/openmediavault/archives Packages Get:4 file:/var/cache/openmediavault/archives Translation-en Ign:4 file:/var/cache/openmediavault/archives Translation-en Hit:5 http://packages.openmediavault.org/public shaitan InRelease Hit:6 https://openmediavault-plugin-developers.github.io/packages/debian shaitan InRelease Hit:7 http://deb.debian.org/debian bullseye InRelease Hit:8 http://security.debian.org/debian-security bullseye-security InRelease Hit:9 http://deb.debian.org/debian bullseye-updates InRelease Hit:10 https://openmediavault.github.io/packages shaitan InRelease Hit:11 http://httpredir.debian.org/debian bullseye-backports InRelease Get:12 https://download.docker.com/linux/debian bullseye InRelease [43.3 kB] Fetched 43.3 kB in 2s (21.7 kB/s) Reading package lists... Done Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@ananas:~# sudo omv-rpc -u admin "Config" "applyChanges" "{\"modules\": $(cat /var/lib/openmediavault/dirtymodules.json), \"force\": true}" {"response":null,"error":{"code":0,"message":"Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms","trace":"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 LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms in \/usr\/share\/php\/openmediavault\/system\/process.inc:242\nStack trace:\n#0 \/usr\/share\/php\/openmediavault\/engine\/module\/serviceabstract.inc(62): OMV\\System\\Process->execute()\n#1 \/usr\/share\/openmediavault\/engined\/rpc\/config.inc(174): OMV\\Engine\\Module\\ServiceAbstract->deploy()\n#2 [internal function]: Engined\\Rpc\\Config->applyChanges(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(123): call_user_func_array(Array, Array)\n#4 \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('applyChanges', Array, Array)\n#5 \/usr\/sbin\/omv-engined(537): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 1)\n#6 {main}"}} root@ananas:~#
Is it right that I execute both commands with sudo?
Can you execute both commands several times in a row without this error? Even if no update is available?
-
In the meantime, I thought it might be due to the planned task environment. So I split it into two tasks (1x upgrade command, 30 minutes delayed 1x apply command), but the error message is the same.
And the manual execution of the scheduled task "Apply changes" leads to a red popup "500 - Internal Server Error"
Code
Display MoreFailed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; export SHELL=/bin/sh; sudo --shell --non-interactive --user='root' -- /var/lib/openmediavault/cron.d/userdefined-c10f2d1f-a4fb-4c24-a12c-19fc084f9679 2>&1' with exit code '1': {"response":null,"error":{"code":0,"message":"Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms","trace":"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 LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms in \/usr\/share\/php\/openmediavault\/system\/process.inc:242\nStack trace:\n#0 \/usr\/share\/php\/openmediavault\/engine\/module\/serviceabstract.inc(62): OMV\\System\\Process->execute()\n#1 \/usr\/share\/openmediavault\/engined\/rpc\/config.inc(174): OMV\\Engine\\Module\\ServiceAbstract->deploy()\n#2 [internal function]: Engined\\Rpc\\Config->applyChanges(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(123): call_user_func_array(Array, Array)\n#4 \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('applyChanges', Array, Array)\n#5 \/usr\/sbin\/omv-engined(537): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 1)\n#6 {main}"}} 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 LANGUAGE=; export SHELL=/bin/sh; sudo --shell --non-interactive --user='root' -- /var/lib/openmediavault/cron.d/userdefined-c10f2d1f-a4fb-4c24-a12c-19fc084f9679 2>&1' with exit code '1': {"response":null,"error":{"code":0,"message":"Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms","trace":"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 LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms in \/usr\/share\/php\/openmediavault\/system\/process.inc:242\nStack trace:\n#0 \/usr\/share\/php\/openmediavault\/engine\/module\/serviceabstract.inc(62): OMV\\System\\Process->execute()\n#1 \/usr\/share\/openmediavault\/engined\/rpc\/config.inc(174): OMV\\Engine\\Module\\ServiceAbstract->deploy()\n#2 [internal function]: Engined\\Rpc\\Config->applyChanges(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(123): call_user_func_array(Array, Array)\n#4 \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('applyChanges', Array, Array)\n#5 \/usr\/sbin\/omv-engined(537): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 1)\n#6 {main}"}} in /usr/share/openmediavault/engined/rpc/cron.inc:198 Stack trace: #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(620): Engined\Rpc\Cron->Engined\Rpc\{closure}('/tmp/bgstatussI...', '/tmp/bgoutputLf...') #1 /usr/share/openmediavault/engined/rpc/cron.inc(201): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure)) #2 [internal function]: Engined\Rpc\Cron->execute(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('execute', Array, Array) #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1) #6 {main}
-
-
Code
root@ananas:~# dpkg -l | grep openm ii libopenmpt0:amd64 0.4.11-1 amd64 module music library based on OpenMPT -- shared library ii openmediavault 6.6.0-2 all openmediavault - The open network attached storage solution ii openmediavault-autoshutdown 6.0.9 all OpenMediaVault AutoShutdown Plugin ii openmediavault-filebrowser 6.0.7-1 all openmediavault File Browser plugin ii openmediavault-flashmemory 6.2 all folder2ram plugin for openmediavault ii openmediavault-keyring 1.0.2-2 all GnuPG archive keys of the openmediavault archive ii openmediavault-minidlna 6.0.3 all OpenMediaVault miniDLNA (DLNA server) plugin ii openmediavault-omvextrasorg 6.3.1 all OMV-Extras.org Package Repositories for OpenMediaVault
The "libopenmpt0:amd64" and "openmediavault-keyring" must have been automatically installed since I did not install them. And they are not listed in System > Plugins.
-
What plugins do you have installed? [...] Please also post the output of ls -alh /srv/salt/omv/deploy/pam
Since I do not know a way to export or query the list of installed plugins:
Written down from GUI > System > Plugins
openmediavault-filebrowser 6.0.7-1
openmediavault-omvextrasorg 6.3.1
openmediavault-flashmemory 6.2
openmediavault-autoshutdown 6.0.9
openmediavault-minidlna 6.0.3
-
The omv-rpc command above, executed by a scheduled task, frequently leads to a mail report like this
Code{"response":null,"error":{"code":0,"message":"Failed to execute command 'export PATH=\/bin:\/sbin:\/usr\/bin:\/usr\/sbin:\/usr\/local\/bin:\/usr\/local\/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms","trace":"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 LANGUAGE=; omv-salt deploy run --no-color pam 2>&1' with exit code '1': debian:\n\nSummary for debian\n-----------\nSucceeded: 0\nFailed: 0\n-----------\nTotal states run: 0\nTotal run time: 0.000 ms in \/usr\/share\/php\/openmediavault\/system\/process.inc:242\nStack trace:\n#0 \/usr\/share\/php\/openmediavault\/engine\/module\/serviceabstract.inc(62): OMV\\System\\Process->execute()\n#1 \/usr\/share\/openmediavault\/engine d\/rpc\/config.inc(174): OMV\\Engine\\Module\\ServiceAbstract->deploy()\n#2 [internal function]: Engined\\Rpc\\Config->applyChanges(Array, Array)\n#3 \/usr\/share\/php\/openmediavault\/rpc\/serviceabstract.inc(123): call_user_func_array(Array, Array)\n#4 \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc(86): OMV\\Rpc\\ServiceAbstract->callMethod('applyChanges', Array, Array)\n#5 \/usr\/sbin\/omv-engined(537): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 1)\n#6 {main}"}}
This message is from the upgrade (6.6.0-2) over (6.5.7-1).
Is it normal that is still contains "Failed to execute..."?
-
you would have to find out why php-fpm failed to start
Since I have no idea what should normally happen in what order and triggered by what.... How do I find out the next time it happens?
-
I am not sure if it is a good idea to delay the start of services in my installation. It may end up causing other problems elsewhere.
It also doesn't help to boot less frequently - that only reduces the probability of occurrence, but doesn't fix the cause. Actually, I would expect services to be started by default in an order that does not lead to errors.
Are you sure that this is not a bug in OMV that only shows up at boot time and not always? And which has not yet been detected and fixed in the default installation, because many systems are not booted often?
-
You need to delay some time.
Even with 120 seconds delay I still get this response:
Code{"response":null,"error":{"code":0,"message":"Failed to read from socket: Resource temporarily unavailable","trace":"OMV\\Rpc\\Exception: Failed to read from socket: Resource temporarily unavailable in \/usr\/share\/php\/openmediavault\/rpc\/rpc.inc:172\nStack trace:\n#0 \/usr\/sbin\/omv-rpc(107): OMV\\Rpc\\Rpc::call('Config', 'applyChanges', Array, Array, 2)\n#1 {main}"}}
-
The log output is very short (and says nothing to me):
Code: uncutroot@ananas:~# journalctl -u php7.4-fpm.service -- Journal begins at Sat 2023-06-10 01:07:48 CEST, ends at Sat 2023-07-22 11:10:04 CEST. -- Jul 17 21:11:13 ananas systemd[1]: Stopping The PHP 7.4 FastCGI Process Manager... root@ananas:~#
Hardware is an Intel Celeron J4125 CPU with 8 GB RAM.
systemd-analyze says Startup finished in 6.647s (firmware) + 6.889s (loader) + 4.276s (kernel) + 10.654s (userspace) = 28.468s
-
Sometimes when booting OMV I get an email with an error message "Execution failed php-fpm". This only happens with what feels like every 10th boot, but not for the first time.
Code: email
Display MoreThe system monitoring needs your attention. Host: ananas Date: Wed, 19 Jul 2023 08:21:43 Service: php-fpm Event: Execution failed Description: failed to start (exit status -1) -- no output This triggered the monitoring system to: alert — You have received this notification because you have enabled the system monitoring on this host.
What can be the reason and what can be improved so that the system boots reliably without an error message?