LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2008, 02:06 PM   #1
mystic drifter
LQ Newbie
 
Registered: May 2008
Location: London, UK
Distribution: Ubuntu 8.04
Posts: 2

Rep: Reputation: 0
Network restarting problem


Hi everyone,

Everytime when i need to 'refresh' my network interface, i do a restart on /etc/init.d/networking but now this command just simply won't work anymore and I have to force DHCP by doing a
$ sudo dhclient eth0

However, after a reboot, eth0 will still automatically getting a dynamically assigned IP address, but ONLY after rebooting the system.

Here're some output from various checking (in order) :

andrea@luna:~$ sudo /etc/init.d/networking restart
[sudo] password for andrea@luna:
* Reconfiguring network interfaces... RTNETLINK answers: No such process
There is already a pid file /var/run/dhclient.eth0.pid with pid 8446
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit h ttp://w ww.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:15:c5:c0:bd:e8
Sending on LPF/eth0/00:15:c5:c0:bd:e8
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.200.1 port 67
There is already a pid file /var/run/dhclient.eth0.pid with pid 134519072
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit h ttp://ww w.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:15:c5:c0:bd:e8
Sending on LPF/eth0/00:15:c5:c0:bd:e8
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
[ OK ]

andrea@luna:~$ cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

andrea@luna:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:15:c5:c0:bd:e8 brd ff:ff:ff:ff:ff:ff
inet 169.254.11.92/16 brd 169.254.255.255 scope link eth0:avahi
inet6 fe80::215:c5ff:fec0:bde8/64 scope link
valid_lft forever preferred_lft forever
3: wmaster0: <BROADCAST,MULTICAST> mtu 1500 qdisc ieee80211 qlen 1000
link/ieee802.11 00:18:de:94:30:0b brd ff:ff:ff:ff:ff:ff
4: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:18:de:94:30:0b brd ff:ff:ff:ff:ff:ff

andrea@luna:~$ sudo ifup eth0
There is already a pid file /var/run/dhclient.eth0.pid with pid 134519072
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http: //www .isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:15:c5:c0:bd:e8
Sending on LPF/eth0/00:15:c5:c0:bd:e8
Sending on Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

andrea@luna:~$ dhclient eth0
There is already a pid file /var/run/dhclient.pid with pid 8554
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit h ttp://w ww.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
can't create /var/lib/dhcp3/dhclient.leases: Permission denied
Can't create /var/run/dhclient.pid: Permission denied
drop_privileges: could not set group id: Operation not permitted
andrea@luna:~$ sudo !!
sudo dhclient eth0
There is already a pid file /var/run/dhclient.pid with pid 8554
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit ht tp://ww w.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:15:c5:c0:bd:e8
Sending on LPF/eth0/00:15:c5:c0:bd:e8
Sending on Socket/fallback
DHCPREQUEST of 192.168.200.142 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.200.142 from 192.168.200.1
bound to 192.168.200.142 -- renewal in 231 seconds.

The network restart command used to work like a charm but everytime after I directly connected a linux box to a router, I'll have problem restarting the network ($ sudo /etc/init.d/networking restart)

The first time it happened when I connected my desktop (on Gutsy) to a linksys router; and now, after I connected my laptop (Hardy) to a linux router.

Been doing an extensive google search but nothings good. any idea please, anyone?

Thanks in advance.
 
Old 07-11-2008, 02:34 PM   #2
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
What happens if you run
Code:
/etc/init.d/networking stop
(wait some time like 10-20 seconds)
/etc/init.d/networking start
For some reason it looks like the dhcpclient pid isn't getting cleared which to me seems like it isn't really stopping.

Let us know,

Forrest
 
Old 07-11-2008, 02:45 PM   #3
williebens
Member
 
Registered: Jan 2008
Posts: 88

Rep: Reputation: 16
Hello mystic drifter:

I would suggest you follow forrestt advice. However, it that does not do the work, then remove the respective pid file that is giving you this problem and then run the command again.

I had a similar problem with pid files trying to restart a mysql database.
This solved it.

Thanks.
--Willie
 
Old 07-11-2008, 05:35 PM   #4
mystic drifter
LQ Newbie
 
Registered: May 2008
Location: London, UK
Distribution: Ubuntu 8.04
Posts: 2

Original Poster
Rep: Reputation: 0
Hello forestt & willebens,

Thank you so much for the suggestions,
i've just done a quick check by running
Code:
 /etc/init.d/networking restart
from home and surprisingly it works!

output :
Code:
andrea@luna:~$ sudo /etc/init.d/networking restart
[sudo] password for andrea@luna:
 * Reconfiguring network interfaces...                                          There is already a pid file /var/run/dhclient.eth0.pid with pid 5663
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:15:c5:c0:bd:e8
Sending on   LPF/eth0/00:15:c5:c0:bd:e8
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.0.1 port 67
There is already a pid file /var/run/dhclient.eth0.pid with pid 134519072
Internet Systems Consortium DHCP Client V3.0.6
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

wmaster0: unknown hardware address type 801
wmaster0: unknown hardware address type 801
Listening on LPF/eth0/00:15:c5:c0:bd:e8
Sending on   LPF/eth0/00:15:c5:c0:bd:e8
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPOFFER of 192.168.0.4 from 192.168.0.1
DHCPREQUEST of 192.168.0.4 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.4 from 192.168.0.1
bound to 192.168.0.4 -- renewal in 127838 seconds.
                                                                         [ OK ]
Looks like i'll have to try it again on Monday when i'm back in office (Could it be the problem on the office server?)

to williebens: I tried removing the pid files before, but to no avail.

Anyway i'll try it again on Monday and let you know the result. Thank you~~
 
Old 08-12-2010, 12:24 AM   #5
nocknock
LQ Newbie
 
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
thanks

thanks for fixing my home server as well. and bump.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restarting Wireless Network bogzab Slackware 6 04-18-2008 02:47 PM
Restarting Network Behaviour itnaa Linux - Networking 3 07-09-2007 01:17 PM
Restarting Network Services In Suse treedstang SUSE / openSUSE 9 01-21-2005 10:33 AM
restarting my network linuxboy_inside Linux - Networking 3 01-06-2004 05:54 AM
Restarting network services Bull Terrier Slackware 2 12-15-2003 09:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration