Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache2 does not start (PLEASE HELP!!!)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Mon May 23, 2005 9:07 pm    Post subject: Apache2 does not start (PLEASE HELP!!!) Reply with quote

I`m getting crazy.

After 3 or 4 hours, I still haven't got it started.

And the problem is that I DON'T KNOW THE PROBLEM!!!

This is the output I get when I try to start Apache:

Code:

bash-2.05b# /etc/init.d/apache2 start
 * Starting apache2...                                                    [ !! ]

bash-2.05b#


As you see, there are some !! instead of an "OK".
This is what I found in the log file (error_log)
Code:

[Mon May 23 23:09:51 2005] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "marc"
Configuration Failed


I have also installed php and mod_php with the USE flags "apache2" and "mysql".
I also have added "-D PHP4" to the apache_opts line in /etc/conf.d/apache2.

The one who can solve this: I will buy you a new Cadillac.

This is my apache2.conf file:
Code:

### /etc/apache2/conf/apache2.conf
### $Id: apache2.conf,v 1.1 2004/03/22 21:17:57 stuart Exp $
###
### Main Configuration Section
### You really shouldn't change these settings unless you're a guru
###
ServerRoot /usr/lib/apache2
ServerName localhost
#LockFile /etc/apache2/apache2.lock
PidFile /var/run/apache2.pid
ErrorLog logs/error_log
LogLevel warn
DocumentRoot /var/www/localhost/htdocs

### Dynamic Shared Object (DSO) Support
###
### You should always leave these three, as they are needed for normal use.
### mod_access (Order, Allow, etc..)
### mod_log_config (Transferlog, etc..)
### mod_mime (AddType, etc...)
###
LoadModule access_module                 modules/mod_access.so
LoadModule auth_module                   modules/mod_auth.so
LoadModule auth_anon_module              modules/mod_auth_anon.so
LoadModule auth_dbm_module               modules/mod_auth_dbm.so
LoadModule auth_digest_module            modules/mod_auth_digest.so
LoadModule include_module                modules/mod_include.so
LoadModule log_config_module             modules/mod_log_config.so
LoadModule env_module                    modules/mod_env.so
LoadModule mime_magic_module             modules/mod_mime_magic.so
LoadModule cern_meta_module              modules/mod_cern_meta.so
LoadModule expires_module                modules/mod_expires.so
LoadModule headers_module                modules/mod_headers.so
LoadModule usertrack_module              modules/mod_usertrack.so
LoadModule unique_id_module              modules/mod_unique_id.so
LoadModule setenvif_module               modules/mod_setenvif.so
LoadModule proxy_module                  modules/mod_proxy.so
LoadModule proxy_connect_module          modules/mod_proxy_connect.so
LoadModule proxy_ftp_module              modules/mod_proxy_ftp.so
LoadModule proxy_http_module            modules/mod_proxy_http.so
LoadModule mime_module                   modules/mod_mime.so
LoadModule status_module                 modules/mod_status.so
LoadModule autoindex_module              modules/mod_autoindex.so
LoadModule asis_module                   modules/mod_asis.so
LoadModule info_module                   modules/mod_info.so
LoadModule cgi_module                    modules/mod_cgi.so
LoadModule cgid_module                   modules/mod_cgid.so
LoadModule vhost_alias_module            modules/mod_vhost_alias.so
LoadModule negotiation_module            modules/mod_negotiation.so
LoadModule dir_module                    modules/mod_dir.so
LoadModule imap_module                   modules/mod_imap.so
LoadModule actions_module                modules/mod_actions.so
LoadModule speling_module                modules/mod_speling.so
LoadModule userdir_module                modules/mod_userdir.so
LoadModule alias_module                  modules/mod_alias.so
LoadModule rewrite_module                modules/mod_rewrite.so

###
### New Modules for 2.0 (some are experimental)
###
LoadModule file_cache_module             modules/mod_file_cache.so
LoadModule echo_module                   modules/mod_echo.so
LoadModule charset_lite_module           modules/mod_charset_lite.so
LoadModule cache_module                  modules/mod_cache.so
LoadModule disk_cache_module             modules/mod_disk_cache.so
LoadModule mem_cache_module              modules/mod_mem_cache.so
LoadModule ext_filter_module             modules/mod_ext_filter.so
LoadModule case_filter_module            modules/mod_case_filter.so
LoadModule case_filter_in_module         modules/mod_case_filter_in.so
LoadModule deflate_module                modules/mod_deflate.so
#LoadModule optional_hook_export_module   modules/mod_optional_hook_export.so
#LoadModule optional_hook_import_module   modules/mod_optional_hook_import.so
#LoadModule optional_fn_import_module     modules/mod_optional_fn_import.so
#LoadModule optional_fn_export_module     modules/mod_optional_fn_export.so
#LoadModule bucketeer_module              modules/mod_bucketeer.so
LoadModule logio_module                  modules/mod_logio.so

###
### Global Configuration
###
# Splitting up apache2.conf into two files makes it easier to support
# multiple configurations on the same serer.  In commonapache2.conf
# you keep directives that apply to all implementations and in this
# file you keep server-specific directives.  While we don't yet have
# multiple configurations out-of-the-box, this allows us to do that
# in the future easily.  (PERLPROXIED *ahem*)
#
# For Apache2 we load all conf files in conf/modules.d
Include conf/modules.d/*.conf
Include conf/commonapache2.conf

###
### IP Address/Port
###
#BindAddress *
Listen 80

###
### Log configuration Section
###
<IfModule mod_log_config.c>
#Single logfile with access, agent and referer information
#This is the default, if vlogs are not defined for the main server
CustomLog logs/access_log combined env=!VLOG
#If VLOG is defined in conf/vhosts/vhosts.conf, we use this entry
#CustomLog "|/usr/sbin/apache2splitlogfile" vhost env=VLOG
</IfModule>

###
### Virtual Hosts
###
# We include different templates for Virtual Hosting. Have a look in the
# vhosts directory and modify to suit your needs.
#Include conf/vhosts/vhosts.conf
#Include conf/vhosts/dynamic-vhosts.conf
#Include conf/vhosts/virtual-homepages.conf

###
### Performance settings Section
###
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

# prefork MPM [THIS IS THE DEFAULT]
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers         5
MinSpareServers      5
MaxSpareServers     10
MaxClients         150
MaxRequestsPerChild  0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers         2
MaxClients         150
MinSpareThreads     25
MaxSpareThreads     75
ThreadsPerChild     25
MaxRequestsPerChild  0
</IfModule>

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
<IfModule perchild.c>
NumServers           5
StartThreads         5
MinSpareThreads      5
MaxSpareThreads     10
MaxThreadsPerChild  20
MaxRequestsPerChild  0
</IfModule>


Last edited by Roxxor on Mon May 23, 2005 9:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Mon May 23, 2005 9:15 pm    Post subject: Reply with quote

The error_log file:
Code:

[Mon May 23 22:44:45 2005] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "marc"
Configuration Failed
[Mon May 23 22:47:36 2005] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "marc"
Configuration Failed
[Mon May 23 22:52:40 2005] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "marc"
Configuration Failed
[Mon May 23 23:08:49 2005] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "marc"
Configuration Failed
[Mon May 23 23:09:51 2005] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "marc"
Configuration Failed

Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2094
Location: San Jose, CA

PostPosted: Mon May 23, 2005 9:16 pm    Post subject: Re: Apache2 does not start (PLEASE HELP!!!) Reply with quote

Roxxor wrote:
I`m getting crazy.

Snip...



Edited: I missed the error_log at the top... You must have added it?

Where is it getting the name marc from? I didn't see it in your apache2.conf, so it must be in one of the includes. Do you know where it is?

If the name of your machine is marc, you may just want to add it to your localhost line of /etc/hosts, or you could list it with the proper ip like this:

Code:
ether.net.ip.addy (ie 192.168.0.1)     marc    marc.yourdomain.ext


Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Mon May 23, 2005 9:22 pm    Post subject: Reply with quote

Think i found the problem.

I checked (made a #) the line
Code:

LoadModule unique_id_module              modules/mod_unique_id.so

in apache2.conf.

What kind of a module is that?
Then look at my error_log:
[Mon May 23 23:09:51 2005] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "marc"

Is it important?
Apache2 starts now when it is checked.

Strange...
Somebody who knows?


Last edited by Roxxor on Mon May 23, 2005 9:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2094
Location: San Jose, CA

PostPosted: Mon May 23, 2005 9:23 pm    Post subject: Reply with quote

Roxxor wrote:
Think i found the problem.

I checked (made a #) the line
Code:

LoadModule unique_id_module              modules/mod_unique_id.so

in apache2.conf.

What kind of a module is that?

Is it important?
Apache2 starts now when it is checked.

Strange...
Somebody who knows?


Looks like an example line, how to add your own modules...

Raydude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Mon May 23, 2005 9:26 pm    Post subject: Reply with quote

My /etc/hosts file looks as it follows:
Code:

# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1   localhost
# 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



And /etc/hostname:
Code:

marc
Back to top
View user's profile Send private message
RayDude
Advocate
Advocate


Joined: 29 May 2004
Posts: 2094
Location: San Jose, CA

PostPosted: Mon May 23, 2005 9:30 pm    Post subject: Reply with quote

Roxxor wrote:
My /etc/hosts file looks as it follows:
Code:

# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1   localhost
# 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



And /etc/hostname:
Code:

marc


If you are running dhcp, then hosts needs too look like this:

Code:

# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1   marc    (and possibly marc.yourdomain.com and any other aliases you use)       localhost
# 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


RayDude
_________________
Some day there will only be free software.
Back to top
View user's profile Send private message
Roxxor
Apprentice
Apprentice


Joined: 04 Jun 2003
Posts: 225
Location: Stockholm, Sweden

PostPosted: Mon May 23, 2005 9:31 pm    Post subject: Reply with quote

RayDude:
OK, I will edit my /etc/hosts.
Thanks!


http://gentoo-wiki.com/HOWTO_Apache2

Look at the fisrt problem under "Common problems" :D


But is it somebody who knows what mod_unique_id is and what it does?
Back to top
View user's profile Send private message
adaptr
Watchman
Watchman


Joined: 06 Oct 2002
Posts: 6730
Location: Rotterdam, Netherlands

PostPosted: Mon May 23, 2005 9:33 pm    Post subject: Reply with quote

http://gentoo-wiki.com/HOWTO_Apache2

Google next time, eh ;-)
_________________
>>> emerge (3 of 7) mcse/70-293 to /
Essential tools: gentoolkit eix profuse screen
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum