Results 1 to 3 of 3

Thread: Wi-Fi card when managed by /etc/network/interfaces gives an error "cannot create /dev/stderr"

  1. #1
    Join Date
    2019-Apr
    Posts
    2

    Wi-Fi card when managed by /etc/network/interfaces gives an error "cannot create /dev/stderr"

    Hello,

    Am using,

    Distributor ID: Kali
    Description: Kali GNU/Linux Rolling
    Release: 2019.2

    with kernel,

    4.19.0-kali5-686-pae #1 SMP Debian 4.19.37-2kali1 (2019-05-15) i686 GNU/Linux

    I was previously using network-manager on this machine and had no issues with both my LAN card and Wi-Fi card (Complete network access). For finer grained control I switched to using /etc/network/interfaces. Here is my configuration

    cat /etc/network/interfaces
    Code:
    source /etc/network/interfaces.d/*
    
    
    auto lo
    iface lo inet loopback
    
    
    auto eth0
    iface eth0 inet dhcp        
    
    
    auto wlan0
    allow-hotplug wlan0
    iface wlan0 inet dhcp
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    Am getting an error
    /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such device or address
    This happens when I run
    Code:
    systemctl restart networking.service
    . Even after a reboot when I display
    Code:
    systemctl status networking.service
    the error is still present as per below

    Code:
    systemctl status networking.service
    ● networking.service - Raise network interfaces
    Loaded: loaded (/lib/systemd/system/networking.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Wed 2019-05-22 08:42:26 EAT; 2h 17min ago
    Docs: man:interfaces(5)
    Process: 348 ExecStart=/sbin/ifup -a --read-environment (code=exited, status=1/FAILURE)
    Main PID: 348 (code=exited, status=1/FAILURE)


    May 22 08:42:19 gate dhclient[395]: DHCPACK of 192.168.37.147 from 192.168.37.1
    May 22 08:42:19 gate ifup[348]: DHCPACK of 192.168.37.147 from 192.168.37.1
    May 22 08:42:20 gate dhclient[395]: bound to 192.168.37.147 -- renewal in 20857 seconds.
    May 22 08:42:20 gate ifup[348]: bound to 192.168.37.147 -- renewal in 20857 seconds.
    May 22 08:42:26 gate ifup[348]: /etc/network/if-pre-up.d/wpasupplicant: 120: /etc/network/if-pre-up.d/wpasupplicant: cannot create /dev/stderr: No such dev
    May 22 08:42:26 gate ifup[348]: run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
    May 22 08:42:26 gate ifup[348]: ifup: failed to bring up wlan0
    May 22 08:42:26 gate systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
    May 22 08:42:26 gate systemd[1]: networking.service: Failed with result 'exit-code'.
    May 22 08:42:26 gate systemd[1]: Failed to start Raise network interfaces.
    As can be seen the LAN card comes up fine but the Wi-Fi card fails.

    I can start the Wi-Fi card manually by

    1.
    Code:
    wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf
    2.
    Code:
     dhclient wlan0
    Its just that I wanted to automate this across reboots or shutdowns and run into the above issue while doing this.

    Further research led me upstream to bugs https://bit.ly/2JCWBXp and https://bit.ly/2wcTsVm

    These seem identical to my issue only problem is that the proposed solutions in them don't work in my case. In one case it seems the concerned file /etc/network/if-pre-up.d/wpasupplicant has changed since the bug was reported and in the other case renaming the start-stop-daemon doesnt work and I suspect it might break a few things later on.

    Any pointers or suggestions?

    Regards
    Kysh

  2. #2
    Join Date
    2014-Feb
    Posts
    309
    Someone was in the IRC channel and ran into a similar issue (perhaps it was you?)

    The second link you have there, the 2wcTsVm, has a patch at the very bottom - this should be applied to /etc/wpa_supplicant/functions.sh at least, that fixed it for the person on IRC who reported it, could you also try it and report back? You could also send an email to that Debian bug and report that that patch fixes the issue, assuming it does after you test.

  3. #3
    Join Date
    2019-Apr
    Posts
    2
    @steev: Yes it was me :-)

    I did not apply the patch but rather edited the /etc/wpa_supplicant/functions.sh and made the change manually which worked for me.

    With regards to the Debian bug am not sure whether it still exists on Debian Stretch. Can someone with access to Debian stretch check this? That we we can see whether its only existent in Kali Rolling.

Similar Threads

  1. Replies: 2
    Last Post: 2023-04-12, 10:27
  2. Hostapd + "Device Not Managed"
    By Juicyrito in forum General Archive
    Replies: 1
    Last Post: 2015-08-30, 18:21

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •