# apache22: WARNING: failed to start apache22



## philo_neo (Jun 1, 2014)

Hi,

I'm doing an installation of apache22 on a biquadcore Opeteron, there are no problems compiling `root@dct-raptor:/usr/ports/www/apache22 #` apache22. Apache does not run:
	
	



```
apache22: WARNING: failed to start apache22
```
I use FreeBSD 10. This is the output of the terminal VT:

```
root@dct-raptor:~ # cd /usr/ports/www/apache22
root@dct-raptor:/usr/ports/www/apache22 # make deinstall
===>  Deinstalling for www/apache22
===>   Deinstalling 
pkg-static: You are trying to delete package(s) which has dependencies that are still required:
www/apache22: www/mod_dnssd, www/gnome-user-share, x11/gnome2
... delete these packages anyway in forced mode
Deinstallation has been requested for the following 1 packages:

	apache22-2.2.27_2

The deinstallation will free 16 MB
[1/1] Deleting apache22-2.2.27_2...
apache22-2.2.27_2 is required by: ap22-mod_dnssd-0.6_8 gnome-user-share-2.30.1_2 gnome2-2.32.1_5, deleting anyway
/usr/local/etc/apache22/httpd.conf /usr/local/share/examples/apache22/httpd.conf differ: char 5233, line 106
 done
root@dct-raptor:/usr/ports/www/apache22 # make reinstall
===>  Installing for apache22-2.2.27_2
===>   apache22-2.2.27_2 depends on file: /usr/local/bin/perl5.16.3 - found
===>   apache22-2.2.27_2 depends on shared library: libexpat.so - found
===>   apache22-2.2.27_2 depends on shared library: libapr-1.so - found
===>   apache22-2.2.27_2 depends on shared library: libpcre.so - found
===>   Registering installation for apache22-2.2.27_2
===> Creating users and/or groups.
Using existing group 'www'.
Using existing user 'www'.
Installing apache22-2.2.27_2... done
To run apache www server from startup, add apache22_enable="YES"
in your /etc/rc.conf. Extra options can be found in startup script.

Your hostname must be resolvable using at least 1 mechanism in
/etc/nsswitch.conf typically DNS or /etc/hosts or apache might
have issues starting depending on the modules you are using.

root@dct-raptor:/usr/ports/www/apache22 # apachectl start
Performing sanity check on apache22 configuration:
httpd: apr_sockaddr_info_get() failed for dct-raptor
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
Syntax OK
Starting apache22.
httpd: apr_sockaddr_info_get() failed for dct-raptor
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
root@dct-raptor:/usr/ports/www/apache22 # 
]
```

I try to start apache22, but where can I find a log file of apache22*?*

Regards,

Philippe


----------



## SirDice (Jun 2, 2014)

philo_neo said:
			
		

> ```
> Performing sanity check on apache22 configuration:
> httpd: apr_sockaddr_info_get() failed for dct-raptor
> httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
> ...


This error commonly happens when it's unable to resolve the hostname. Add a proper DNS or /etc/hosts entry.



> I try to start apache22, but where can I find a log file of apache22?


/var/log/httpd-error.log.


----------



## philo_neo (Jun 6, 2014)

Hi,

I was checking whether a DNS or /etc/host entry is proper, there are no errors but I can't yet resolve the hostname. This is the terminal VT output of /etc/hosts.


```
# $FreeBSD: release/10.0.0/etc/hosts 109997 2003-01-28 21:29:23Z dbaker $
#
# Host Database
#
# This file should contain the addresses and aliases for local hosts that
# share this file.  Replace 'my.domain' below with the domainname of your
# machine.
#
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1			localhost localhost.my.domain
127.0.0.1		localhost localhost.my.domain

# Imaginary network.
#10.0.0.2		myname.my.domain myname
#10.0.0.3		myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#	10.0.0.0	-   10.255.255.255
#	172.16.0.0	-   172.31.255.255
#	192.168.0.0	-   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
```

This is the terminal VT output of /var/log/httpd-error.log.

```
Tue May 06 22:39:26 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue May 06 22:39:36 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue May 06 22:39:57 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 07 21:49:22 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 07 21:49:37 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Wed May 07 21:53:34 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 07 21:53:44 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Wed May 07 21:57:57 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 07 21:58:07 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun May 11 00:27:53 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun May 11 00:28:04 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun May 11 00:32:12 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun May 11 00:32:22 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun May 11 02:43:26 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun May 11 02:43:36 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Mon May 12 02:51:12 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon May 12 02:51:22 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Mon May 12 02:59:44 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon May 12 02:59:55 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue May 13 03:50:08 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue May 13 03:50:18 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Fri May 16 04:43:31 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri May 16 04:43:41 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sat May 17 06:27:12 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 17 06:27:22 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun May 18 21:53:48 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun May 18 21:53:58 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun May 18 21:57:50 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun May 18 21:58:00 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun May 18 22:02:12 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun May 18 22:02:22 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue May 20 07:47:54 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue May 20 07:48:04 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sat May 24 09:17:51 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 24 09:18:02 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sat May 24 20:25:44 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 24 20:25:54 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sat May 24 23:31:21 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 24 23:31:32 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Wed May 28 07:27:26 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 28 07:27:37 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Thu May 29 01:57:21 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu May 29 01:57:31 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Fri May 30 01:57:55 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri May 30 01:58:05 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sat May 31 05:27:43 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sat May 31 05:27:53 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun Jun 01 05:52:24 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Jun 01 05:52:34 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun Jun 01 22:09:09 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Jun 01 22:09:19 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Sun Jun 01 22:24:30 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Jun 01 22:24:40 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Mon Jun 02 22:35:37 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Jun 02 22:35:47 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Mon Jun 02 22:39:45 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Jun 02 22:39:55 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Mon Jun 02 23:01:43 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Mon Jun 02 23:01:53 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue Jun 03 04:39:45 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jun 03 04:39:55 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue Jun 03 04:52:36 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jun 03 04:52:52 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue Jun 03 04:56:35 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jun 03 04:56:50 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue Jun 03 05:02:35 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jun 03 05:02:45 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue Jun 03 08:50:43 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jun 03 08:50:53 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue Jun 03 09:30:48 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jun 03 09:31:18 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Tue Jun 03 09:33:19 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Tue Jun 03 09:33:19 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Wed Jun 04 00:29:31 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed Jun 04 00:29:42 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Thu Jun 05 01:02:39 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jun 05 01:02:49 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Thu Jun 05 22:22:11 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jun 05 22:22:21 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Fri Jun 06 23:35:51 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Jun 06 23:36:01 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Fri Jun 06 23:40:26 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Jun 06 23:40:42 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
[Fri Jun 06 23:44:34 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Jun 06 23:44:44 2014] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "dct-raptor"
Configuration Failed
```

The browser, Firefox, found the DNS, there is the web navigation. Maybe it is about DHCP for assigned IP addresses at this server, and apache22 can't start with DHCP?

Regards,

Philippe


----------

