Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1384
  • Last Modified:

Unable to start apache after installation

Hi,

I have installed Apache 2.0.49 succesfully on a windows xp professional system.However when i try to start the applcation using the startup menu ,apache woould not start and i  get the following error.



[Wed Apr 21 22:48:09 2004] [notice] Parent: Created child process 3604
[Wed Apr 21 22:48:09 2004] [crit] (OS 10050)A socket operation encountered a dead network.  : alloc_listener: failed to get a socket for 0.0.0.0
Syntax error on line 120 of C:/Apache/Apache2/conf/httpd.conf:
Listen setup failed
[Wed Apr 21 22:48:09 2004] [crit] master_main: create child process failed. Exiting.
[Wed Apr 21 22:48:09 2004] [notice] Parent: Forcing termination of child process 2539160



Apache howevver starts fine if i try to start it through the command line.

Please help.

lerouge.
0
satishmadhu
Asked:
satishmadhu
  • 4
  • 2
  • 2
  • +1
2 Solutions
 
satishmadhuAuthor Commented:
HI,

I checked line 120 of my config file and it says

LISTEN 80

thanks
lerouge
0
 
MercantilumCommented:
Try delete the line (in case a special char was in...) and insert this one as below:

Listen 80
0
 
MercantilumCommented:
After a rethink: it is likely apache could not bind to the socket (on port 80)
- you had another server running
- a previous instance socket was still alive and thus not free
and at the time you started manually the socket was free.

Does your server start automatically at boot ?
( after a boot check in task manager if you see a process named "apache" or "httpd" )

If not started at boot, to be sure where the problem comes from, try again after a fresh reboot to start it from the Start menu.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Tacobell777Commented:
Thats what I was thinking, you have two servers wanting to grab that port at the same time, and IIS is probably faster in grabbing it.

You can have both running on one machine but you need to put them on a different IP address to make this work.
0
 
satishmadhuAuthor Commented:
Hi,

Actually the statement on line 120 is Listen 80 and not LISTEN 80 if that would have made a difference.I uninstalled IIS before I installed apache.So guess that the question of IIS grabbing it does not arise.Also Apache does not run automatically on boot or reboot.I have tried booting ad rebooting and still the same error comes back.I have tried it numerous times.However the only thing that works is to start apache through the command line by using apache.exe.

Still wondering whats the problem.

Thanks,
lerouge.
0
 
MercantilumCommented:
Check the path associated to the icon for Apache.
And ensure the working directory is the same as the exe.
It is probably something simple.
0
 
apdtechCommented:
First of all,

Put:

Listen XX.YY.AA.BB:80

Where XX.YY.AA.BB is your server's IP Address.

Listen is CASE SENSITIVE.   Secondly, what is in your $WINDOWS/system32/drivers/etc/hosts file?   And what is the output of your ipconfig /all?  Apache is trying to bind to 0.0.0.0 which is not a real IP address.

0
 
MercantilumCommented:
1. Apache directives are *not* case sensitive http://www.yaps.de/manual/configuring.html (3rd line of syntax...)
    (while the arguments may be)

2. Better to keep Listen without an IP as it listens to all IPs... http://httpd.apache.org/docs/mod/core.html#listen
0
 
apdtechCommented:
In the httpd.conf itself, it says:

#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80


So, I am guessing the docs may be somewhat in correct, brcause people Do run into issues when no address is typed in, and if the log files are checked, you will see errors like the gentleman above has.  And nonethelsess, this gentleman is still having his issue.

I stand corrected inregards to case, never knew it or tested it out.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now