Apache service not started on Windows 7 Ultimate

Hello,

I have Apache 2.2.16 running on port 8080 on Windows 7 Ultimate. It was working quite fine but for last one week, Apache service is not started when OS loads. Log file shows,

[Sat Feb 05 12:44:56 2011] [warn] (OS 64)The specified network name is no longer available. : winnt_accept: Asynchronous AcceptEx failed.
Starting the Apache2.2 service(OS 5)Access is denied. : Apache2.2: Failed to open the service

I have searched forums for solutions and got few suggestions. These are,

  1. Disable antivirus
  2. Add following lines in httpd.conf

EnableMMAP off
EnableSendfile off
Win32DisableAcceptEx

  1. Reinstall Apache

None of above have helped.

If I double click httpd.exe in bin directory, I am able to run php scripts through browser. This trick works from command prompt too. But, Apache service in windows services panel shows “stopped”. On clicking start, it says, requested service failed. Same message is shown when I try to start Apache from Apache monitor services.

Please help. Thanks in advance.

Thanks,
Sandeep

Do you recall if you had any Windows updates or any software updates at all (you don’t need to remember, you can look it up in the control panel)?

Try to restore your system to a day when everything used to work, if you don’t remember to have installed any new software or updates. That should go back to the previous configuration and then apache should start again.

I have not installed any updates, softwares recently.

Can’t really backdate system. Too many important softwares running on my machine. Can’t risk to mess with anything of them.

The thing is that you’ve already done anything that it is supposed to be done to sort out the problem and it is still there.

The reason why you have this error is unknown and therefore finding a solution is hard. I assumed that an automatic update may have already messed up with your system (It happened to me once or twice) and maybe modified that particular library.

That file is used by anti-viruses, virtualization softwares among others.

According to Apache

AcceptEx() is a Microsoft WinSock v2 API that provides some performance improvements over the use of the BSD style accept() API in certain circumstances. Some popular Windows products, typically virus scanning or virtual private network packages, have bugs that interfere with the proper operation of AcceptEx(). If you encounter an error condition like:

[error] (730038)An operation was attempted on something that is not a socket.: winnt_accept: AcceptEx failed. Attempting to recover.

you should use this directive to disable the use of AcceptEx().

You’d already done what you were supposed to do.

note: Win32DisableAcceptEx on I’m sure that you set this line to on but just in case, for future reference :slight_smile:

You can now do two things: Get more information by looking at the Windows 7 Error log viewer and see if you can find more details about this error (normally, you will have various errors related, not just one) and try to get information from Microsoft Knowledge Database,

or uninstall Apache and re-install all over.

Edit: I’ve just read that someone with a similar problem deleted his access.log file and created a new blank one… and that seemed to work with him. (http://www.wampserver.com/phorum/read.php?2,17857,17874)

I must blame myself. Molona, when you mentioned about access.log file, I recollected that I removed many lines in error.log file to reduce its size. After this change, Apache stopped working.

So, I cut-paste error.log file on desktop and created a blank error.log in logs folder. And we are done :slight_smile:

Thanks for your suggestions Molona. The problem has been resolved.

Cool. Glad to hear it :slight_smile: