# Apache restart problem [SOLVED]

## musicweb

Every time our server reboots, Apache fails to restart.

We have to manually restart it.

This is from the log file:

```
[Thu Jan 31 16:10:42 2013] [notice] caught SIGTERM, shutting down

[Thu Jan 31 16:11:54 2013] [alert] (EAI 3)Temporary failure in name resolution: mod_unique_id: unable to find IPv4 address of "wmmw"

Configuration Failed

[Thu Jan 31 16:13:45 2013] [notice] Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.1c PHP/5.4.3--pl0-gentoo configured -- resuming normal operations
```

Can someone tell me what the failure means?

The server seems to run OK after we manually start Apache, but it doesn't restart on it's own.Last edited by musicweb on Fri Feb 01, 2013 12:53 am; edited 1 time in total

----------

## 666threesixes666

i know apache's not working for systemd period....

openrc you might need to run something like "rc-update add apache2 default" as root or sudo

----------

## musicweb

tried that:

```
wmmw ~ # rc-update add apache2 default

 * rc-update: apache2 already installed in runlevel `default'; skipping

wmmw ~ #

```

----------

## 666threesixes666

(k just making sure its not something easy, building up in complexity for more experienced help to come around)

run cat /etc/hosts and post the result....

mkultra@mksrv [ ~ ]$ cat /etc/hosts

127.0.0.1 mkultra mkultra.mksrv mksrv localhost

mkultra@mksrv [ ~ ]$ ping mkultra

PING mkultra (127.0.0.1) 56(84) bytes of data.

(at least im pretty sure it should be set this way)

----------

## Hu

Is Apache started before or after the associated network card is ready?

----------

## musicweb

result of cat:

```
# /etc/hosts: Local Host Database

#

# This file describes a number of aliases-to-address mappings for the for

# local hosts that share this file.

#

# In the presence of the domain name service or NIS, this file may not be

# consulted at all; see /etc/host.conf for the resolution order.

#

# IPv4 and IPv6 localhost aliases

#127.0.0.1      localhost

127.0.0.1       wm-mw.org

209.222.239.101 wm-mw.org www.wm-mw.org

# www.wm-mw.org

#localhost

#wm-mw.org

#wmmw

::1     wm-mw.org

```

Not sure about the network card. All I know is, we have to manually start Apache after a reboot.

----------

## 666threesixes666

Notice: Undefined index: webcalendar_sponsor in /home/bruce/public_html/tif/index_en.php on line 18

i really wish apache would not throw such errors exposing usernames....  your house looks very nice, i could use a year or two of that place.....

another thread i found online made it sound like it was an /etc/hosts problem....  and it is....  (at least i think  :Wink: 

```

wmmw ~ # rc-update add apache2 default 

```

as your response tells me you need to change your line in /etc/hosts from

209.222.239.101 wm-mw.org www.wm-mw.org

to

209.222.239.101 wmmw wm-mw.org www.wm-mw.org

via sudo nano /etc/hosts or su -c 'nano /etc/hosts'

or gedit or kwrite if your gnome or kde

----------

## musicweb

That was it! Thanks 666....

Just added the wmmw to the line and rebooted just fine....

kudos

The house is actually where my partner lives in Canada.

It's an artist house for independent artists.

and I'll look into that calendar error too..... thanks again.

----------

## 666threesixes666

theres another far more severe error in the page regarding date statements.....  just lurk over your pages you'll see it, i think its the month lineup....

http://wm-mw.org/events/month.php?aff=yc135

plz mark the thread as solved as the original issue posted is resolved.    :Twisted Evil: 

----------

## musicweb

funny... but I don't see how to mark it as solved. 

I'm missing something....

----------

## 666threesixes666

strange, i dont see it on my post either.....  maybe edit post no. 1 and add "[SOLVED]" at the end of it.

----------

## musicweb

that should do it....

btw, I added this line to my PHP scripts to fix the date error:

```
date_default_timezone_set("America/New_York");

```

Seems that my new PHP 5.4 has some differences with my old scripts.

Oh well.... always something.  :Smile: 

----------

## 666threesixes666

not 100% positive....  but i think its worth noting.... i vaguely remember my slackware host running REALLY good and being setup similar to this...  vaguely as in like year 1 of having an idea of whats going on with linux....  as always back up what works, and test new implementations.  (reason being if you switch internet ip addresses then its easily fixed & possibly not even needed to reference the external ip)

127.0.0.1 wmmw wm-mw.org www.wm-mw.org localhost

209.222.239.101 localhost

----------

