Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 379475

Summary: www-apache/mod_dnssd - Avahi: "invalid host name" error, always uses "localhost" no matter what
Product: Gentoo Linux Reporter: Timothy Miller <theosib>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Timothy Miller 2011-08-16 21:33:01 UTC
I've been doing everything I could and researching this for hours, and I'm now starting to think that something is actually BROKEN.  As far as I can tell and as far as people on IRC can tell, I'm doing all the right things.  If I'm setting things up right, and it's still not working, then maybe there is a bug.

I'm trying to advertise my Apache server using Avahi, and to do that, I installed mod_dnssd, according to these instructions:
http://en.gentoo-wiki.com/wiki/Avahi#Apache

Diagnosing the problem, I came across this error from Apache:

[Tue Aug 16 16:42:12 2011] [error] avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name

However:

# hostname
compute0
# domainname
localdomain

My /etc/hosts:

127.0.0.1       localhost localhost.localdomain
::1             localhost6 localhost6.localdomain6
192.168.1.30    compute0 compute0.localdomain

I even have this in my /etc/apache2/httpd.conf:

ServerName "compute0.localdomain"

Here are some other references:
http://forums.gentoo.org/viewtopic-t-890900.html
http://0pointer.de/lennart/projects/mod_dnssd/
http://us.generation-nt.com/answer/bug-368486-mod-dnssd-hostnames-only-one-component-help-166669101.html

In the last one, the user set the hostname using the "ServerName" option for Apache.  That didn't work for me (yes, I did restart the service).  This might suggest a problem with Apache.  Otherwise, it's a bug in how mod_dnssd is looking up the local host name.

I even tried adding a different name ahead of "localhost" on the 127.0.0.1 line of /etc/hosts.  No dice.  It's like it has "localhost" hardcoded somewhere.



Reproducible: Always
Comment 1 Pacho Ramos gentoo-dev 2013-01-01 19:39:09 UTC
I don't see any change that could cause this when comparing with fedora package:
http://pkgs.fedoraproject.org/cgit/mod_dnssd.git/tree/mod_dnssd.spec
Comment 2 Pacho Ramos gentoo-dev 2013-01-01 20:35:50 UTC
Searching for:
avahi_entry_group_add_service_strlst("localhost") failed: Invalid host name

In Google I found this links that could help you:
http://forums.fedoraforum.org/showthread.php?t=225695
Comment 3 Pacho Ramos gentoo-dev 2013-06-04 20:35:12 UTC
Did you review it?