Autoshutdown: No valid network interface found

  • Hello Everybody


    I have a problem with the autoshutdown. In the dashboard it shows green at Enabled but it has e red point on Running. I have this problem since i changed the network from ethernet to bridge.

    In the logs it shows this error:

    ERR: '_check_networkconfig(): No valid network interface found, exiting ...'


    I tried to restart the whole autoshutdown and also the NAS but it all doesn't worket.


    Can someone help me with this problem?


    Thank you,

    Schmedi

    • Offizieller Beitrag

    The VM works now fine but autoshutdown not

    This is the problem when a change like this is made it can effect other functionality, I am assuming the error is looking an interface like eth0 which the bridge it not, I'll tag the guide creator ryecoaaron he might have an idea.

    • Offizieller Beitrag

    he might have an idea.

    Nope. nrand has been making lots of improvements. If he doesn't post here, file an issue - https://github.com/OpenMediaVa…vault-autoshutdown/issues

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Hi bride interface are not well supported at present, but does not mean they should not be. Currently the script allows interfaces starting with en,eth,wlan,bond or usb. I suspect your bridge start brXXX. There are a couple of way to fix this.


    The script has a expert setting: FORCE_NIC which you can set so the script can be forced to use the bride interface (see /etc/autoshudown.default for more details). However, a more robust solution assuming you are using a bridge interface starting ‘br’ is to amend the script, which is supper easy. you what to look at line 1130 of /usr/sbin/autoshutdown”


    local -r net_ifaces="${FORCE_NIC:-"en,eth,wlan,bond,usb"}"


    Change it to the below (assuming you using a standard bridge name):


    local -r net_ifaces="${FORCE_NIC:-"en,eth,wlan,bond,usb,br"}"


    The above change should make the script check the bridge interface and validate it. If the above script change work please rase a bug at: https://github.com/OpenMediaVa…enmediavault-autoshutdown with the details and I add it to the next release.


    It this dose not work please post details of you bride set-up and I debug further

  • Schmedi

    Hat das Label gelöst hinzugefügt.
  • Hello Everybody,


    I have the same problem, but I did not check anything in my config. It occured after an update of OMV-Autoshutdown few days ago.


    After every resume from suspend the autoshutdown-service is in error state:


    Code
    root: INFO: '_check_networkconfig(): Finding available network interfaces and their IPv4 addresses'
    root: ERR: '_check_networkconfig(): No valid network interface found, exiting ...'


    Neither the Option FORCE_NIC="enp2s0" solved the problem nor the change from #8 in autoshutdown:

    local -r net_ifaces="${FORCE_NIC:-"en,eth,wlan,bond,usb,br"}"


    Also a reinstall of OMV-Autoshutdown (5.1.9) did not help.


    So autoshutdown is only working once and then in error state.


    Anyone else having the issue ?

  • Hello everybody,


    me too, I have exactly the same problem. I use OMV 5.5.23-1 and the version of the autoshutdown plugin is also 5.1.9.


    A few days ago (still with version 5.1.7) I noticed that the NAS was not shut down. I haven't changed anything in the configuration. The shutdown only worked again when I entered SHUTDOWNCOMMAND = "systemctl suspend" in the expert settings.


    But then only once, when starting via WOL, the red button for the autoshutdown plugin appeared in the dashboard and the log file read: "No valid network interface found, exiting ..."

    The NAS will then work with all functions, but will no longer shut down.


    I tried both solutions from # 8, but neither worked for me. For me the network card is called "enp3s0".
    I would be very happy if I could get a tip for this.


    Many thanks and best regards

  • Hi, can you set you logging to VERBOSE in the GUI for autoshutdown and post the part of the log just before the error occurs. It should look something similar to below:


    DEBUG: '_check_networkconfig(): Network interfaces: enp2s0'

    DEBUG: '_check_networkconfig(): Network interfaces status: up'

    DEBUG: '_check_networkconfig(): Network interfaces IPv4 address: XXX.XXX.XXX.XXX'

    DEBUG: '_check_networkconfig(): Network interfaces address valid: true'

    INFO: '_check_networkconfig(): 'enp2s0' has IPv4 address: XXX.XXX.XXX.XXX'


    I need to know your network interface status when the error occurs. As I suspect I am missed a state change. As this bit of the script was made more strict in the last few changes.

  • You are right, chris_km, I changed the option to


    FORCE_NIC="enp3s0, eth0, eth1"


    and it works without a problem. :)


    By the way, I don't exaxtly know what nrand means with "VERBOSE" but here is the part of the log just before the error occurs:


  • I need the script in DEBUG mode, putting the script into "verbose mode" will turn on the DEBUG and show how it is scanning the network interfaces. without this I cannot tell why it not working. I am also suspired the above fix works so I missing something. It may help having DEBUG log with the fix and without the fix also.


    To turn on debug in the GUI got to "Syslog Configuration" and turn on the tab "Verbose Mode" without this I cannot fix the real issue.

  • OK, I found the verbose mode for the log, sorry. Here is the part after waking up via WOL (before I forced the NAS to sleep with the command "systemctl suspen"):


    Then I saw that the NAS did not shut down during the night although I made the entry FORCE_NIC = "enp3s0, eth0, eth1" in the expert settings.


    The log file says:



    My IP range includes the IPs 23,26,29,30,31,34,35,201. But so far the NAS had never checked for the address 127.0.0. * only for the area I was using.

    I'm slowly not looking through any more, I claim that this behavior only occurred when I added the entry to FORCE_NIC. After all, this led to the plugin continuing to run but now referring to the IPs in the range 127.0.0. *.

  • for me it still works. No error on startup after suspend:



    But I also updated autoshutdown to 5.1.10 wich was available yesterday evening...

  • Hi ok is see what going on:


    After suspend your network interface is stating it is down, the relevant bit form the log:

    DEBUG: '_check_networkconfig(): Network interfaces status: down


    The script will avoid running on any network interface that is not in state: unknown, dormant or up.


    I suspect the script is invoking before the network interface has been brought back from the suspend fully. The next thing to know is does the network interface ever go back to the supported states. To know this is need one last pace of information for you both. Once the system has recovered from a suspend (i.e. you can log into the OMV via ssh or such like) what is the output of:


    cat /sys/class/net/<interface name>/operstate

    where:

    <interface name> = enp3s0, or relevant network interface


    If you can get the output of the above after a suspend then I will rework the code to fix this.


    FYI: This this is the change that is effecting you: https://github.com/OpenMediaVa…c3064ab36dd41392c496d0dcb


    For the odd state being seen when you set : FORCE_NIC="enp2s0, eth0, eth1", there are a few issues presenting:

    1. The above is invalid as it is set to, <value><comma><space><value> the space is incorrect and need to be removed.

    2 There no validation in the script currently for FORCE_NIC (I will fix this)

    3. The regex filter for find network interfaces is a bit too lose also and add to the odd behaviour (I will tighten this up)


    Hopefully as soon as you post the output of the cat i be able to work out a fix for you both

  • Interesting. After I deleted the spaces like you advised in FORCE_NIC I‘m having the problem again.


    cat...openstate for my enp2s0 says „up“. So the interface should be working after resume.


    This is the log output:


  • hi, it possible to try this form me. I hope it will fix the suspend issues.


    Do the following:

    $ sudo vi /lib/systemd/system-sleep/autoshutdown-restart


    Change the post as follows:


    Code
    13     post)
    14         ( sleep 30 &&
    15           if systemctl is-enabled --quiet autoshutdown.service &&
    16              ! systemctl is-active --quiet autoshutdown.service; then
    17                  systemctl --no-block start autoshutdown.service
    18                  logger -t "autoshutdown[${$}]" -p "syslog.info" \
    19                      "${USER}: INFO: 'autoshutdown-restart(): Autoshutdown starting'"
    20           fi ) &
    21         ;;


    $ sudo systemctl daemon-reload


    Then see if this work. It should delay the restart of the service.


    Please let me know if this works

    .

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!