Giter Club home page Giter Club logo

Comments (20)

AlexMei98 avatar AlexMei98 commented on May 22, 2024 1

Hi~ We meet this problem when we try to set udhcp in our ubuntu 16.04. We find that our network setup after udhcp loading, then the udhcp connot find network device and throw a error then exited.

So we try to load the udhcp after network configuration.

in /etc/init.d/udhcpd add a line

Required-Start: $network

Maybe this could help someone with the same trouble :)

from rachelpios.

mattneel avatar mattneel commented on May 22, 2024

Could you post the output of (as root):

cat /var/log/syslog | grep udhcpd

Should shed some light on why udhcpd isn't starting correctly.

from rachelpios.

needlestack avatar needlestack commented on May 22, 2024

Thanks for the pointer! The output - this includes the messages during inital boot, rachel install, and a manual stop/start by me:

Mar  9 18:45:54 raspberrypi systemd[1]: Starting LSB: Start busybox udhcpd at boot time...
Mar  9 18:45:54 raspberrypi udhcpd[7646]: udhcpd: Disabled. Edit /etc/default/udhcpd to enable it.
Mar  9 18:45:54 raspberrypi systemd[1]: Started LSB: Start busybox udhcpd at boot time.
Mar  9 18:46:10 raspberrypi systemd[1]: Started LSB: Start busybox udhcpd at boot time.
Mar 10 17:06:48 raspberrypi systemd[1]: Stopping LSB: Start busybox udhcpd at boot time...
Mar 10 17:06:48 raspberrypi udhcpd[26218]: Stopping very small Busybox based DHCP server: No /usr/sbin/udhcpd found running; none killed.
Mar 10 17:06:48 raspberrypi udhcpd[26218]: udhcpd.
Mar 10 17:06:48 raspberrypi systemd[1]: Stopped LSB: Start busybox udhcpd at boot time.
Mar 10 17:06:50 raspberrypi systemd[1]: Starting LSB: Start busybox udhcpd at boot time...
Mar 10 17:06:50 raspberrypi udhcpd[26255]: Starting very small Busybox based DHCP server: udhcpd.
Mar 10 17:06:50 raspberrypi systemd[1]: Started LSB: Start busybox udhcpd at boot time.
Mar 10 17:06:50 raspberrypi udhcpd[26259]: udhcpd (v1.22.1) started
Mar 10 17:06:50 raspberrypi udhcpd[26259]: max_leases=235 is too big, setting to 189
Mar 10 17:06:50 raspberrypi udhcpd[26259]: can't open '/var/lib/misc/udhcpd.leases': No such file or directory

There's already a few things I see there I can look into, which I will do now. Further advice is also appreciated.

from rachelpios.

needlestack avatar needlestack commented on May 22, 2024

Maybe this is more helpful - just the messages post boot:

Mar 10 17:12:53 raspberrypi systemd[1]: Stopping LSB: Start busybox udhcpd at boot time...
Mar 10 17:12:53 raspberrypi udhcpd[26259]: Received SIGTERM
Mar 10 17:12:53 raspberrypi udhcpd[26407]: Stopping very small Busybox based DHCP server: Stopped /usr/sbin/udhcpd (pid 26259).
Mar 10 17:12:53 raspberrypi udhcpd[26407]: udhcpd.
Mar 10 17:13:02 rachel systemd[1]: Starting LSB: Start busybox udhcpd at boot time...
Mar 10 17:13:02 rachel udhcpd[363]: Starting very small Busybox based DHCP server: udhcpd.
Mar 10 17:13:02 rachel udhcpd[387]: udhcpd (v1.22.1) started
Mar 10 17:13:02 rachel udhcpd[387]: max_leases=235 is too big, setting to 189
Mar 10 17:13:02 rachel udhcpd[387]: is interface wlan0 up and configured?: Cannot assign requested address
Mar 10 17:13:02 rachel systemd[1]: Started LSB: Start busybox udhcpd at boot time.

from rachelpios.

mattneel avatar mattneel commented on May 22, 2024

Okay, if this is post boot, then something is explicitly stopping the udhcpd service, as evidenced by the first message.

from rachelpios.

mattneel avatar mattneel commented on May 22, 2024

If I had to guess, I'd say this is happening because wlan0 isn't up and configured by the time udhcpd is trying to start.

from rachelpios.

needlestack avatar needlestack commented on May 22, 2024

Possibly related: when I run ifconfig, it does show wlan0, but with a different IP address than expected - it's supposed to be 10.10.10.10 but comes up as 169.254.131.32 which looks self-assigned to me.

I'm still green with the details of linux network configuration - thanks for your help.

from rachelpios.

mattneel avatar mattneel commented on May 22, 2024

I'll review the network configuration and play with things. Worst case scenario is to maybe add a post-up line to /etc/network/interfaces to restart udhcpd everytime wlan0 comes up.

from rachelpios.

mattneel avatar mattneel commented on May 22, 2024

Can confirm udhcpd is having an issue because wlan0 is not configured correctly at the time of boot.
If you manually set the wlan0 address (ifconfig wlan0 10.10.10.10) and restart udhcpd (service udhcpd restart) everything functions as expected (also got it working on a TP-Link TL-WN725N adapter, will play with dynamically gathering wifi driver during installation soon).

Investigating why our /etc/network/interfaces configuration is not being honored now.

from rachelpios.

needlestack avatar needlestack commented on May 22, 2024

Any new insights? I'm about to dig into this and wanted to check if you made any headway first...

from rachelpios.

mattneel avatar mattneel commented on May 22, 2024

Haven't had the time lately to play with things on-device. It may be something internal to Raspbian's network handling (this reminds me of NetworkManager taking over settings in Ubuntu).

from rachelpios.

j-schwartz avatar j-schwartz commented on May 22, 2024

I think we need to edit /etc/network/interfaces to replace (if it exists) "iface wlan0 inet dhcp" to (or add):

iface wlan0 inet static
address 10.10.10.10
netmask 255.255.255.0

This should assign the static IP 10.10.10.10 at boot.

We will also need to comment out the following lines if they exist:

allow-hotplug wlan0
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet manual

I don't have a clean version to test this on right now, just trying to read through the github. My script is running though so I should be able to confirm in the next 30 minutes or so.

from rachelpios.

j-schwartz avatar j-schwartz commented on May 22, 2024

Nevermind... this appears to be correctly set currently.

from rachelpios.

j-schwartz avatar j-schwartz commented on May 22, 2024

I screwed up this most recent image testing, but I'm wondering how terrible it would be to just throw:

ifconfig wlan0 10.10.10.10
service udhcpd restart

in etc/rc.local

from rachelpios.

j-schwartz avatar j-schwartz commented on May 22, 2024

the above seems to work for now. Obviously, I want to figure out what is going on, but given a deadline here, I think we throw

ifconfig wlan0 10.10.10.10
service udhcpd restart

in /etc/rc.local

I will have Norberto look on Friday

from rachelpios.

needlestack avatar needlestack commented on May 22, 2024

Plenty good enough for now - I've added this to installer.py and it seems to work great!

from rachelpios.

j-schwartz avatar j-schwartz commented on May 22, 2024

norberto is going to investigate over the weekend to get a better long-term fix. There are some pi additions such as our UPS with instructions to copy a new etc/rc.local so leaving these instructions there is tenuous.

from rachelpios.

fredecuador avatar fredecuador commented on May 22, 2024

I traced a similar issue on my Rachel pi setup back to ifplugd. The solution for me was to edit /etc/default/ifplugd and remove the references to wlan0. I also placed 'auto wlan0' in /etc/network/interfaces just above 'iface wlan0 inet static'.

from rachelpios.

needlestack avatar needlestack commented on May 22, 2024

Thanks for the suggestion - I will give this a try on my next build

from rachelpios.

needlestack avatar needlestack commented on May 22, 2024

Since we do have a workaround in place, I have marked this as an enhancement

from rachelpios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.