# Apache22 wonÃ¢Â€Â™t start!



## arie01 (Mar 14, 2012)

*Apache22 wonâ€™t start!*

Hello, 

I just installed apache22 on FreeBSD 9.0 and I can't start it in any way.
When I issue `# /usr/local/sbin/apachectl start` I keep getting the following error message:

```
[Wed Mar 14 08:32:29 2012] [warn] (2) No such file or directory: Failed to enable the 'httpready' Accept Filter
```

When I issue `# /usr/local/etc/rc.d/apache22 restart` it says this:

```
Performing sanity check on apache22 configuration:
Syntax OK
apache22 not running? (check /var/run/httpd.pid).
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
```

I looked at /var/run/ and there is no httpd.pid file there. So, I copied that file from a FreeBSD 8.2 server I have in hopes that it would help, but itâ€™s the same thing.

Any way I could get some help on this?

Just to let you know, I have very little experience with FreeBSD doing the usual and simple staff, nothing really advanced.

Thank you,


----------



## phoenix (Mar 14, 2012)

Read the error message.  It's looking for an "accept filter" file somewhere that doesn't exist.  My guess is you enabled that option in either the port OPTIONS or the Apache config file.  Remove that OPTION and reinstall the port, or edit the config file to remove that option, and things will work.


----------



## Hawk (Mar 14, 2012)

[CMD=]kldload accf_http[/CMD]
Is that it?


----------



## arie01 (Mar 14, 2012)

Thank you for your replies. After multiple unsuccessful attempts to resolve the issue, I am rebuilding my machine from scratch.

Phoenix, I also believe that I enabled something but I have no idea what or where.

Hawk, I tried *kldload accf_http* and it didn't help.

I'll report back if I have any issues with the new installation.

Thank you,


----------



## arie01 (Mar 15, 2012)

Ok, Apache still doesn't want to start and I'm getting the same error. I installed the OS and Apache with pretty much all the default, except I removed IPv6 from Apache. Why is it not working?

I edited the httpd.conf file and at the ServerName section, I added the following:


```
#ServerName [url]www.example.com:80[/url]
ServerName monitor:80 - was added second, just to see if it makes any difference.
ServerName 10.0.5.99:80
```

Then I issued `monitor# /usr/local/sbin/apachectl start` and this is the result:


```
[Thu Mar 15 08:01:27 2012] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter
```

Now Phoenix, you are saying that I must have enabled a certain option during my installation process. Can you please tell me which option that might be? How do I get to the system config from within the OS after it is already installed? How do I add/remove/modify Apache options after it is already installed?

I know if I do the same on FreeBSD 8.2, I don't get into all this mess.

Thank you,


----------



## SirDice (Mar 15, 2012)

Use the correct way to start apache:
`# /usr/local/etc/rc.d/apache22 start`
or
`# service apache22 start`


----------



## arie01 (Mar 15, 2012)

Hello SirDice, 

I did and these are the results:


```
monitor# /usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
monitor#
```


```
monitor# service apache22 start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
/usr/local/etc/rc.d/apache22: WARNING: failed to start apache22
monitor#
```

Thank you,


----------



## suntzu (Mar 15, 2012)

Please post the output of :

`# cat /var/log/httpd-error.log`


----------



## arie01 (Mar 15, 2012)

Hi suntzu,

Here is the content of my error log since yesterday.


```
[Wed Mar 14 16:23:27 2012] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "monitor"
Configuration Failed
[Thu Mar 15 08:01:27 2012] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "monitor"
Configuration Failed
[Thu Mar 15 08:58:08 2012] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "monitor"
Configuration Failed
[Thu Mar 15 08:59:16 2012] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of "monitor"
Configuration Failed
```

I'm not sure why it says hostname or server name are unknown.

Thank you,

Thank you,


----------



## arie01 (Mar 15, 2012)

When I ping hostname from the shell, I don't get a reply. 
When I ping hostname.domain.local from the shell, I get a reply.

When I ping hostname from a DOS window, I get a reply.
When I ping hostname.domain.local from a DOS window, I get a reply.


----------



## suntzu (Mar 15, 2012)

The fastest way to get rid of the error is to disable mod_unique; edit the apache configuration file and comment [CMD=""]LoadModule unique_id_module libexec/apache22/mod_unique_id.so[/CMD]


----------



## arie01 (Mar 15, 2012)

Unbelievable man!

That worked!

Thank you so much for a quick and accurate answer.


----------



## DutchDaemon (Mar 15, 2012)

Format your posts, arie01!


----------

