You are not logged in.

#1 2009-04-12 12:56:10

Paco
Member
Registered: 2009-04-12
Posts: 12

Bug ? httpd not works if there is not network [solved]

Hi everybody
Excuse me for my bad english i'm french.
I observe httpd doesn't want to workiing if the daemon network is not launching.
I'll show you this pastebin who explain better me the problem.
http://pastebin.com/m376ffbee

Do you think it is natural ?
Other thing : If i don't have the ethernet cable, network stay down.
How i can do ?
Thank you for your help smile

Last edited by Paco (2009-04-24 12:03:59)

Offline

#2 2009-04-12 13:09:46

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

< [Sun Apr 12 15:04:41 2009] [notice] caught SIGTERM, shutting down
< [Sun Apr 12 15:04:46 2009] [alert] (EAI 3)Temporary failure in name resolution: mod_unique_id: unable to find IPv4 address of "PC_Paco"
< Configuration Failed

i forgeted give you the httpd error log :S
But i don't know why httpd doesn't found ipv4

Offline

#3 2009-04-12 13:12:05

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Bug ? httpd not works if there is not network [solved]

Don't you think it is normal if your HTTP server refuses to start if there is no network connection?

After all - to what use is a HTTP server if it cannot serve?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#4 2009-04-12 13:24:23

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

Thank you for your reply.
No i think it is normal but network doesn't want lto launch if there is not ethernet cable. But my apache's server is for my personnal website. I want to write web pages without internet.
I don't know if you understand that i said :s

Offline

#5 2009-04-12 13:30:55

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Bug ? httpd not works if there is not network [solved]

B wrote:

Don't you think it is normal if your HTTP server refuses to start if there is no network connection?

After all - to what use is a HTTP server if it cannot serve?

Serve a local web-site so the man can do php or whatever the heck he wants to do ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#6 2009-04-12 13:36:09

ptodorov
Member
Registered: 2008-12-28
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

Add the following line to /etc/httpd/conf/httpd.conf in order to configure apache to bind to localhost (127.0.0.1) :

Listen 127.0.0.1:80

Restart the apache service:

/etc/rc.d/httpd restart

Now you should be able to connect to apache via 127.0.0.1

Offline

#7 2009-04-12 14:11:40

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Bug ? httpd not works if there is not network [solved]

moljac024 wrote:
B wrote:

Don't you think it is normal if your HTTP server refuses to start if there is no network connection?

After all - to what use is a HTTP server if it cannot serve?

Serve a local web-site so the man can do php or whatever the heck he wants to do ?

Loopback interface is a network interface too - of course it's been taken out of the network startup scripts for a while now...

I guess it did make sense taking it out.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2009-04-12 14:22:41

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

httpd doesn't want to restart if network is down.
I can go on my website with localhost, this is not the problem, the problem is : when i don't have a ethernet cable with internet, network is not available, and http doesn't work.

Offline

#9 2009-04-12 14:28:47

ptodorov
Member
Registered: 2008-12-28
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

Could you at least try my advice and see if it works? Thank you.

Offline

#10 2009-04-12 14:43:17

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

i tried ( sorry, i didn't say you that ) but it's not working.
the httpd start fail hmm

Offline

#11 2009-04-12 15:14:19

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Bug ? httpd not works if there is not network [solved]

Try to launch it manually - so with the path to the executable, not the daemon startup script - and paste the output.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#12 2009-04-12 15:41:16

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

this is the message :

httpd: apr_sockaddr_info_get() failed for PC_Paco
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(98)Address already in use: make_sock: could not bind to address 127.0.0.1:80
no listening sockets available, shutting down
Unable to open logs

He doesn't like the 127.0.0.1 hmm

Offline

#13 2009-04-12 16:10:52

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: Bug ? httpd not works if there is not network [solved]

I guess he does - check if there is already a running instance. That's usually what 'adress already in use' means.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#14 2009-04-14 02:58:12

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

No i don't have ( i think ) instance of httpd
Look : http://pastebin.com/m3adf446e
Thanks again for your help

Offline

#15 2009-04-14 07:44:41

ptodorov
Member
Registered: 2008-12-28
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

What is the output of netstat?

netstat --tcp -lpn

Offline

#16 2009-04-14 10:40:12

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

[paco@PC_Paco:~]$ netstat --tcp -lpn
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 127.0.0.1:80            0.0.0.0:*               LISTEN      -                   
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN

Offline

#17 2009-04-14 11:21:03

ptodorov
Member
Registered: 2008-12-28
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

Sorry, i forgot to tell you that you should run netstat --tcp -lpn as root user. Please run the same command when logged as root and paste the output.

Offline

#18 2009-04-14 11:48:12

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: Bug ? httpd not works if there is not network [solved]

Paco wrote:

< [Sun Apr 12 15:04:41 2009] [notice] caught SIGTERM, shutting down
< [Sun Apr 12 15:04:46 2009] [alert] (EAI 3)Temporary failure in name resolution: mod_unique_id: unable to find IPv4 address of "PC_Paco"
< Configuration Failed

Have you tried commenting that module out in your /etc/httpd/conf/httpd.conf (assuming that's what's causing the problem)?

Paco wrote:

No i don't have ( i think ) instance of httpd
Look : http://pastebin.com/m3adf446e
Thanks again for your help

There are several httpd processes (/usr/sbin/httpd -k start) running, from what I can see.

Offline

#19 2009-04-16 17:11:31

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

bash-3.2# netstat --tcp -lpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      2873/postgres

Hum it 's not the same thing hmm



foutrelis you think i should kill every processes ?

Offline

#20 2009-04-21 16:34:48

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

Up
hmm

Offline

#21 2009-04-21 16:41:42

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: Bug ? httpd not works if there is not network [solved]

Shot in the dark here, but can you post your /etc/hosts file?


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#22 2009-04-21 18:13:15

PinkFloydYoshi
Member
From: United Kingdom
Registered: 2008-11-20
Posts: 29

Re: Bug ? httpd not works if there is not network [solved]

Comment out the line 90 in your /etc/httpd/conf/httpd.conf file, looks like this:

LoadModule unique_id_module modules/mod_unique_id.so.

This module checks that your hostname is unique and correctly mates with your IP address. If you're not using a network then commenting this out should be just fine.

Offline

#23 2009-04-24 12:03:26

Paco
Member
Registered: 2009-04-12
Posts: 12

Re: Bug ? httpd not works if there is not network [solved]

It works big_smile
Thank you PinkFloydYoshi smile
thanks everybody

Offline

Board footer

Powered by FluxBB