logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache refuses to do a graceful restart
Author
ahmed_ib_naser



Joined: 23 Feb 2006
Posts: 1

PostPosted: Sun 20 Aug '06 2:08    Post subject: apache 2.2.2, php5apache2_2.dll / no graceful restart Reply with quote

Hello there,

I have been reading through your site for some time and have found almost everything useful... Seriously.

The php5 apache 2.2.x handler runs fine except that it will conduct a graceful restart -- neither through the command line or the apache monitor utility.

It will HOWEVER, start manually through apache monitor or the command line after a manual stop.

I have gone through the logs a million times and can find nothing. No error messages from php extensions not loading. No error messages from anything else.

My platform spec is as follows:

Windows 2003 Service Pack 2
Apache 2.2.2 (installed as service, starts automatically, listening on 80)
PHP 5.1.5 (a few hours old, the apache handler did the same thing on php 5.1.4)
mySQL 5.0.22

What could the problem be?

Keep in mind that my Windows box does not have IIS installed. In fact, when I did a clean install of Windows, I made sure that it did not sneak in.

I ran the HTTPCFG utility for good measure and told the box to only listen on port on 127.0.0.1, so that the other IP (a private class one) could be free for apache on its own. I understand that IIS can hog IPs and it took me a whole week of hair pulling to learn that lesson properly and since then have been careful about this issue.

Sorry for the long post, but I wanted to provide as much information as possible to whoever is gracious enough to offering a solution.

Again, my only problem is that apache refuses to do a graceful restart. Live with it? Sure, but I want to replicate this exact configuration later on a production box, which if restarted may not always start the service automatically.

Ahmed
Back to top
ckissi



Joined: 09 Aug 2006
Posts: 6

PostPosted: Sun 20 Aug '06 10:40    Post subject: Reply with quote

Previous message seems to be from other thread.

Admin note:
Thanks ckissi, made a new start post.
Back to top
Mungbeans



Joined: 11 Aug 2006
Posts: 10
Location: Sydney, Australia

PostPosted: Sun 03 Sep '06 2:31    Post subject: Reply with quote

I have the same problem with my Apache Services Monitor.

I can restart Apache without error from the command line. But if I use the Services Monitor (which would be nice and handy as its there in the systems tray) I get a couple of referenced memory errors. The errors do not result in anything being recorded in the error logs.
Back to top
Mirel



Joined: 23 Sep 2006
Posts: 6
Location: Slovakia

PostPosted: Sat 23 Sep '06 13:35    Post subject: restarting Apache 2.2.3 Reply with quote

I have problem with restarting Apache from Apache Monitor too.
But when i tried it, in my error.log I found this:

[Sat Sep 23 13:04:03 2006] [notice] Parent: Received restart signal -- Restarting the server.
[Sat Sep 23 13:04:03 2006] [notice] Child 3300: Exit event signaled. Child process is ending.
[Sat Sep 23 13:04:03 2006] [warn] (OS 995)The I/O operation has been aborted because of either a thread exit or an application request. : winnt_accept: Asynchronous AcceptEx failed.
[Sat Sep 23 13:04:04 2006] [notice] Child 3300: Released the start mutex
[Sat Sep 23 13:04:05 2006] [notice] Child 3300: Waiting for 250 worker threads to exit.
[Sat Sep 23 13:04:05 2006] [notice] Child 3300: All worker threads have exited.
[Sat Sep 23 13:04:05 2006] [notice] Child 3300: Child process is exiting

Can anybody help?
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sat 23 Sep '06 13:55    Post subject: Re: restarting Apache 2.2.3 Reply with quote

Try by adding:
Code:
    <IfDefine WINFIX>
        #Fix broken AcceptEx (-DWINFIX)
        EnableSendfile Off
        EnableMMAP Off
        Win32DisableAcceptEx
    </IfDefine>


to httpd.exe and starting your server with httpd -k start -DWINFIX

if you don't wand to add the -DWINFIX everytime uninstall and reinstall apache like

httpd.exe -k uninstall
httpd.exe -k install -DWINFIX
Back to top
admin
Site Admin


Joined: 15 Oct 2005
Posts: 679

PostPosted: Sat 23 Sep '06 13:56    Post subject: Reply with quote

Mostly third party PHP extensions of php are causing troubles with a stop/restart.

Do you have extra extensions enabled in php.ini ?
Back to top
Mirel



Joined: 23 Sep 2006
Posts: 6
Location: Slovakia

PostPosted: Sat 23 Sep '06 13:59    Post subject: Reply with quote

i have all but few extensions enabled that are supplied with php or pecl pack
Back to top
Mirel



Joined: 23 Sep 2006
Posts: 6
Location: Slovakia

PostPosted: Sat 23 Sep '06 14:03    Post subject: Reply with quote

i tried to use the code above but it wrote:
Errors reported here must be corrected before the service can be started.
[notice] Disabled use of AcceptEx() WinSock2 API
Back to top
Mirel



Joined: 23 Sep 2006
Posts: 6
Location: Slovakia

PostPosted: Sat 23 Sep '06 14:15    Post subject: Reply with quote

the restart dont work
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Sat 23 Sep '06 17:21    Post subject: Reply with quote

Mirel wrote:
i tried to use the code above but it wrote:
Errors reported here must be corrected before the service can be started.
[notice] Disabled use of AcceptEx() WinSock2 API


The notice is harmless, not sure why restart is broken!


Code:
        EnableSendfile Off
        EnableMMAP Off
        Win32DisableAcceptEx


is a common fix for errors with AcceptEx, you where having some above so i suggested this. You can remove it if you wish.
Back to top
esantos



Joined: 06 Nov 2006
Posts: 2

PostPosted: Mon 06 Nov '06 18:39    Post subject: IIS and Apache conflicted Reply with quote

In my case, I received several errors:

-----------
The Apache service named reported the following error:
>>> [Mon Nov 06 11:14:40 2006] [notice] Disabled use of AcceptEx() WinSock2 API .

The Apache service named reported the following error:
>>> (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:9081

The Apache service named reported the following error:
>>> no listening sockets available, shutting down

The Apache service named reported the following error:
>>> Unable to open logs .

The Apache service named reported the following error:
>>> [Mon Nov 06 11:15:33 2006] [notice] Disabled use of AcceptEx() WinSock2 API .
-----------

All of which were solved once I stopped an IIS website which should have been stopped and was listening on port 9081, the port in which Apache was also set to listen.

That solved the issue.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 06 Nov '06 19:07    Post subject: Reply with quote

could not bind to address 0.0.0.0:9081 means that a programm is on Port 9081. use Console and netstat -ab

Why do you run on Port 9081?
Back to top
esantos



Joined: 06 Nov 2006
Posts: 2

PostPosted: Mon 06 Nov '06 19:53    Post subject: Reply with quote

We run the Apache on port 9081, to run Webtrends 7.5. A previous version of Webtrends had been configured to run over that port. To keep FW changes to a minimum, we changed the configurable default Webtrends 7.5 ports (7099) to run on 9081 instead.

All is well now.

Thanks.
Back to top


Reply to topic   Topic: Apache refuses to do a graceful restart View previous topic :: View next topic
Post new topic   Forum Index -> Apache