Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
*RESOLVED* Apache startup problems
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
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Sat Mar 13, 2004 1:35 pm    Post subject: *RESOLVED* Apache startup problems Reply with quote

Apache won't start. I don't know what im doing wrong This is what has happened:
Code:

root@localhost alex # apache2
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Sat Mar 13 08:31:49 2004] [crit] (92)Protocol not available: make_sock: for address [::]:80, apr_socket_opt_set: (IPV6_V6ONLY)
no listening sockets available, shutting down
Unable to open logs

root@localhost alex # apache2logserverstatus
Can't locate stddef.ph in @INC (did you run h2ph?) (@INC contains: /etc/perl /usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.0/i686-linux /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.2/i686-linux /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.0/i686-linux /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2 /usr/local/lib/site_perl /usr/lib/perl5/site_perl/5.8.0/i686-linux /usr/lib/perl5/site_perl/5.8.0 .) at /usr/lib/perl5/site_perl/5.8.2/i686-linux/bits/types.ph line 10.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.2/i686-linux/sys/types.ph line 8.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.2/i686-linux/sys/uio.ph line 8.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.2/i686-linux/sys/socket.ph line 8.
Compilation failed in require at /usr/sbin/apache2logserverstatus line 71.
root@localhost alex #
[/quote]
_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)


Last edited by gentooalex on Sun Mar 14, 2004 5:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
patrickbores
Apprentice
Apprentice


Joined: 19 May 2003
Posts: 276
Location: Minneapolis, MN, USA

PostPosted: Sat Mar 13, 2004 5:32 pm    Post subject: Reply with quote

First things first, make sure you have defined the ServerName directive in your httpd.conf. Change that and see what happens.

Patrick
_________________
P.S. - this is what part of the alphabet would look like if Q and R were eliminated.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Sat Mar 13, 2004 7:15 pm    Post subject: Reply with quote

whats in /etc/dnsdomainname?
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Sun Mar 14, 2004 2:25 pm    Post subject: Reply with quote

Code:
root@localhost alex # cat /etc/dnsdomainname
cat: /etc/dnsdomainname: No such file or directory

_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Sun Mar 14, 2004 2:30 pm    Post subject: Reply with quote

Code:
ServerName new.host.name:80

_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
gentooalex
Tux's lil' helper
Tux's lil' helper


Joined: 02 May 2003
Posts: 123
Location: Charlottesville, Virginia

PostPosted: Sun Mar 14, 2004 2:30 pm    Post subject: Reply with quote

Does /etc/hostname need to be set to a valid hostname?
_________________
Radeon 9500 pro on Pentium 4 1.6ghz running Gentoo Linux (kernel 2.4)
Back to top
View user's profile Send private message
weisrc
n00b
n00b


Joined: 15 Mar 2004
Posts: 8

PostPosted: Mon Mar 15, 2004 6:38 pm    Post subject: Reply with quote

Sorry if this is posted somewhere else, I couldn't find anything else in the search, and i'm a new user here.

I'm having the same error as stated above:

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


My /etc/hosts file may be incorrect, I'm not sure, but heres what I have in it:

Code:
127.0.0.1     localhost.mydomain.com      localhost
127.0.0.1     hostname.inel.gov               hostname


Also, I've been in the httpd.conf at:
/usr/portage/net-www/apache/files/2.0.40/httpd.conf

In there, I tried changing the line for ServerName and have tried my own IP address and even just tried leaving it at: ServerName new.host.name:80

I can successfully connect to the internet, so it makes me think the rest of my network settings should be ok. But, maybe not? I have set my computers hostname, and it shows it on boot as [OK].

I have also set the domain to our domain, however, I haven't really "joined" the domain (at least to my knowledge).

My /etc/resolv.conf
Code:
domain MYDOMAIN-NT
nameserver MYDNSIP1
nameserver MYDNSIP2


Any ideas? or something I'm missing?
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Mon Mar 15, 2004 6:52 pm    Post subject: Reply with quote

IFIAK if you are on a LAN the dnsdomainname has to be the name of your LAN so other computers can find it. Assuming you are on a standalone machine

assuming its listening on port 80:

in /etc/apache2/conf/vhosts/vosts.conf

NameVirtualHost *
<VirtualHost *>
ServerName server.com
DocumentRoot /var/www/localhost/htdocs
</VirtualHost>

in etc/hosts
127.0.0.1 server.com

in the first directive in commonapache.conf
<Directory />
Order Allow,Deny
Allow from All
</Directory>l
( change this once its working)

restart apache

http://server.com should give you
/var/www/localhost/htdocs/index.html
Back to top
View user's profile Send private message
weisrc
n00b
n00b


Joined: 15 Mar 2004
Posts: 8

PostPosted: Mon Mar 15, 2004 9:02 pm    Post subject: Reply with quote

Thank you for replying so quickly! I'm still having the same problem, but heres what I've done per your reply.

vhosts:

Code:
######## Named VirtualHosts
NameVirtualHost [MY IP]
<VirtualHost [My IP]>
ServerName [My Computer Name]  <- I'm on an intranet, not external.
#ServerPath /domain <--- Not sure what to put there
DocumentRoot /var/www/localhost/htdocs
</VirtualHost>



In etc/hosts:

Code:
127.0.0.1           [My Computer Name].domain.com



And, it appeared that the "commonapache.conf" was all correct as you had stated.

I did a reboot to reinitialize apache and received the same error on boot. Maybe I'm still not entering what you had above correctly...but, I'm so new to all this (NOOOOOBI BIG TIME)....so, sorry if I'm not sure what to put where.
Also, I'm behind a firewall, this is for an intranet computer. I only need it to go off my IP address, not my computer name.

Thanks again for the help so far! Any other clarifications would be great!
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Mon Mar 15, 2004 9:35 pm    Post subject: Reply with quote

not an expert but possibly a couple of different problems.
is apache already running
ps -A |grep apache

netstat -nap | grep ":80" will show if anything is on port 80

back to the start:
can you ping
MyComputer
MyComputer.domain.com ?


/etc/hostname
MyComputer
/etc/dnsdomainname
domain.com

just comment out (#) the existing entries
eg

add to /etc/hosts
127.0.0.1 MyComputer
127.0.0.1 MyComputer.domain.com

Not sure about this bit :
I use virtual hosts and IIRC it defaults to the first entry in vhosts.conf .
Id try changing documentRoot in apache2.conf
<var/ww/localhost etc etc )
& Severname in commonapache.conf, ((MyComputer).domain.com) commenting out the include vhosts/vhosts.conf line to simplify it.
If this lot gets you ne nearer then i think id try re-emerging apache. I hda some problem with IPv6 in recent update - cant remember exactly what . that might be some of it .
If its still a problem I'll have another think ( tomorrow after ive struggled with a bit of perl!)
Back to top
View user's profile Send private message
weisrc
n00b
n00b


Joined: 15 Mar 2004
Posts: 8

PostPosted: Mon Mar 15, 2004 10:41 pm    Post subject: Reply with quote

Well, it appears that the web server is up and running! WOOHOO! But, I still get that error...heres what I've done so far:

No results were returned for
ps -A |grep apache

But, there were results for:
netstat -nap | grep :80

tcp 0 0 :::80 :::* LISTEN 1497/apache2

Can't ping my own system...so, something must be wrong. When I boot in to the console login it says [MY COMPUTERNAME.(none) <-- Is that bad?

But, I can ping our domain and surf the web using links...or whatever...

/etc/hosts :

Code:
127.0.0.1      [COMPUTERNAME]
127.0.0.1      [COMPUTERNAME.MYDOMAIN.COM]


/etc/dnsdomainname :

Code:
MYDOMAIN.COM



But, since its up and running I guess I can move on to fighting other battles. Now to get PHP and MYSQL running.... Thanks so much for your help!!! But, if you have any ideas about the error and what we've done this far that would still cause it to say that let me know.
Back to top
View user's profile Send private message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Mar 16, 2004 8:06 am    Post subject: Reply with quote

can you ping 127.0.0.1 ?
If not then you will probably have problems when it comes to setting up the LAN.

Id take the brackets off the computer names. Dont know if it matters but it may, and just stick to regular alphnumerics
Back to top
View user's profile Send private message
weisrc
n00b
n00b


Joined: 15 Mar 2004
Posts: 8

PostPosted: Tue Mar 16, 2004 6:24 pm    Post subject: Reply with quote

Yeah, I can ping 127.0.0.1 and even can ping my dns servers and domain. Most of my network works fine it seems. The webserver works from my other system on the network and Samba works now (just got that going this morning). But, I still get an error when booting up the apache on startup (Though its working) and Samba gave me this error even though its working as well:

Code:
lptstat: Unable to connect to server: Connection Refused


and the apache error on startup still is there saying:

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


Its sounding like my domain might be giving me problems... since, from my windows box I can browse to the gentoo box using ONLY the IP address, not the computer host name.

The problem is our domain is listed as a domain.com in some areas and when logging into windows its set as DOMAIN-NT
Maybe I don't have the right one in the dnsdomainname file.

Also, I'm not using the [] anywhere, was just using that as my example. Sorry to confuse ya.

Thanks again for all your help, any other ideas?
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