# apr_sockaddr_info_get() and apache

## thecooptoo

new install  and nothing is listening on 80

```
grenada apache2 # netstat -tnlp

Active Internet connections (only servers)

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

tcp        0      0 0.0.0.0:53              0.0.0.0:*               LISTEN      18144/dnsmasq

tcp        0      0 :::53                   :::*                    LISTEN      18144/dnsmasq

tcp        0      0 :::22                   :::*                    LISTEN      15185/sshd

```

and httpd.conf has the include statements 

```
grenada apache2 # grep -n Include  /etc/apache2/httpd.conf

170:Include /etc/apache2/modules.d/*.conf

177:Include /etc/apache2/vhosts.d/*.conf

grenada apache2 #                
```

and the listen 8o statement is in the included file 

```
grenada apache2 # grep -r 80 /etc/apache2/ |grep -v '#'

/etc/apache2/modules.d/00_mpm.conf:     ExpireTimeout       1800

/etc/apache2/ssl/server.key:1gCOzCf4Y1fafSUPDp31AkBYr2mu3+2G/TiVa80p/h4gykRJ8BocsVKIm3KhlO7j

/etc/apache2/vhosts.d/00_default_vhost.conf:Listen 80

/etc/apache2/vhosts.d/00_default_vhost.conf:NameVirtualHost *:80

/etc/apache2/vhosts.d/00_default_vhost.conf:<VirtualHost *:80>

grenada apache2 #                              
```

but apache doesnt start

```
grenada apache2 # /etc/init.d/apache2 start

 * Starting apache2 ...

apache2: apr_sockaddr_info_get() failed for grenada

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName                                          [ !! ]

grenada apache2 #             
```

if i include a Listen:80 statement in httpd.conf it generates even more errors

grenada apache2 # /etc/init.d/apache2 start

```
 * Starting apache2 ...

apache2: apr_sockaddr_info_get() failed for grenada

apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

(98)Address already in use: make_sock: could not bind to address [::]:80

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs                                                                                                                                     [ !! ]

grenada apache2 #      

```

So i assume its reading the statement from the include .

So why wont it start ?

----------

## thecooptoo

so ive donwgraded apache to 2.2 and now get this after revdep-rebuild

```

grenada apache2 # /etc/init.d/apache2 start

 * Apache2 has detected a syntax error in your configuration files:

/usr/sbin/apache2: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory

grenada apache2 # /etc/init.d/apache start

-bash: /etc/init.d/apache: No such file or directory

grenada apache2 # equery belongs libexpat.so.0

[ Searching for file(s) libexpat.so.0 in *... ]

!!! Unrecognized CONTENTS entry on line 1: '

'

grenada apache2 #                           
```

----------

## Huttu

same problem here. I recently updated apr-util to a masked version because the old apr-util couldn't be recompiled. Maybe thats the reason for that "apr_sockaddr_info_get() failed".

----------

## Huttu

I updated to apache-2.2.6-r1 and the newest versions of apr and apr-util but still the same error. During the installation apr said something about a new libtool depency. Could this have caused the error?

----------

## Huttu

I solved the problem on my computer. I renamed it long time ago and forgot to change the name in /etc/hosts. Now it runs flawles.

----------

