DevHeads.net

apache mod_unique configuration issue - Name or service not known

hello,
i have the following setup:

loadbalancer - 192.168.1.10

server-2 - 192.168.1.12

it is a gentoo machine.

# apache2 -v
Server version: Apache/2.2.15 (Unix)
Server built: Aug 12 2010 10:07:12

server2 has the following configuration

# cat /etc/conf.d/net

<a href="http://pastie.org/1097227" title="http://pastie.org/1097227">http://pastie.org/1097227</a>

when i enable mod_unique in

# vim /etc/apache2/httpd.conf
...
LoadModule unique_id_module modules/mod_unique_id.so

i get these errors in :

# tail -f /var/log/apache2/error_log

[Tue Aug 17 09:41:47 2010] [alert] (EAI 2)Name or service not known:
mod_unique_id: unable to find IPv4 address of "server-2.local.net"
Configuration Failed
[Tue Aug 17 09:47:10 2010] [alert] (EAI 2)Name or service not known:
mod_unique_id: unable to find IPv4 address of "server-2.local.net"
Configuration Failed

# hostname
server-2.local
#

# cat /etc/hosts
127.0.0.1 localhost server-2.local
192.168.1.12 server-2.local

# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
127.0.0.1 localhost server-2.local

the problem seems to be with the hostname somewhere but i can't really
see what i have done wrong. the reason is that even if i disable the
mod_unique on the httpd.conf module, i get these warning when i visit:

<a href="http://192.168.1.12" title="http://192.168.1.12">http://192.168.1.12</a> - this is the actual server IP address

[Tue Aug 17 11:03:09 2010] [error] [client 203.XXX.XXX.XXX] client
sent HTTP/1.1 request without hostname (see RFC2616 section 14.23):
/w00tw00t.at.ISC.SANS.test0:)

but i don't get this errors when i access the site via the balancer
nor the alias IP's.

any help much appreciated.

norman

Comments

Re: apache mod_unique configuration issue - Name o

By Joost de Heer at 08/17/2010 - 04:31

What is ServerName in the httpd configuration?

Totally different request (this is a request for /w00tw00t.at.ISC.SANS.test0:))

Joost

Re: apache mod_unique configuration issue - Name o

By Norman Khine at 08/17/2010 - 05:20

hi

On Tue, Aug 17, 2010 at 11:31 AM, Joost de Heer < ... at sanguis dot xs4all.nl> wrote:
ServerName server-2.local.net

Re: apache mod_unique configuration issue - Name o

By Rich Bowen at 08/17/2010 - 06:06

The error means exactly what it says - that it can't look up
server-2.local.net in DNS. The ServerName needs to be a valid hostname
that either resolves in DNS, or has an /etc/hosts file entry for name
resolution.

Re: apache mod_unique configuration issue - Name o

By Norman Khine at 08/17/2010 - 08:20

On Tue, Aug 17, 2010 at 1:06 PM, Rich Bowen < ... at rcbowen dot com> wrote:
thanks for the replies, i messed up the hostname entry. it all works fine now.