| View previous topic :: View next topic |
| Author |
Message |
Princess Nell Guru


Joined: 15 Apr 2005 Posts: 470
|
Posted: Sun Nov 11, 2012 11:19 pm Post subject: What's going on with dnsmasq? |
|
|
While trying to figure out why NetworkManager is so horribly slow, I came across another tool that's behaving in funny ways. Any explanations?
| Code: |
localhost ~ # /etc/init.d/dnsmasq stop
* Stopping dnsmasq ...
* start-stop-daemon: 1 process refused to stop
* Failed to stop dnsmasq [ !! ]
* ERROR: dnsmasq failed to stop
localhost ~ # grep dnsmasq /var/log/messages|tail -2
Nov 11 23:11:16 jeanie /etc/init.d/dnsmasq[7788]: start-stop-daemon: 1 process refused to stop
Nov 11 23:11:16 jeanie /etc/init.d/dnsmasq[7780]: ERROR: dnsmasq failed to stop
localhost ~ #
|
The changes to the default config are quite limited.
| Code: |
domain-needed
bogus-priv
resolv-file=/etc/dnsmasq-resolv.conf
interface=lo
conf-file=/etc/dnsmasq-conf.conf
|
It is possible this only started with version 2.63, but I don't remember when exactly I noticed this first. |
|
| Back to top |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Mon Nov 12, 2012 6:33 am Post subject: |
|
|
I can't replicate the error. It stops and starts fine for me. I'm using 2.63.
See what happens when you try:
| Code: | | /etc/init.d/dnsmasq --nodeps stop |
_________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
depontius Advocate

Joined: 05 May 2004 Posts: 2163
|
Posted: Mon Nov 12, 2012 1:37 pm Post subject: |
|
|
I've been having troubles with dnsmasq on one of my home systems. The problems appear to be intermittent, but they really drive mythbackend nuts. For the time being, I've shut it down on that system. I'm still using it on other systems with no problems. I haven't had time to diagnose further or debug. _________________ .sigs waste space and bandwidth |
|
| Back to top |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Mon Nov 12, 2012 7:30 pm Post subject: |
|
|
I've been using it to manage a two-subnet LAN for four years without any problems. I've never considered using it on a single end-user machine. _________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
Princess Nell Guru


Joined: 15 Apr 2005 Posts: 470
|
Posted: Mon Nov 12, 2012 8:13 pm Post subject: |
|
|
I've used it for years without problems, this is recent.
Once I've kill -KILL'd dnsmasq, I can start, stop and restart it with no problems. But the behaviour I described is somehow related to the interaction with (the train wreck that is) NetworkManager. E.g. when I open, use and close a vpn connection through NM, it becomes un-stoppable after.
| Code: |
Nov 12 20:01:52 loalhost dnsmasq[11179]: using nameserver 192.168.1.254#53
Nov 12 20:01:52 loalhost NetworkManager[3001]: <info> Clearing nscd hosts cache.
Nov 12 20:01:52 loalhost NetworkManager[3001]: <info> VPN plugin state changed: started (4)
Nov 12 20:01:52 loalhost dbus[2950]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)
Nov 12 20:01:52 loalhost dbus[2950]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Nov 12 20:01:53 loalhost ntpd[3395]: Listen normally on 10 tun0 172.16.123.45 UDP 123
Nov 12 20:01:53 loalhost ntpd[3395]: 46.51.185.173 interface 192.168.1.20 -> 172.16.123.45
Nov 12 20:01:53 loalhost ntpd[3395]: 46.137.159.146 interface 192.168.1.20 -> 172.16.123.45
Nov 12 20:01:53 loalhost ntpd[3395]: 193.1.193.157 interface 192.168.1.20 -> 172.16.123.45
Nov 12 20:01:53 loalhost ntpd[3395]: 134.226.32.57 interface 192.168.1.20 -> 172.16.123.45
Nov 12 20:01:53 loalhost ntpd[3395]: peers refreshed
Nov 12 20:01:57 loalhost NetworkManager[3001]: <info> Policy set 'Auto eth0' (eth0) as default for IPv4 routing and DNS.
Nov 12 20:01:57 loalhost NetworkManager[3001]: <info> ((null)): writing resolv.conf to /sbin/resolvconf
Nov 12 20:02:02 loalhost /etc/init.d/dnsmasq[11279]: start-stop-daemon: 1 process refused to stop
Nov 12 20:02:02 loalhost /etc/init.d/dnsmasq[11273]: ERROR: dnsmasq failed to stop
Nov 12 20:02:02 loalhost dnsmasq[11179]: reading /etc/dnsmasq-resolv.conf
Nov 12 20:02:02 loalhost dnsmasq[11179]: using nameserver 192.168.1.254#53
|
|
|
| Back to top |
|
 |
depontius Advocate

Joined: 05 May 2004 Posts: 2163
|
Posted: Mon Nov 12, 2012 8:19 pm Post subject: |
|
|
My main use has been to redirect DNS requests when my VPN to my employer is active. Regular DNS is a rather either/or kind of thing, either I can resolve my LAN or my work network. With dnsmasq I can get both. _________________ .sigs waste space and bandwidth |
|
| Back to top |
|
 |
truc Advocate


Joined: 25 Jul 2005 Posts: 3188
|
Posted: Mon Nov 12, 2012 8:59 pm Post subject: |
|
|
Did you check your configuration with: | Code: | | sudo dnsmasq --test | , the problem you're having may not be a syntax error, so try to start dnsmasq manually in debug mode(no daemon, stderr logging, no fork and so on)
HTH _________________ The End of the Internet! |
|
| Back to top |
|
 |
Princess Nell Guru


Joined: 15 Apr 2005 Posts: 470
|
Posted: Tue Nov 13, 2012 8:48 am Post subject: |
|
|
It passes the syntax check.
Running it in debug mode, vpn fails, no matter whether launched through NM or vpnc directly, and there is no output after the attempt to launch vpn. /var/log/messages says:
| Code: |
Nov 13 08:42:48 localhost NetworkManager[3001]: <warn> /sys/devices/virtual/net/tun0: couldn't determine device driver; ignoring...
|
Interesting. I have no idea why NM gets involved even when I run vpnc directly. |
|
| Back to top |
|
 |
truc Advocate


Joined: 25 Jul 2005 Posts: 3188
|
Posted: Tue Nov 13, 2012 11:18 am Post subject: |
|
|
So dnsmasq started correctly right? if the problem is not solved, it's probably wise to start all over again and explain what your problem really is, cause, you've just started dnsmasq in debug mode and the only output you showed in your post was something unrelated to dnsmasq. We can't really help you here! _________________ The End of the Internet! |
|
| Back to top |
|
 |
Princess Nell Guru


Joined: 15 Apr 2005 Posts: 470
|
Posted: Tue Nov 13, 2012 8:53 pm Post subject: |
|
|
| Running dnsmasq in debug mode gives me no additional information. When I run dnsmasq in debug mode and attempt to use vpn, vpn doesn't work, and all I get is the log I posted. |
|
| Back to top |
|
 |
mirekm Apprentice


Joined: 12 Feb 2004 Posts: 156 Location: Gliwice
|
Posted: Thu Nov 15, 2012 4:21 pm Post subject: |
|
|
If you use NetworkManager, why start dnsmasq via rc script?
Just remove the dnsmasq from your runlevels, and edit file
/etc/NetworkManager/NetworkManager.conf
Put in it following contents:
[main]
dns=dnsmasq
And then after restat, NetworkManager will start/stop dnsmasq by itself on activation/deactivation of connection. |
|
| Back to top |
|
 |
BoneKracker Veteran


Joined: 14 Mar 2006 Posts: 1499 Location: U.S.A.
|
Posted: Thu Nov 15, 2012 4:56 pm Post subject: |
|
|
A better question might be "why use NetworkManager, at all?"  _________________ Oldthinkers unbellyfeel INGSOC.
-- Headline of a document on Winston Smith's terminal in his cubicle at the Ministry of Truth, seen briefly in the background in one scene of the movie rendition of Nineteen Eighty-Four. |
|
| Back to top |
|
 |
Princess Nell Guru


Joined: 15 Apr 2005 Posts: 470
|
Posted: Fri Nov 16, 2012 10:58 pm Post subject: |
|
|
That's a good point.
I switched to it a few years back for the convenience of having easy access to all networking functions on the desktop. Unfortunately, in the past year or so, it seems design decisions have been made in the software that, at least for me, had detrimental impact on my system. If there was a feature-compatible replacement, I'd certainly give it a try. |
|
| Back to top |
|
 |
Hypnos Advocate


Joined: 18 Jul 2002 Posts: 2768 Location: Omnipresent
|
Posted: Sat Nov 17, 2012 1:49 am Post subject: |
|
|
I have been using wicd quite effectively since switching from GNOME to XFCE a few years back. It handles Ethernet and WiFi, which is all I need. _________________ Personal overlay | Simple backup scheme |
|
| Back to top |
|
 |
|