LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-28-2018, 03:22 AM   #1
/dev/dog
Member
 
Registered: Nov 2014
Location: US
Distribution: Debian
Posts: 39

Rep: Reputation: 0
Question DHCP Seems to Stop Working Every 5-10 Minutes


The problem is that my connection to the internet keeps getting screwed up every 5-10 minutes. I stay connected to my router, and I can still ping 8.8.8.8, but I cannot go to any websites. The solution I have found is to run
Code:
$ sudo dhclient
and it works again for the next 5-10 minutes. That is the only basis I am using to claim this is a problem with my DHCP client stopping.

Output after executing the above command:
Code:
dog@lapdog:~$ sudo dhclient
\RTNETLINK answers: File exists
autofs: unrecognized service
Starting fetch-ldap-cert (via systemctl): fetch-ldap-cert.service.
Another source of information:
Code:
dog@lapdog:~$ cat /var/log/messages
Dec 28 03:35:01 lapdog debian-edu-update-netblock: making sure netblock is disabled
Dec 28 03:35:34 lapdog autofs-reload: reloading autofs from dhcp exit hook
Dec 28 03:40:01 lapdog debian-edu-update-netblock: making sure netblock is disabled
Dec 28 03:42:27 lapdog autofs-reload: reloading autofs from dhcp exit hook
Dec 28 03:45:01 lapdog debian-edu-update-netblock: making sure netblock is disabled
Dec 28 03:45:39 lapdog autofs-reload: reloading autofs from dhcp exit hook
Dec 28 03:50:01 lapdog debian-edu-update-netblock: making sure netblock is disabled
Dec 28 03:51:19 lapdog autofs-reload: reloading autofs from dhcp exit hook
Dec 28 03:55:01 lapdog debian-edu-update-netblock: making sure netblock is disabled
Dec 28 03:56:12 lapdog autofs-reload: reloading autofs from dhcp exit hook
Dec 28 04:00:01 lapdog debian-edu-update-netblock: making sure netblock is disabled
The message "autofs-reload: reloading autofs from dhcp exit hook" corresponds to each time I had to run my fix.

Last edited by /dev/dog; 12-28-2018 at 03:50 AM. Reason: clarified a few things
 
Old 12-28-2018, 03:31 AM   #2
/dev/dog
Member
 
Registered: Nov 2014
Location: US
Distribution: Debian
Posts: 39

Original Poster
Rep: Reputation: 0
Lightbulb

Right after I created the thread, I realized that the line "debian-edu-update-netblock: making sure netblock is disabled" occurs at the first second of every 5 minutes. I checked my crontabs and I found this:

Code:
dog@lapdog:~$ cat /etc/cron.d/debian-edu-config 
# Only dry-run cfengine cron job until we know it is safe to run on an installed
# system [pere 2003-08-30]
# Disable until it no longer run in "installation" mode. [pere 2003-09-01]
#9 4	* * *	root	if [ -x /usr/bin/cfengine-debian-edu ]; then /usr/bin/cfengine-debian-edu -n; fi
#
# Check every 5 minutes if network blocking should be enabled or disabled
*/5 * * * *	root	if [ -x /usr/sbin/debian-edu-update-netblock ]; then /usr/sbin/debian-edu-update-netblock auto > /dev/null; fi
I commented it out and now I will wait to see if it drops again.

EDIT: Solution did not work, internet still keeps not working. But at least those messages aren't showing up anymore in /var/log/messages. As a side not, is that important to keep?

I guess I should have first checked if my dhcp client is actually not running when I get the problems. That will be the next step when it screws up again.

Last edited by /dev/dog; 12-28-2018 at 03:38 AM. Reason: It didn't work
 
Old 12-28-2018, 03:49 AM   #3
/dev/dog
Member
 
Registered: Nov 2014
Location: US
Distribution: Debian
Posts: 39

Original Poster
Rep: Reputation: 0
Post

Code:
dog@lapdog:~$ sudo service dhcp status
● dhcp.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)
However, even after I do the fix I found and I am able to use the internet again, the above still appears.

Code:
dog@lapdog:~$ sudo ps -Awl | grep dhclient
1 S     0   643     1  0  80   0 -  6350 -      ?        00:00:00 dhclient
(There are more than one of the above output but I only included one, the only difference between all of them is the PID)

Last edited by /dev/dog; 12-28-2018 at 03:52 AM. Reason: typo
 
Old 12-28-2018, 11:26 PM   #4
/dev/dog
Member
 
Registered: Nov 2014
Location: US
Distribution: Debian
Posts: 39

Original Poster
Rep: Reputation: 0
Smile Resolvconf Issue

I think I found a suitable fix. At first I tried putting in my crontabs
Code:
* * * * * sudo dhclient
But I would occasionally find myself with my internet being screwed up again in the last 5-15 seconds of every minute. So then I also added
Code:
* * * * * ( sleep 30 ; sudo dhclient)
Which was working for me, but it was such a hacky solution that I wasn't satisfied. So I added Google's nameservers (8.8.8.8, and 8.8.4.4) to my /etc/resolvconf/resolv.conf.d/tail and removed the cron jobs and now it's all working. No problems in the last hour.

I am still not sure what was causing the problems, or if my /etc/resolv.conf kept being emptied, and a call to dhclient would solve the problem by repopulating the file, but it's solved now.

Thanks for all your help

Last edited by /dev/dog; 12-28-2018 at 11:28 PM. Reason: grammar
 
  


Reply

Tags
debian, dhcp, dhcp dhclient, internet, networking



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
IPSEC seems to stop working on every server I try causing to restart the service guntanemo Linux - Software 2 01-22-2018 08:57 PM
[SOLVED] X takes 1.5 minutes to start xterm and 3.5 minutes to start GNOME gregorian Linux - Newbie 16 12-25-2009 05:56 AM
Screensaver restart my Mandriva Linux every 5 minutes. How to stop it? hansprawira Linux - Newbie 2 03-15-2007 05:27 PM
Sysstat drops a message in /var/log/messages every 10 minutes... how to stop this? zan_messengrr Linux - General 2 11-15-2006 09:40 AM
DHCP clients issue DHCPREQUEST every 15 minutes abyss Linux - Enterprise 3 04-05-2006 08:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:22 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