Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 239846 - net-dns/pdns-recursor - Fatal: Unable to connect to remote '/var/lib/powerdnspdns_recursor.controlsocket': Connection refused
Summary: net-dns/pdns-recursor - Fatal: Unable to connect to remote '/var/lib/powerdns...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-05 07:49 UTC by Dan Reidy
Modified: 2008-10-07 23:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Reidy 2008-10-05 07:49:47 UTC
both stable, and unstable versions of pdns_recursor seem to be attempting to use the socket path '/var/lib/powerdnspdns_recursor.controlsocket'. The correct path for the socket is '/var/lib/powerdns/pdns_recursor.controlsocket'

Reproducible: Always

Steps to Reproduce:
1.emerge -v pdns_recursor
2./etc/init.d/precursor start (ok)
3./etc/init.d/precursor (stop|ping) (fail due to invalid socket path)

Actual Results:  
you have to manually kill the process and then zap it, if you wish to stop or restart pdns_recursor


gentoo hardened 2.0.0
Comment 1 Dan Reidy 2008-10-05 08:02:30 UTC
example test usage:
mercury ~ # rec_control ping
Fatal: Unable to connect to remote '/var/lib/powerdnspdns_recursor.controlsocket': Connection refused
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2008-10-05 19:30:43 UTC
It's our own patching that created this bug. Here is the fix:

Index: pdns-recursor-3.1.6.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/pdns-recursor-3.1.6.ebuild,v
retrieving revision 1.5
diff -u -B -r1.5 pdns-recursor-3.1.6.ebuild
--- pdns-recursor-3.1.6.ebuild  4 Aug 2008 19:03:18 -0000       1.5
+++ pdns-recursor-3.1.6.ebuild  5 Oct 2008 19:30:09 -0000
@@ -23,7 +23,7 @@

        epatch "${FILESDIR}"/${P}-gcc-4.3.patch

-       sed -i -e s:/var/run/:/var/lib/powerdns: "${S}"/config.h || die
+       sed -i -e s:/var/run/:/var/lib/powerdns/: "${S}"/config.h || die
 }

 src_compile() {
Index: pdns-recursor-3.1.7.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/pdns-recursor-3.1.7.ebuild,v
retrieving revision 1.2
diff -u -B -r1.2 pdns-recursor-3.1.7.ebuild
--- pdns-recursor-3.1.7.ebuild  28 Jun 2008 12:10:34 -0000      1.2
+++ pdns-recursor-3.1.7.ebuild  5 Oct 2008 19:30:09 -0000
@@ -25,7 +25,7 @@
 src_unpack() {
        unpack ${A}

-       sed -i -e s:/var/run/:/var/lib/powerdns: "${S}"/config.h || die
+       sed -i -e s:/var/run/:/var/lib/powerdns/: "${S}"/config.h || die
 }

 src_compile() {
Comment 3 Sven Wegener gentoo-dev 2008-10-06 08:29:28 UTC
(In reply to comment #1)
> example test usage:
> mercury ~ # rec_control ping
> Fatal: Unable to connect to remote
> '/var/lib/powerdnspdns_recursor.controlsocket': Connection refused

host ~ # /etc/init.d/precursor start
 * Starting PowerDNS Recursor ...                                         [ ok ]
host ~ # /etc/init.d/precursor ping
 * Pinging PowerDNS Recursor ...                                          [ ok ]
host ~ # rec_control ping
pong
host ~ # /etc/init.d/precursor stop
 * Stopping PowerDNS Recursor ...                                         [ ok ]

Well, works for me. In your example it clearly says "Connection refused" and not "No such file or directory", so the path is actually correct, but there's no process listening on the socket. See:

host ~ # /etc/init.d/precursor stop
 * Stopping PowerDNS Recursor ...                                         [ ok ]
host ~ # rec_control ping
Fatal: Unable to connect to remote '/var/lib/powerdnspdns_recursor.controlsocket': Connection refused

It more looks like your recursor isn't properly running. In the end it's just an error in the error message, which I've fixed up, all other cases automatically put a slash in there.
Comment 4 Dan Reidy 2008-10-07 23:12:25 UTC
Thank you for taking the time to read my bug-report and providing a fix.