Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What's going on with dnsmasq?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Princess Nell
Guru
Guru


Joined: 15 Apr 2005
Posts: 535

PostPosted: Sun Nov 11, 2012 11:19 pm    Post subject: What's going on with dnsmasq? Reply with quote

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
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1566
Location: U.S.A.

PostPosted: Mon Nov 12, 2012 6:33 am    Post subject: Reply with quote

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

_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 2584

PostPosted: Mon Nov 12, 2012 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1566
Location: U.S.A.

PostPosted: Mon Nov 12, 2012 7:30 pm    Post subject: Reply with quote

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.
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
Princess Nell
Guru
Guru


Joined: 15 Apr 2005
Posts: 535

PostPosted: Mon Nov 12, 2012 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
depontius
Advocate
Advocate


Joined: 05 May 2004
Posts: 2584

PostPosted: Mon Nov 12, 2012 8:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Mon Nov 12, 2012 8:59 pm    Post subject: Reply with quote

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)
Code:
sudo dnsmasq -d


HTH
_________________
The End of the Internet!
Back to top
View user's profile Send private message
Princess Nell
Guru
Guru


Joined: 15 Apr 2005
Posts: 535

PostPosted: Tue Nov 13, 2012 8:48 am    Post subject: Reply with quote

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
View user's profile Send private message
truc
Advocate
Advocate


Joined: 25 Jul 2005
Posts: 3199

PostPosted: Tue Nov 13, 2012 11:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Princess Nell
Guru
Guru


Joined: 15 Apr 2005
Posts: 535

PostPosted: Tue Nov 13, 2012 8:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
mirekm
Apprentice
Apprentice


Joined: 12 Feb 2004
Posts: 158
Location: Gliwice

PostPosted: Thu Nov 15, 2012 4:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1566
Location: U.S.A.

PostPosted: Thu Nov 15, 2012 4:56 pm    Post subject: Reply with quote

A better question might be "why use NetworkManager, at all?" :P
_________________
pjp wrote:
I didn't misquote you, I just misunderstood you.
Back to top
View user's profile Send private message
Princess Nell
Guru
Guru


Joined: 15 Apr 2005
Posts: 535

PostPosted: Fri Nov 16, 2012 10:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2868
Location: Omnipresent

PostPosted: Sat Nov 17, 2012 1:49 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
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