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 only works in debug mode
Author
IanSabey



Joined: 25 Jan 2008
Posts: 4

PostPosted: Fri 25 Jan '08 3:23    Post subject: Apache only works in debug mode Reply with quote

Apache 2.2.8 running on XP. This is a brand new install and I have made no configuration changes. The wierd thing is that if I start apache from the command line like
C:>httpd -X
it seems to work fine but if I leave off the -X or run it as a service it starts fine but no pages are delivered to browsers. This is the same whether the browser is running on the server machine or elsewhere on the network.
The server in this case is a Dell Latitude which is my development platform.

I have also recently installed three other servers from the same archive and they worked straight off without any problems.

I would be grateful for any suggestions as to what to try next.

Ian.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Fri 25 Jan '08 6:27    Post subject: Reply with quote

Anything in the logs\error.log file?

Another thing to try is starting Apache from the command line with:
    httpd.exe -w -e debug
This may give you some additional clues.

-tom-
Back to top
IanSabey



Joined: 25 Jan 2008
Posts: 4

PostPosted: Fri 25 Jan '08 6:53    Post subject: Reply with quote

Hi Tom,

Without the -X, nothing in the access log at all. Browser just say's "Waiting for..." until it gives up after about 5 minutes. The error log just shows the usual startup messages. I've had a network sniffer running and it shows a connection being established and the GET request being sent but nothing coming back.

I did try using -w -e debug, and got a bunch of messages about modules being loaded - nothing which looks like an error.

Just had an idea though. I believe that the -X flag affects the way the server creates threads and I've just realised that the difference between this laptop and the other 3 boxes is that the laptop is dual core - or am I just clutching at straws here?

Thanks
Ian.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Fri 25 Jan '08 18:06    Post subject: Reply with quote

re: "the -X flag affects the way the server creates threads"
It really affects how Apache creates processes. Apache creates threads the same way with either method.

With the -X switch, only one httpd process is created. Without -X, or running as a service, two httpd processes should be created.
You can check this in the Processes tab of Task Manager (Ctrl-Shift-Esc).

Are you using Apache 2.2.8 from httpd.apache.org or downloaded from Apache Lounge? They differ slightly, per this post.

re: "the laptop is dual core"
That really shouldn't make any difference. I agree that you may be clutching at straws here.

Anything in the Windows Event Log when you start Apache as a service, or without the -X switch?

-tom-
Back to top
IanSabey



Joined: 25 Jan 2008
Posts: 4

PostPosted: Fri 25 Jan '08 20:55    Post subject: Reply with quote

Hi Tom,

Apache binary is from Apache lounge.

There are no messages in the Windows event log which refer to either httpd or apache.

Task manager confirms that with the -X switch only one process is created but two are created without it. Is it possible to start the service in just one process? If so, that might give us some more information.

The odd thing is that I have installed the same binary, from the same download, on four machines with the same OS and all available updates installed. Three have worked perfectly straight away but the 'best' machine is behaving so differently. OS is XP pro by the way.

Thanks

Ian.
Back to top
tdonovan
Moderator


Joined: 17 Dec 2005
Posts: 611
Location: Milford, MA, USA

PostPosted: Sun 27 Jan '08 16:42    Post subject: Reply with quote

That is a very odd problem.

A couple more things you can try when running Apache as a service or without the -X switch:
    * request a page and get a "Waiting for..." and blank screen, then [View] [Source] in the browser and see if there is anything at all in the response

    * in a command window type netstat -an and confirm that there is one process listening on port 80:
    Code:
    Proto  Local Address          Foreign Address        State
    TCP    0.0.0.0:80             0.0.0.0:0              LISTENING

    * Add the Win32DisableAcceptEx directive to your httpd.conf
There is also the possibility that some other software on your laptop (anti-virus, firewall, etc.) is interfering with Apache sending responses. You might try disabling these one-by-one temporarily while testing Apache.

-tom-
Back to top
IanSabey



Joined: 25 Jan 2008
Posts: 4

PostPosted: Sun 27 Jan '08 20:53    Post subject: Reply with quote

Hi Tom,

Thanks for replying. The problem is odd indeed!

Win32DisableAcceptEx appears to be what I have looking for and apache is now working OK as a service.

Seems this machine has some dodgy networking code in it somewhere although I don't quite understand it. I have run Wireshark while trying to get to the bottom of this and it quite clearly shows the connection being established, the GET request being sent and an acknwoledge packet returning. BUT, there is no entry in the access.log and no HTTP response on the wire.

Anyway, thanks again Tom for all your help, I don't know how I would have managed without you.

Best wishes

Ian.
Back to top


Reply to topic   Topic: Apache only works in debug mode View previous topic :: View next topic
Post new topic   Forum Index -> Apache