Autoshutdown restarts OMV one time

    • OMV 3.x
    • Autoshutdown restarts OMV one time

      Hi,

      as some others, i have one problem with the autoshutdown-plugin.
      I have it set up and it works how i want with one major quirk i cant seem to figure out:

      Every evening, when omv is supposed to go to sleep (hibernate) it reboots one time, the second time autoshutdown issues the hibernate command it works as intended.

      The logs seem to be correct and i can see no errors, or falsely issued commands:

      Brainfuck Source Code: autoshutdown.log

      1. Apr 19 00:40:57 omv logger: autoshutdown[28068]: INFO: ' new supervision cycle started - check active hosts or processes'
      2. Apr 19 00:40:57 omv logger: autoshutdown[28068]: INFO: ' Checking the time: stay up or shutdown ...'
      3. Apr 19 00:40:57 omv logger: autoshutdown[28068]: INFO: ' System is in Shutdown-Range. Do further checks ...'
      4. Apr 19 00:40:57 omv logger: autoshutdown[28068]: INFO: ' retrieve list of active IPs for 'eth0' ...'
      5. Apr 19 00:40:58 omv logger: autoshutdown[28068]: INFO: ' No active IPs in the specified IP-Range found'
      6. Apr 19 00:40:58 omv logger: autoshutdown[28068]: INFO: ' Check Connections for 'eth0''
      7. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' ULDL-Traffic-Check for 'eth0''
      8. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' eth0: over the last 300 seconds: DL: 0.0 kB/s; UL: 0.0 kB/s'
      9. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' eth0: UL- and DL-Rate is under 50 kB/s -> next check'
      10. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' HDD-IO: '/dev/sda -> backup2' (last 300s): r: 0.0 w: 0.0 is under 401 -> next HDD'
      11. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' HDD-IO: '/dev/sdb -> ' (last 300s): r: 0.0 w: 7.3 is under 401 -> next HDD'
      12. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' HDD-IO: '/dev/sdc -> media1' (last 300s): r: 0.0 w: 0.0 is under 401 -> next HDD'
      13. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' HDD-IO: '/dev/sdd -> backup1' (last 300s): r: 0.0 w: 0.0 is under 401 -> next HDD'
      14. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' HDD-IO: '/dev/sde -> media2' (last 300s): r: 0.0 w: 0.0 is under 401 -> next HDD'
      15. Apr 19 00:40:59 omv logger: autoshutdown[28068]: INFO: ' HDD-IO all checks for HDD-IO finished'
      16. Apr 19 00:41:03 omv logger: autoshutdown[28068]: INFO: ' No active hosts or processes within network range, 0 cycles until shutdown...'
      17. Apr 19 00:41:03 omv logger: autoshutdown[28068]: INFO: ' Shutdown issued: 'pm-hibernate''
      18. Apr 19 00:41:03 omv logger: autoshutdown[28068]: INFO: ' '
      19. Apr 19 00:41:03 omv logger: autoshutdown[28068]: INFO: ' '
      20. Apr 19 00:42:01 omv autoshutdown.sh[12778]: logger: autoshutdown[12778]: INFO: ' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      21. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      22. Apr 19 00:42:01 omv autoshutdown.sh[12778]: logger: autoshutdown[12778]: INFO: ' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      23. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      24. Apr 19 00:42:01 omv autoshutdown.sh[12778]: logger: autoshutdown[12778]: INFO: ' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      25. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
      26. Apr 19 00:42:01 omv autoshutdown.sh[12778]: logger: autoshutdown[12778]: INFO: ' X Version: 0.9.9.10'
      27. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' X Version: 0.9.9.10'
      28. Apr 19 00:42:01 omv autoshutdown.sh[12778]: logger: autoshutdown[12778]: INFO: ' Initialize logging to local6'
      29. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Initialize logging to local6'
      30. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' /etc/autoshutdown.conf loaded'
      31. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' ------------------------------------------------------'
      32. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Checking config'
      33. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' LOADPROCNAMES is set to: 'smbd,nfsd,transmission-daemon,mt-daapd,forked-daapd' (default)'
      34. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' TEMPPROCNAMES is disabled - No processes being checked'
      35. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' SHUTDOWNCOMMAND is set to 'pm-hibernate''
      36. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Your Kernel supports the following modes from pm-utils:'
      37. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Kernel supports SUSPEND (SUSPEND to RAM)'
      38. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Kernel supports HIBERNATE (SUSPEND to DISK)'
      39. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Kernel supports HYBRID-SUSPEND (to DISK & to RAM)'
      40. Apr 19 00:42:01 omv logger: autoshutdown[12778]: WARN: ' LOADAVERAGECHECK is set to false'
      41. Apr 19 00:42:01 omv logger: autoshutdown[12778]: WARN: ' Ignoring LOADAVERAGE'
      42. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' ------------------------------------------------------'
      43. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Reading NICs ,IPs, ...'
      44. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' NIC 'bond0' not found, skipping 'bond0''
      45. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' NIC 'eth0' found: try to get IP'
      46. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' _check_networkconfig(): Run: #1: IP-Adress found'
      47. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' 'eth0' has IP: 192.168.0.10'
      48. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' NIC 'eth1' not found, skipping 'eth1''
      49. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Pinglist deleted'
      50. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: '---------------- script started ----------------------'
      51. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' 5 test cycles until shutdown is issued.'
      52. Apr 19 00:42:01 omv logger: autoshutdown[12778]: INFO: ' Waiting 5 min until the first check'
      Display All


      This is the autoshutdown.log. As you can see, the last active host (me) went offline at around 00:00, 5 cycles after ~00:30 (00:41:03 in this case) autoshutdown issues the "pm-hibernate" command.
      Then the machine reboots! and the autoshutdown script is started again (00:42:01) goes 5 cycles, as nothing is online etc. and then issues another "pm-hibernate", this time the machine stays in hibernation until it is woken the next day.

      Source Code: syslog.log

      1. Apr 19 00:39:01 omv CRON[11918]: (root) CMD ( [ -x /usr/lib/php5/sessionclean ] && /usr/lib/php5/sessionclean)
      2. Apr 19 00:41:03 omv autoshutdown.sh[28068]: - : autoshutdown [28068]: INFO: Shutdown issued: 'pm-hibernate'
      3. Apr 19 00:41:03 omv - : autoshutdown [28068]: INFO: Shutdown issued: 'pm-hibernate'
      4. Apr 19 00:41:03 omv systemd[1]: Expecting device dev-disk-by\x2duuid-6f943a1d\x2d6cb0\x2d4b11\x2da069\x2dc4650010a4f0.device...
      5. Apr 19 00:41:03 omv systemd[1]: Starting Run anacron jobs...
      6. Apr 19 00:41:03 omv systemd[1]: Started Run anacron jobs.
      7. Apr 19 00:41:03 omv anacron[12514]: Anacron 2.3 started on 2017-04-19
      8. Apr 19 00:41:03 omv anacron[12514]: Will run job `cron.daily' in 5 min.
      9. Apr 19 00:41:03 omv anacron[12514]: Jobs will be executed sequentially
      10. Apr 19 00:41:03 omv systemd[1]: Stopping Run anacron jobs...
      11. Apr 19 00:41:03 omv systemd[1]: Stopped Run anacron jobs.
      12. Apr 19 00:41:03 omv autoshutdown [12650]: hibernate/suspend: autoshutdown-script stop from /etc/pm/sleep.d/autoshutdown-restart
      13. Apr 19 00:42:01 omv kernel: [68209.738105] PM: Syncing filesystems ...
      14. Apr 19 00:42:01 omv kernel: [68209.748603] done.
      Display All
      In the syslog you can see autoshutdown puts an info (00:41:03) that pm-hibernate has been issued.
      At 00:41:03 it shuts down after calling the stop function from the /etc/pm/sleep.d/autoshutdown-restart script (which is for logging purposes as far as i can tell).

      This happens consistently.

      Can anyone help me find the reason for the rebooting ?
    • This is can be caused by a couple of things:

      - bios: try updating your bios. acpi implementation on some systems is bad
      - bios settings: some bios settings can effect and they are usually acpi related.
      omv 4.1.8.2 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.9
      omv-extras.org plugins source code and issue tracker - github.com/OpenMediaVault-Plugin-Developers

      Please read this before posting a question.
      Please don't PM for support... Too many PMs!