Autoshutdown-Plugin not working under OMV v4 and Debian Stretch with 4.12 kernel

    • OMV 4.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • If I could, I would, but I'm just a normal user with no programming experience. I detect a bug and post, like 90% of the users in this forum do (and with 90% of the forums in the www).
      I do use OMV v4 otherwise I wouldn't have found this issue. Sorry, but your post couldn't help me furhter
      OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 4x3TB WD Red's Snapraid w/ mergerfs, 2x DVB-S2 card DVBSky s952v3,

      OMV-Server-SW: Debian Stretch with 4.15.x-Backports-Kernel (always up-to-date), OMV 4.1.x (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Virtualbox (with DSM 6.1.x), PlexMediaServer, SMB-Shares, TVHeadendServer (unstable release)

      BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2
    • Huberer wrote:

      this plugin is not ready for OMV v4.
      The reason it is in the repos is for testing since OMV 4.x is in testing. The only person really maintaining the plugin is me and I don't use it and have no way to test it. I'm not sure how I can fix it.
      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!
    • It's a pity that you're the only one.
      What I found out in the meantime is, that the script can't read the setting from the ethernet-card correct.


      Source Code

      1. root@HomeServer:/# ifconfig enp0s25
      2. enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      3. inet 192.168.1.200 netmask 255.255.255.0 broadcast 192.168.1.255
      4. ether XX:XX:XX:XX:XX:XX txqueuelen 1000 (Ethernet)
      5. RX packets 7652 bytes 2366551 (2.2 MiB)
      6. RX errors 0 dropped 6 overruns 0 frame 0
      7. TX packets 19918 bytes 10111130 (9.6 MiB)
      8. TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
      9. device interrupt 20 memory 0xf7d00000-f7d20000
      10. root@HomeServer:/#
      Display All
      But I've no clue how to fix it or where to start
      OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 4x3TB WD Red's Snapraid w/ mergerfs, 2x DVB-S2 card DVBSky s952v3,

      OMV-Server-SW: Debian Stretch with 4.15.x-Backports-Kernel (always up-to-date), OMV 4.1.x (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Virtualbox (with DSM 6.1.x), PlexMediaServer, SMB-Shares, TVHeadendServer (unstable release)

      BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2
    • @ryecoaaron

      Did you merge the pull request from @yo1frenchtoast into the auto shutdown-script? I found them approx. one hour ago but now they're gone. By looking closer I could find them in the code.
      I can say that these codes are working.

      There was another fix according to port scanning or similar. This one I can't find any more because it was also posted together with the pull request. Maybe you also added this fix to the script.

      I've also seen that you added the fix from @tkaiser. This one is also working perfect.

      So, it looks that ASD is now ready for OMV v4.

      Thank you @ryecoaaron, @tkaiser and @yo1frenchtoast for helping in this matter to get the Autoshutdown-Plugin working perfect for OMV v4/Debian 9

      @yo1frenchtoast
      I've seen on your GitHub-side for ASD that you're still using the "old"-ethernet-card-naming at line 1180 (look at here). This is good for OMV v3 but not for OMV v4. Maybe you also update this issue so that you won't face any problems when you upgrade.
      OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 4x3TB WD Red's Snapraid w/ mergerfs, 2x DVB-S2 card DVBSky s952v3,

      OMV-Server-SW: Debian Stretch with 4.15.x-Backports-Kernel (always up-to-date), OMV 4.1.x (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Virtualbox (with DSM 6.1.x), PlexMediaServer, SMB-Shares, TVHeadendServer (unstable release)

      BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2
    • Huberer wrote:

      Did you merge the pull request from @yo1frenchtoast into the auto shutdown-script?
      Yes. I also pushed the latest version of the plugin to the OMV 4.x repo.
      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!
    • I am testing ASD right now with OMV 4, but it is complaining about a syntax error for FORCE_NIC.

      /usr/sbin/autoshutdown.sh: Zeile 1155: Syntaxfehler beim unerwarteten Wort `|'
      /usr/sbin/autoshutdown.sh: Zeile 1155: ` [[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| {'

      i thought it should not check for FORCE_NIC on stretch.

      And one more thing, i think on line 1153 a bracket missing? (wheezy|jessie), but this did not fix it anyway.
    • You're right but don't have much time yet. Replace these lines from 1151-1163

      Source Code

      1. # Check $FORCE_NIC env only on wheezy/jessie since starting with stretch 'predictable interface names' make regex a bit unpredictable
      2. case ${lsb_release -cs) in
      3. wheezy|jessie)
      4. if [ ! -z "$FORCE_NIC" ]; then
      5. [[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| {
      6. _log "WARN: Invalid parameter format: FORCE_NIC"
      7. _log "WARN: You set it to '$FORCE_NIC', which is not a correct syntax. It has to match '[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}'"
      8. _log "WARN: with spaces between every NIC: e.g. \"eth1 wlan0 usb3 eth1.2\""
      9. _log "WARN: Unsetting FORCE_NIC"
      10. unset FORCE_NIC; }
      11. fi
      12. ;;
      13. esac
      Display All
      with these ones

      Source Code

      1. # FORCE_NIC
      2. if [ ! -z "$FORCE_NIC" ]; then
      3. [[ "$FORCE_NIC" =~ ^([a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}|[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})+( [a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,})*$ ]]|| {
      4. _log "WARN: Invalid parameter format: FORCE_NIC"
      5. _log "WARN: You set it to '$FORCE_NIC', which is not a correct syntax. It has to match '[a-z]{3,}[0-9]{1}\.{0,1}[0-9]{0,}'"
      6. _log "WARN: with spaces between every NIC: e.g. \"eth1 wlan0 usb3 eth1.2\""
      7. _log "WARN: Unsetting FORCE_NIC"
      8. unset FORCE_NIC; }
      9. fi
      and everything should work (at least for me)
      Don't know what happened here.
      OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 4x3TB WD Red's Snapraid w/ mergerfs, 2x DVB-S2 card DVBSky s952v3,

      OMV-Server-SW: Debian Stretch with 4.15.x-Backports-Kernel (always up-to-date), OMV 4.1.x (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Virtualbox (with DSM 6.1.x), PlexMediaServer, SMB-Shares, TVHeadendServer (unstable release)

      BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2
    • br41n wrote:

      And one more thing, i think on line 1153 a bracket missing? (wheezy|jessie), but this did not fix it anyway.
      There was a bracket instead of a parentheses. Fixed in 4.0.1 in repo now.
      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!
    • @ryecoaaron

      Just tested the upgrade. Everything works like expected. Thanks for fixing it :thumbup: Great job
      OMV-Server-HW: MoBo Fujitsu D3417-B2 (Intel-LAN), Intel Xeon E3-1245 v6 Kaby Lake (4x3.70GHz), 16GB-Ram ECC UDIMM, 1x512GB SSD Samsung 850 Pro (sda2 - 30GB system, 4GB swap, sda5/rest - for work), 4x3TB WD Red's Snapraid w/ mergerfs, 2x DVB-S2 card DVBSky s952v3,

      OMV-Server-SW: Debian Stretch with 4.15.x-Backports-Kernel (always up-to-date), OMV 4.1.x (always latest), omv-extras-plugin (always latests), AutoShutdown-Plugin, Virtualbox (with DSM 6.1.x), PlexMediaServer, SMB-Shares, TVHeadendServer (unstable release)

      BackupServer: Synology DS1010+ with 4GB Ram, 9TB@SHR (different hdd's), DSM 5.2-5967-2
    • Hi,
      I want to follow this threat and report a seemingly different issue with autoshutdown (4.02).
      I have just made a fresh install of OMV4 and everything seems to work smoothly, with the exeption of autoshutdown.
      Whenever I start the service, it exits after a few minutes with the following lines found in syslog:

      Source Code

      1. Dec 29 09:37:46 TINE autoshutdown.sh[2214]: /usr/sbin/autoshutdown.sh: line 1199: ifconfig: command not found
      2. Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Main process exited, code=exited, status=1/FAILURE
      3. Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Unit entered failed state.
      4. Dec 29 09:37:46 TINE systemd[1]: autoshutdown.service: Failed with result 'exit-code'.
      Any advice on this? As I said, apart from that OMV is running great and I can live without autoshutdown.
      Thanks for the great work,
      T.
    • tobimaus wrote:

      Any advice on this?
      Install net-tools... apt-get install net-tools The plugin needs to be ported to use the iproute commands.
      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!
    • tobimaus wrote:

      Just another observation: autoshutdown seems to log into "boot" not into "syslog"
      It uses /usr/bin/logger and logs to both since the boot log gets its info from systemd and the syslog log gets its info from /var/log/syslog. If you want to try, just do: logger test
      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!
    • ryecoaaron wrote:

      tobimaus wrote:

      Just another observation: autoshutdown seems to log into "boot" not into "syslog"
      It uses /usr/bin/logger and logs to both since the boot log gets its info from systemd and the syslog log gets its info from /var/log/syslog. If you want to try, just do: logger test
      I tried to logger test and wrote inside "boot". There is some way to correct this behavoir of autoshutdown?
      Intel G4400 - Asrock H170M Pro4S - 8GB ram - 2x4TB WD RED in RAID1 - ZFS Mirror 2x6TB Seagate Ironwolf
      OMV 4.1.4 - Kernel 4.14 backport 3 - omvextrasorg 4.1.2
    • Blabla wrote:

      There is some way to correct this behavoir of autoshutdown?
      The plugin would probably have to be change to not use logger. Not real high on priority list right now.
      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!
    • Users Online 1

      1 Guest