Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #178567 > unrolled thread
| Started by | Clark Wang <dearvoid@gmail.com> |
|---|---|
| First post | 2017-03-08 08:30 +0100 |
| Last post | 2017-03-13 06:10 +0100 |
| Articles | 8 — 4 participants |
Back to article view | Back to linux.debian.user
Why 2 dhclient processes running for eth0 (IPv4)? Clark Wang <dearvoid@gmail.com> - 2017-03-08 08:30 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Clark Wang <dearvoid@gmail.com> - 2017-03-10 12:00 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? <tomas@tuxteam.de> - 2017-03-10 12:40 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? <tomas@tuxteam.de> - 2017-03-10 14:40 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-03-10 14:40 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? <tomas@tuxteam.de> - 2017-03-10 14:30 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Jonathan Dowland <jmtd@debian.org> - 2017-03-10 14:30 +0100
Re: Why 2 dhclient processes running for eth0 (IPv4)? Clark Wang <dearvoid@gmail.com> - 2017-03-13 06:10 +0100
| From | Clark Wang <dearvoid@gmail.com> |
|---|---|
| Date | 2017-03-08 08:30 +0100 |
| Subject | Why 2 dhclient processes running for eth0 (IPv4)? |
| Message-ID | <tiEcN-38Q-13@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
See following output from my system (Debian 8.6):
root@debian:~# cat /etc/debian_version
8.6
root@debian:~# pgrep -af dhc
506 dhclient -v -pf /run/dhclient.eth1.pid -lf
/var/lib/dhcp/dhclient.eth1.leases eth1
447 dhclient -v -pf /run/dhclient.eth0.pid -lf
/var/lib/dhcp/dhclient.eth0.leases eth0
601 dhclient -v -pf /run/dhclient.eth0.pid -lf
/var/lib/dhcp/dhclient.eth0.leases eth0
664 dhclient -6 -pf /run/dhclient6.eth0.pid -lf
/var/lib/dhcp/dhclient6.eth0.leases eth0
root@debian:~# grep -n -C3 eth0 /etc/network/interfaces
7-auto lo
8-iface lo inet loopback
9-
10:allow-hotplug eth0
11:iface eth0 inet dhcp
12:iface eth0 inet6 dhcp
13- accept_ra 1
14-
15-allow-hotplug eth1
root@debian:~#
There are 2 `dhclient` processes running for `eth0` (IPv4). Rebooting does
not help for me.
Thanks.
[toc] | [next] | [standalone]
| From | Clark Wang <dearvoid@gmail.com> |
|---|---|
| Date | 2017-03-10 12:00 +0100 |
| Message-ID | <tjqr7-2Qu-3@gated-at.bofh.it> |
| In reply to | #178567 |
[Multipart message — attachments visible in raw view] — view raw
2017-03-08 15:24 GMT+08:00 Clark Wang <dearvoid@gmail.com>: > See following output from my system (Debian 8.6): > > root@debian:~# cat /etc/debian_version > 8.6 > root@debian:~# pgrep -af dhc > 506 dhclient -v -pf /run/dhclient.eth1.pid -lf > /var/lib/dhcp/dhclient.eth1.leases eth1 > 447 dhclient -v -pf /run/dhclient.eth0.pid -lf > /var/lib/dhcp/dhclient.eth0.leases eth0 > 601 dhclient -v -pf /run/dhclient.eth0.pid -lf > /var/lib/dhcp/dhclient.eth0.leases eth0 > 664 dhclient -6 -pf /run/dhclient6.eth0.pid -lf > /var/lib/dhcp/dhclient6.eth0.leases eth0 > root@debian:~# grep -n -C3 eth0 /etc/network/interfaces > 7-auto lo > 8-iface lo inet loopback > 9- > 10:allow-hotplug eth0 > 11:iface eth0 inet dhcp > 12:iface eth0 inet6 dhcp > 13- accept_ra 1 > 14- > 15-allow-hotplug eth1 > root@debian:~# > > There are 2 `dhclient` processes running for `eth0` (IPv4). Rebooting does > not help for me. > Anyone else has the same problem?
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2017-03-10 12:40 +0100 |
| Message-ID | <tjr3Q-3kY-29@gated-at.bofh.it> |
| In reply to | #178641 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Mar 10, 2017 at 06:58:30PM +0800, Clark Wang wrote: [...] > Anyone else has the same problem? No. At least not if I don't provoke it :-) You could gather some hints by looking into /var/log/daemon.log (dhclient's mumblings are there) and/or by having a look at /proc/<dhclient's PID>/fd. Also, more "w" in the ps: ps wwwwauxf | less then search for dhclient. wider command line, parent-child relationships as additional hints. Good luck - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAljCj0oACgkQBcgs9XrR2kZARQCfTjU7tYxFBy3NK8MO8z1+JLmK QsoAn3wdX5JTDdbN/vAB6UZB13wmVp9l =79a+ -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2017-03-10 14:40 +0100 |
| Message-ID | <tjsW0-4FY-71@gated-at.bofh.it> |
| In reply to | #178642 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Mar 10, 2017 at 08:31:10AM -0500, Greg Wooledge wrote: > On Fri, Mar 10, 2017 at 12:34:34PM +0100, tomas@tuxteam.de wrote: > > Also, more "w" in the ps: > > > > ps wwwwauxf | less > > >From ps(1): > > w Wide output. Use this option twice for unlimited width. > > You never need more than two. Habit acquired back then (really back then, you don't want to know :) Old habits die hard. Thanks for the clarification. - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAljCq34ACgkQBcgs9XrR2kYX0gCfYtvu+UDzEmro57CuGrtacPBj rMoAn278Opk262O2olQioUz0D51BfjQC =63C5 -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2017-03-10 14:40 +0100 |
| Message-ID | <tjsW0-4FY-73@gated-at.bofh.it> |
| In reply to | #178642 |
On Fri, Mar 10, 2017 at 12:34:34PM +0100, tomas@tuxteam.de wrote:
> Also, more "w" in the ps:
>
> ps wwwwauxf | less
>From ps(1):
w Wide output. Use this option twice for unlimited width.
You never need more than two.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2017-03-10 14:30 +0100 |
| Message-ID | <tjsMh-4Ar-11@gated-at.bofh.it> |
| In reply to | #178641 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Mar 10, 2017 at 01:23:36PM +0000, Jonathan Dowland wrote: > On Fri, Mar 10, 2017 at 06:58:30PM +0800, Clark Wang wrote: > > > There are 2 `dhclient` processes running for `eth0` (IPv4). Rebooting does > > > not help for me. > > > > > > > Anyone else has the same problem? > > I think I have sometimes seen this, but I do not know what provokes it. The most > likely explanation is installing more than one network management system and/or > leaving more than one configured. So for example I have had ifupdown and wicd both > attempt to manage interfaces. > > If you look at the parent PID for the dhclient instances, you might get some clues. > (ps -eaf --forest for example, or pstree(1)) I was tempted to propose that too, but mine daemonizes and becomes init's child (ifupdown, don't know what other network managers do). Regards - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAljCqZwACgkQBcgs9XrR2kYLlACfWY3HLojGwlC9Wsa2+TnUzjVW micAn3mgTQaOTBfpp3NqZ/vFkZUTQ77A =bPJL -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Dowland <jmtd@debian.org> |
|---|---|
| Date | 2017-03-10 14:30 +0100 |
| Message-ID | <tjsMh-4Ar-13@gated-at.bofh.it> |
| In reply to | #178641 |
[Multipart message — attachments visible in raw view] — view raw
On Fri, Mar 10, 2017 at 06:58:30PM +0800, Clark Wang wrote: > > There are 2 `dhclient` processes running for `eth0` (IPv4). Rebooting does > > not help for me. > > > > Anyone else has the same problem? I think I have sometimes seen this, but I do not know what provokes it. The most likely explanation is installing more than one network management system and/or leaving more than one configured. So for example I have had ifupdown and wicd both attempt to manage interfaces. If you look at the parent PID for the dhclient instances, you might get some clues. (ps -eaf --forest for example, or pstree(1)) -- Jonathan Dowland Please do not CC me, I am subscribed to the list.
[toc] | [prev] | [next] | [standalone]
| From | Clark Wang <dearvoid@gmail.com> |
|---|---|
| Date | 2017-03-13 06:10 +0100 |
| Message-ID | <tkqp4-3Rm-9@gated-at.bofh.it> |
| In reply to | #178567 |
[Multipart message — attachments visible in raw view] — view raw
2017-03-08 15:24 GMT+08:00 Clark Wang <dearvoid@gmail.com>:
> See following output from my system (Debian 8.6):
>
> root@debian:~# cat /etc/debian_version
> 8.6
> root@debian:~# pgrep -af dhc
> 506 dhclient -v -pf /run/dhclient.eth1.pid -lf
> /var/lib/dhcp/dhclient.eth1.leases eth1
> 447 dhclient -v -pf /run/dhclient.eth0.pid -lf
> /var/lib/dhcp/dhclient.eth0.leases eth0
> 601 dhclient -v -pf /run/dhclient.eth0.pid -lf
> /var/lib/dhcp/dhclient.eth0.leases eth0
> 664 dhclient -6 -pf /run/dhclient6.eth0.pid -lf
> /var/lib/dhcp/dhclient6.eth0.leases eth0
> root@debian:~# grep -n -C3 eth0 /etc/network/interfaces
> 7-auto lo
> 8-iface lo inet loopback
> 9-
> 10:allow-hotplug eth0
> 11:iface eth0 inet dhcp
> 12:iface eth0 inet6 dhcp
> 13- accept_ra 1
> 14-
> 15-allow-hotplug eth1
> root@debian:~#
>
> There are 2 `dhclient` processes running for `eth0` (IPv4). Rebooting does
> not help for me.
>
Thanks all for pointing me to the debug direction.
I moved /sbin/dhclient to /sbin/dhclient.bin and rewrite /sbin/dhclient as
a shell script which would call /sbin/dhclient.bin and prints some proc
hierarchy info. It turned out both /etc/init.d/networking and systemd would
call ifup. See following example (only for IPv4):
==== Sun Mar 12 21:38:08 PDT 2017 ====
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 433 0.0 1.1 20052 2880 ? S 21:38 0:00 /bin/bash
/sbin/dhclient -v -pf /run/dhclient.eth0.pid -lf
/var/lib/dhcp/dhclient.eth0.leases eth0
systemd(1)-+-networking(285)---ifup(427)---sh(432)---dhclient(433)---pstree(441)
|-systemd-journal(160)
`-systemd-udevd(164)-+-systemd-udevd(167)
|-systemd-udevd(171)
|-systemd-udevd(172)
|-systemd-udevd(173)
|-systemd-udevd(174)
|-systemd-udevd(175)
|-systemd-udevd(176)
|-systemd-udevd(177)
|-systemd-udevd(178)
`-systemd-udevd(179)
==== Sun Mar 12 21:38:10 PDT 2017 ====
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 518 0.0 1.1 20052 2920 ? S 21:38 0:00 /bin/bash
/sbin/dhclient -v -pf /run/dhclient.eth0.pid -lf
/var/lib/dhcp/dhclient.eth0.leases eth0
systemd(1)-+-dhclient.bin(457)
|-ifup(509)---sh(517)---dhclient(518)---pstree(522)
|-nfs-common(512)---nfs-common(523)
|-systemd-journal(160)
`-systemd-udevd(164)-+-systemd-udevd(167)
|-systemd-udevd(171)
|-systemd-udevd(172)
|-systemd-udevd(173)
|-systemd-udevd(174)
|-systemd-udevd(175)
|-systemd-udevd(176)
|-systemd-udevd(177)
|-systemd-udevd(178)
`-systemd-udevd(179)
I know nothing about systemd so I disabled the "networking" service with
"sysv-rc-conf" but then network would not be up after reboot. So how can I
make sure only "systemd" or the "networking" service would bring network up?
-clark
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web