Thursday, February 18, 2010

Apache server won't start - httpd.pid overwritten

First I had the problem of installing apache 2.2.14 and starting the apache service.

Then I realized that the problem was Skype (Skypus Interruptus ;-)) is listening to port 80 and creating interruptions.

Then I stopped Skype and removed it from starting at the system startup.

Then I installed the Apache again.

Apache server won’t start

But a new error problem occurred.

----------------------------------------------------------------------------------

Starting the Apache2.2 service

The Apache2.2 service is running.

[Thu Feb 18 10:29:48 2010] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Thu Feb 18 10:29:56 2010] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Thu Feb 18 10:29:57 2010] [notice] Apache/2.2.14 (Win32) PHP/5.3.1 configured -- resuming normal operations

[Thu Feb 18 10:29:57 2010] [notice] Server built: Sep 28 2009 22:41:08

[Thu Feb 18 10:29:57 2010] [notice] Parent: Created child process 3220

[Thu Feb 18 10:30:04 2010] [crit] (OS 6)The handle is invalid. : master_main: create child process failed. Exiting.

[Thu Feb 18 10:30:34 2010] [notice] Parent: Forcing termination of child process 36

[Thu Feb 18 10:34:35 2010] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Thu Feb 18 10:34:42 2010] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Thu Feb 18 10:35:08 2010] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

[Thu Feb 18 10:36:56 2010] [warn] pid file C:/Program Files/Apache Software Foundation/Apache2.2/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?

----------------------------------------------------------------------------------

The process id file [httpd.pid] is overwritten and suggesting may be unclean shutdown of previous apache run.

Even though I reinstalled apache again and again, same problem occurred.

Then I found out that even though I uninstalled apache, it kept all the configuration file[httpd.conf], error log file[error.log], access file[access.log], process id file[httpd.pid] and install log file[install.log] without deleting.

I suspect that is why I got the error message saying; "Unclean shutdown of previous Apache run?"

Then I deleted the complete apache folder [in C:/Program files folder] after one un-installation and re-installed it again.

After this fresh installation Apache was running fine like a baby…

7 comments:

Gizzard said...

Thanks for posting this, helped me sort out the issue very quickly.

Suhan Dharmasuriya, Homagama, Sri Lanka said...

You are welcome.

Albrecht said...
This comment has been removed by the author.
Albrecht said...

Thx, it dissolved also my problem.

Suhan Dharmasuriya, Homagama, Sri Lanka said...

You are welcome...

Jed said...

Are you sure the warnings aren't still showing up in your logs? Because this does NOT solve my problem; however, I don't think the pid file warning was causing your problem in the first place. It's a warning, NOT an error.

Suhan Dharmasuriya, Homagama, Sri Lanka said...

Sorry to hear that...
Hope you'll find your answers soon