Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
start/stop services with dhcpcd
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 8:52 am    Post subject: Reply with quote

charles17 wrote:
UberLord wrote:
Have you compiled your kernel with wireless extensions? http://wiki.gentoo.org/wiki/Wifi
I had not, but after recompiling the kernel with CONFIG_CFG80211_WEXT=y it finally works.
May I propose this should be mentioned at the beginning of this guide because the old setup using net-misc/netifrc does not need wext compatibility.


The latest dhcpcd in my Fossil repository no longer needs CONFIG_CFG80211_WEXT=y set in the kernel.
Testers welcome before the next release :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Wed Sep 10, 2014 12:07 pm    Post subject: Reply with quote

UberLord wrote:
The latest dhcpcd in my Fossil repository ...

was compiling well but could no longer be started during and after next reboot :-(
Code:
dhcpcd           | * Starting DHCP Client Daemon ...
dhcpcd           | * start-stop-daemon: failed to start `/sbin/dhcpcd'
dhcpcd           | * Failed to start dhcpcd
dhcpcd           | * ERROR: dhcpcd failed to start
So for the moment I had to go back to 6.4.3 :-(
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 12:28 pm    Post subject: Reply with quote

Can you re-try emerging dhcpcd-9999 please? And post the full compile output as well please.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Wed Sep 10, 2014 12:43 pm    Post subject: Reply with quote

Done, pls see pastebin.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 1:07 pm    Post subject: Reply with quote

Can I ask you to run it under valgrind quickly if it still fails? It might catch a memory error

sudo valgrind dhcpcd -dB
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Wed Sep 10, 2014 2:08 pm    Post subject: Reply with quote

Code:
==1520== Memcheck, a memory error detector
==1520== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==1520== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info
==1520== Command: dhcpcd -dB
==1520==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind: 
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
valgrind: 
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind: 
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind: 
valgrind:  Cannot continue -- exiting now.  Sorry.
:-( So what would I need to install?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 2:14 pm    Post subject: Reply with quote

Put this in /etc/portage/package.env
Code:
sys-libs/glibc  debug.conf


And this in /etc/portage/env/debug.conf
Code:
FLAGS="${CFLAGS} -ggdb"
CXXFLAGS="${CXXFLAGS} -ggdb"
FEATURES="splitdebug"


And emerge glibc
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Wed Sep 10, 2014 3:38 pm    Post subject: Reply with quote

UberLord wrote:
sudo valgrind dhcpcd -dB
The output is in pastebin.
HTH.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 3:50 pm    Post subject: Reply with quote

Hmmm, I need more, sorry

Put this in /etc/portage/package.env
Code:
net-misc/dhcpcd  debug.conf


Re-emerge dhcpcd re-test under valgrind please, hopefully there will be more debug to play with :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Wed Sep 10, 2014 4:26 pm    Post subject: Reply with quote

UberLord wrote:
Re-emerge dhcpcd re-test under valgrind please, hopefully there will be more debug to play with :)
Next pastebin but not very much different :-(
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 4:28 pm    Post subject: Reply with quote

It's perfect as it shows where in dhcpcd it's failing.
I'll see if I can fix this promptly.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 4:37 pm    Post subject: Reply with quote

Fixed here hopefully:
http://roy.marples.name/projects/dhcpcd/ci/b9e8ea02f33c44e83927d09fd24b014c7c8f0334?sbs=0

Let me know!
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Wed Sep 10, 2014 5:19 pm    Post subject: Reply with quote

UberLord wrote:
Fixed here hopefully:
http://roy.marples.name/projects/dhcpcd/ci/b9e8ea02f33c44e83927d09fd24b014c7c8f0334?sbs=0

Almost. Startup works but dhcpcd stays "inactive", does not turn "started".
Again some valgrinded output.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 5:51 pm    Post subject: Reply with quote

Fixed here:
http://roy.marples.name/projects/dhcpcd/ci/cf0c457f5ea7b3c06789f18ea903f4ebcca77c14?sbs=0

Basically the absence of the SSID attribute just means that the interface is not associated - it's not an error, but I was treating it as such.
Hopefully you're all up and running now :) Let me know!
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Wed Sep 10, 2014 6:28 pm    Post subject: Reply with quote

UberLord wrote:
Hopefully you're all up and running now :) Let me know!
Yes, this time it works, comes up at boot and correctly starts/stops fetchmail.
I will do some more tests for ntpd (net-misc/ntp) later.

EDIT
Regarding ntpd the problem remains as described in bug #52206, regardless if I set rc_ntpd_need="dhcpcd" or or rc_need="net"
wrote:
# /etc/conf.d/ntpd

# Options to pass to the ntpd process
# Most people should leave this line alone ...
# however, if you know what you're doing, feel free to tweak
NTPD_OPTS="-g -u ntp:ntp"

# Need net will caause it wait for dhcpcd
# rc_need="net"
rc_ntpd_need="dhcpcd"
It simply changes its process id and continues running, sometimes even with 2 process ids.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 8:06 pm    Post subject: Reply with quote

charles17 wrote:
UberLord wrote:
Hopefully you're all up and running now :) Let me know!
Yes, this time it works, comes up at boot and correctly starts/stops fetchmail.
I will do some more tests for ntpd (net-misc/ntp) later.



:)

So dhcpcd now supports nl80211 correctly.

Quote:

EDIT
Regarding ntpd the problem remains as described in bug #52206, regardless if I set rc_ntpd_need="dhcpcd" or or rc_need="net"
wrote:
# /etc/conf.d/ntpd

# Options to pass to the ntpd process
# Most people should leave this line alone ...
# however, if you know what you're doing, feel free to tweak
NTPD_OPTS="-g -u ntp:ntp"

# Need net will caause it wait for dhcpcd
# rc_need="net"
rc_ntpd_need="dhcpcd"
It simply changes its process id and continues running, sometimes even with 2 process ids.


To be clear to our readers, this is a different issue :)

I actually added the need in a different way. I'll test my recommended way and I'll get back.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 10, 2014 8:32 pm    Post subject: Reply with quote

This works fine for me.

Can you post the output of /etc/init.d/ntpd ineed?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Thu Sep 11, 2014 10:52 am    Post subject: Reply with quote

UberLord wrote:
charles17 wrote:
UberLord wrote:
Hopefully you're all up and running now :) Let me know!
Yes, this time it works, comes up at boot and correctly starts/stops fetchmail.
I will do some more tests for ntpd (net-misc/ntp) later.



:)

So dhcpcd now supports nl80211 correctly.

Wanted to test this after recompiling my kernel without WEXT. But cannot get it to work anymore, not even dhcpcd-6.4.3. Turns out that somehow I've lost my /etc/conf.d/dhcpcd.

Could you please post me that file? Why isn't it in portage?


Last edited by charles17 on Thu Sep 11, 2014 7:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 11, 2014 10:59 am    Post subject: Reply with quote

Eh? dhcpcd doesn't ship /etc/conf.d/dhcpcd - all the config is in /etc/dhcpcd.conf which is shipped.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Thu Sep 11, 2014 11:41 am    Post subject: Reply with quote

Sorry for confusion. I am now on 9999 and kernel has WEXT disabled. Wired connection works fine stopping and restarting the services but wireless doesn't work at all.

When unplugging the cable, dhcpcd turns and stays [inactive] even though "ps -A | grep wpa" shows that wpa_supplicant is running.

EDIT
My dhcpcd.conf is default without changes. Anything to adjust here?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 11, 2014 2:35 pm    Post subject: Reply with quote

I've extensively tested this and made the following change:
http://roy.marples.name/projects/dhcpcd/ci/1cd31e40f9d880fa59cebb5d298eaeb3662b9b46?sbs=0

On my dual interface Gentoo box, simulated by issuing "ifconfig eth0 down" rather than pulling cables or unplugging the AP.

wired up, wireless up == all started
wired up, wireless down == all started
wired down, wireless down == dhcpcd inactive and net dependant services scheduled
wired down, wireless up == all started
wired down, wireless down == dhcpcd inactive and net dependant services scheduled
wired up, wireless down == all started
wired up, wireless up == all started


Please note that wpa_supplicant will remain running at all times so it can attempt to bring the wireless interface back up by associating with an AP.
dhcpcd will never stop it.

Does this match what you see?
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Thu Sep 11, 2014 5:29 pm    Post subject: Reply with quote

No, it's another problem.
Code:
$ su -c "ifconfig wlp8s0 up"
Password:
SIOCSIFFLAGS: Operation not possible due to RF-kill

$ /usr/sbin/rfkill list
0: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: yes

And the button stopped working. I have to check what's wrong here.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Sep 11, 2014 5:35 pm    Post subject: Reply with quote

Well the software thinks the hardware off button on your wireless is on..
If it's off, well good luck fixing it!

For the time being I'll consider your dhcpcd issue solved until I hear back :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Thu Sep 11, 2014 6:28 pm    Post subject: Reply with quote

UberLord wrote:
For the time being I'll consider your dhcpcd issue solved until I hear back :)
Thanks for all your help and for investing your time!!
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3685

PostPosted: Thu Sep 11, 2014 9:35 pm    Post subject: Reply with quote

UberLord wrote:

:)

So dhcpcd now supports nl80211 correctly.

Sorry to say, no. I've got my rfkill issues solved and did several tests, without WEXT and with.

With WEXT enabled everything works perfectly. Dependant services are stopped when wireless is rfkilled or when the access point goes down, and they get restarted when connection is back. Wireless interface goes down when eth0 is plugged and comes up again when unplugged.

With WEXT disabled in the kernel, the wireless interface (according to "ifconfig -a") is up when unplugged and not rfkilled and wpa_gui shows the interface but does not connect. In "rc-config show" dhcpcd remains "[inactive]".

I'm looking forward to your next release in portage, regardless if needs wext or not.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum