You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Llelan D." <NO...@TheSnakePitDev.com> on 2003/10/19 01:21:53 UTC

[users@httpd] Browser access to Apache on W2k hangs.

I have installed the binary Apache 2.0.47 on a Win2KPro machine named 
"Private" (192.163.0.1) on a local private TCP/IP network. I specified 
"Private" as both the domain and server name. I can ping both "Private" and 
"localhost". No other server is running and netstat shows no listeners on port 
80 before Apache is started. The Windows services monitor and the Apache 
monitor shows that the Apache service is up-and-running.

When I try to access Apache with any browser from the same machine using the 
address "http://Private/" or "http://localhost/", the page never loads and the 
browser is forever stuck in the "loading" state for that page. This doesn't 
actually hang the browser, as it can load other pages, but it will never 
finish loading the Apache page nor does it display any error or timeout message.

If I stop Apache and start IIS, things work fine. Neither the error log nor 
the access log have any error messages. The access log remains blank, and the 
error log only has the normal stop and start messages. There are no Apache 
entries in the Windows event logs.

Does anyone have any idea what is going on, why I never get an error message 
on either the server or client side, and what tool I can use to find out why 
the page is never sent? It seems I connect just fine (netstat shows the TCP 
connection to port 80), but that no data is being sent. However, I never get a 
timeout.

Any assistance provided would be greatly appreciated.

Some related httpd.conf entries:
     ServerRoot "C:/Program Files/Apache Group/Apache2"
     Listen 80
     ServerName Private:80

The error.log:
     [Sat Oct 18 16:09:34 2003] [notice] Parent: Received shutdown signal -- 
Shutting down the server.
     [Sat Oct 18 16:09:34 2003] [notice] Child 4492: Exit event signaled. 
Child process is ending.
     [Sat Oct 18 16:09:35 2003] [notice] Child 4492: Released the start mutex
     [Sat Oct 18 16:09:36 2003] [notice] Child 4492: Waiting for 250 worker 
threads to exit.
     [Sat Oct 18 16:09:36 2003] [notice] Child 4492: All worker threads have 
exited.
     [Sat Oct 18 16:09:36 2003] [notice] Child 4492: Child process is exiting
     [Sat Oct 18 16:09:36 2003] [notice] Parent: Child process exited 
successfully.
     [Sat Oct 18 16:09:41 2003] [notice] Parent: Created child process 120
     [Sat Oct 18 16:09:41 2003] [notice] Child 120: Child process is running
     [Sat Oct 18 16:09:41 2003] [notice] Child 120: Acquired the start mutex.
     [Sat Oct 18 16:09:41 2003] [notice] Child 120: Starting 250 worker threads.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.

BAO RuiXian wrote:
> Okay, you don't test it. Since you have a problem, there must be 
> someting wrong here. Different tests may disclose the problem. Would you 
> like to try from command window the command "telnet 127.0.0.1 80", then 
> "GET / HTTP/1.1" followed by two Enters?

Yes I did test it, as stated in the original message. To clarify, I've tried 
to access the server with "Private", "192.168.0.1", "localhost", and 
"127.0.0.1", and none of them return a page or an error. Unlike an invalid 
address which returns a timeout error when it tries to connect, these 
addresses connect (I see it in netstat) and wait forever for data. I've proved 
the validity of the DNS lookups and the underlying protocol stack by pinging 
and temporarily enabling IIS.

Telnet with any the above on port 80 does not return anything after the GET is 
sent, and telnet then does not respond to a ctrl-c and the console window has 
to be closed.

What is frustrating is that I don't get a blessed log entry in either the 
access or error logs.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by BAO RuiXian <ru...@pp.inet.fi>.

Llelan D. wrote:
> 
> 
> BAO RuiXian wrote:
> 
>> Have you tried http://127.0.0.1? Or to make sure there is no conflicts 
>> with IIS, can you change port number from 80 to something else, say 8100.

Okay, you don't test it. Since you have a problem, there must be 
someting wrong here. Different tests may disclose the problem. Would you 
like to try from command window the command "telnet 127.0.0.1 80", then 
"GET / HTTP/1.1" followed by two Enters?

Best

Bao

> 
> As I've already said, "localhost" pings just fine, here are no other 
> servers, like IIS, running, and netstat shows no listeners on port 80 
> prior to the installation of apache.
> 




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.

BAO RuiXian wrote:
> Have you tried http://127.0.0.1? Or to make sure there is no conflicts 
> with IIS, can you change port number from 80 to something else, say 8100.

As I've already said, "localhost" pings just fine, here are no other servers, 
like IIS, running, and netstat shows no listeners on port 80 prior to the 
installation of apache.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Browser access to Apache on W2k hangs.

Posted by BAO RuiXian <ru...@pp.inet.fi>.

Llelan D. wrote:
> I have installed the binary Apache 2.0.47 on a Win2KPro machine named 
> "Private" (192.163.0.1) on a local private TCP/IP network. I specified 
> "Private" as both the domain and server name. I can ping both "Private" 
> and "localhost". No other server is running and netstat shows no 
> listeners on port 80 before Apache is started. The Windows services 
> monitor and the Apache monitor shows that the Apache service is 
> up-and-running.

Have you tried http://127.0.0.1? Or to make sure there is no conflicts 
with IIS, can you change port number from 80 to something else, say 8100.

Best

Bao

> When I try to access Apache with any browser from the same machine using 
> the address "http://Private/" or "http://localhost/", the page never 
> loads and the browser is forever stuck in the "loading" state for that 
> page. This doesn't actually hang the browser, as it can load other 
> pages, but it will never finish loading the Apache page nor does it 
> display any error or timeout message.
> 
> If I stop Apache and start IIS, things work fine. Neither the error log 
> nor the access log have any error messages. The access log remains 
> blank, and the error log only has the normal stop and start messages. 
> There are no Apache entries in the Windows event logs.
> 
> Does anyone have any idea what is going on, why I never get an error 
> message on either the server or client side, and what tool I can use to 
> find out why the page is never sent? It seems I connect just fine 
> (netstat shows the TCP connection to port 80), but that no data is being 
> sent. However, I never get a timeout.
> 
> Any assistance provided would be greatly appreciated.
> 
> Some related httpd.conf entries:
>     ServerRoot "C:/Program Files/Apache Group/Apache2"
>     Listen 80
>     ServerName Private:80
> 
> The error.log:
>     [Sat Oct 18 16:09:34 2003] [notice] Parent: Received shutdown signal 
> -- Shutting down the server.
>     [Sat Oct 18 16:09:34 2003] [notice] Child 4492: Exit event signaled. 
> Child process is ending.
>     [Sat Oct 18 16:09:35 2003] [notice] Child 4492: Released the start 
> mutex
>     [Sat Oct 18 16:09:36 2003] [notice] Child 4492: Waiting for 250 
> worker threads to exit.
>     [Sat Oct 18 16:09:36 2003] [notice] Child 4492: All worker threads 
> have exited.
>     [Sat Oct 18 16:09:36 2003] [notice] Child 4492: Child process is 
> exiting
>     [Sat Oct 18 16:09:36 2003] [notice] Parent: Child process exited 
> successfully.
>     [Sat Oct 18 16:09:41 2003] [notice] Parent: Created child process 120
>     [Sat Oct 18 16:09:41 2003] [notice] Child 120: Child process is running
>     [Sat Oct 18 16:09:41 2003] [notice] Child 120: Acquired the start 
> mutex.
>     [Sat Oct 18 16:09:41 2003] [notice] Child 120: Starting 250 worker 
> threads.
> 




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by Robert Andersson <ro...@profundis.nu>.
Llelan D wrote:
> > Does it go something like this:
> > 1. Hits if(!context), gets context and continues
> > 2. Hits if(context->accept_socket == INVALID_SOCKET), and gets one
> > 3. AcceptEx() fails.
> > 4. rv == APR_FROM_OS_ERROR(WSANOTSOCK) is true, so it
> >    close the socket, and set it to INVALID_SOCKET, and continues
> > 5. Goto 2
>
> Bingo, except 5 goes back to the the top of the while loop, before 1, via
the
> continue statement.

Yes, perhaps the list was misleading. Even though it, of course, starts at
the top of the while(), I didn't think that it "hits" [1] (gets context) in
the second iteration, right?

> As I said, I compiled in some getsockopt() calls and found both sockets to
> be valid (SO_ERROR == 0) and the listener to be listening
> (SO_ACCEPTCONN == TRUE).

I guess it doesn't really matter, but I meant the actual value it held, but
nevermind.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.
Robert Andersson wrote:
> Which while() loop do you mean? There is while(!shutdown_in_progress) and
> while(1). If the former, are they not hiting the Sleep(0) or Sleep(100)? If
> I understand your description correctly, you do not ever get to the while(1)
> loop.

The AcceptEx() call is only in the while(!shutdown_in_progress) loop. The 
while(1) loop is after the AcceptEx() error handling if-blocks and implements 
the context overlapped event wait, which I stated no thread ever reaches.

> Does it go something like this:
> 1. Hits if(!context), gets context and continues
> 2. Hits if(context->accept_socket == INVALID_SOCKET), and gets one
> 3. AcceptEx() fails.
> 4. rv == APR_FROM_OS_ERROR(WSANOTSOCK) is true, so it
>    close the socket, and set it to INVALID_SOCKET, and continues
> 5. Goto 2

Bingo, except 5 goes back to the the top of the while loop, before 1, via the 
continue statement.

> That's pretty weird. It is probably not context->socket that is messed up,
> but nlsd (the listening socket). Take a look in the debugger what value they
> both have.

As I said, I compiled in some getsockopt() calls and found both sockets to be 
valid (SO_ERROR == 0) and the listener to be listening (SO_ACCEPTCONN == TRUE).

> I'm not sure it is appropriate to suggest, but you could perhaps write up a
> summary of your findings and post to the developer list. A Windows developer
> might be able to suggest what is causing this behaviour.

That's where I intend to go next, I just wanted to get a proper development 
environment for Apache up and running, and to see if anyone here had anything 
to add.

Thanks for your help Robert. In the past, those few folk who have run into 
this have apparently given up and gone to another machine, but I want to 
identify this and solve it once and for all. Stuff like this keeps me up at 
night, and I get cranky without a nap <grin>.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by Robert Andersson <ro...@profundis.nu>.
Llelan D wrote:
> What is happening is that EVERY time any of the child threads does an
> AcceptEx(), a WSAENOTSOCK is returned, the accept socket is closed,
> a debug message is logged, and it continues the while loop. [...] sucks up
a
> huge amount of CPU time as I have 250 threads in dead loops

Which while() loop do you mean? There is while(!shutdown_in_progress) and
while(1). If the former, are they not hiting the Sleep(0) or Sleep(100)? If
I understand your description correctly, you do not ever get to the while(1)
loop.

Does it go something like this:
1. Hits if(!context), gets context and continues
2. Hits if(context->accept_socket == INVALID_SOCKET), and gets one
3. AcceptEx() fails.
4. rv == APR_FROM_OS_ERROR(WSANOTSOCK) is true, so it
   close the socket, and set it to INVALID_SOCKET, and continues
5. Goto 2

That's pretty weird. It is probably not context->socket that is messed up,
but nlsd (the listening socket). Take a look in the debugger what value they
both have.

> Am verrrrrry confoozled.

So am I.

> Could anyone with a Win2KPro that correctly runs Apache 2.0.47 let me know
> if you see the same "Not a socket" debug messages in your error log when
you
> set the directive "LogLevel debug" in your httpd.conf file? In mine they
are
> continuously logged from when Apache is started.

I have no quick access to a Windows 2k box, but I will try to remember to
check later.

I'm not sure it is appropriate to suggest, but you could perhaps write up a
summary of your findings and post to the developer list. A Windows developer
might be able to suggest what is causing this behaviour.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.
Ok, I've now got lots more concrete info.

I went through my services and disabled everything even remotely related to 
networking or telephony and it made no difference. The IP is static. IPSEC is 
not enabled. TCP/IP filtering is not enabled.

I compiled a debug version of Apache, verified it did the same thing, and ran 
the second process in the debugger with breakpoints and some socket query code 
in winnt_accept().

What is happening is that EVERY time any of the child threads does an 
AcceptEx(), a WSAENOTSOCK is returned, the accept socket is closed, a debug 
message is logged, and it continues the while loop. I never get to a single 
wait-on-event call. This is happening continuously from process inception, 
before any connection is attempted, and sucks up a huge amount of CPU time as 
I have 250 threads in dead loops.

As a result, no thread can ever accept any connection on any listening socket, 
even though the underlying TCP/IP stack shows the listener and connection in 
netstat. When I set breakpoints anywhere after the WSAENOTSOCK error handler 
for the AcceptEx() call, they are never fired. When I set a breakpoint in the 
WSAENOTSOCK error handler, it is always fired.

I haven't been able to find any reference as to why or when AcceptEx() would 
return a WSAENOTSOCK error, or which socket it means (listener or acceptor). 
The socket query code I inserted proves that both the listener and accept 
sockets are valid (SO_ERROR == 0), and that the listener is listening 
(SO_ACCEPTCONN == TRUE).

Am verrrrrry confoozled.

Could anyone with a Win2KPro that correctly runs Apache 2.0.47 let me know if 
you see the same "Not a socket" debug messages in your error log when you set 
the directive "LogLevel debug" in your httpd.conf file? In mine they are 
continuously logged from when Apache is started.

And, does anyone have any idea what the <blue word> is going on with 
AcceptEx()? Since most others do not see the problem, it should be something 
installed in or configured in my machine that Apache does not like, though I 
have seen a couple of other descriptions of this same problem in a web search 
that were never answered. I have a lot of different networking and 
communication applications, and none of them have any problems when run 
seperately or concurrently. This only happens with Apache. Unfortunately, 
Apache won't run if the machine is booted in "Safe Mode With Networking".

Is there a list of Windows, Winsock, or TCP/IP configuration do's and don'ts 
that might relate to this problem?

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.

Ace Suares wrote:
> I had made some symbolic links, on linux that is, and it seemed to choke on 
> that in much the same way you are seeing.
> 
> But I just removed the links and set a different serverroot and didn't 
> investigate the problem. At the same time I was also toying with .htaccess 
> files and mod_auth_ldap, so utter confusion urged me to 'briddle' (randomly 
> change configuration until problem goes away).

No links involved here, symbolic or otherwise. Cherry "c:/apache2" root.

Briddle??? What a great word for a time-tested and valuable technique. 
Consider it vernaculated.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by Ace Suares <ac...@suares.nl>.

I had made some symbolic links, on linux that is, and it seemed to choke on 
that in much the same way you are seeing.

But I just removed the links and set a different serverroot and didn't 
investigate the problem. At the same time I was also toying with .htaccess 
files and mod_auth_ldap, so utter confusion urged me to 'briddle' (randomly 
change configuration until problem goes away).


+_Ace

-- 
Ace Suares' Internet Consultancy
NIEUW ADRES: Postbus 2599, 4800 CN Breda
telefoon: 06-244 33 608
fax en voicemail: 0848-707 705
website: http://www.suares.nl * http://www.qwikzite.nl

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.
Robert Andersson wrote:
> Hmm, not sure why. I've been able to set breakpoints just fine, although not
> in that particular function. Sorry, cannot test right now. It might be
> because some obscure threading stuff. Try in ap_read_request() in
> server/protocol.c.

I got it. Since I don't know the Apache implementation structure, I didn't 
know that winnt_accept() is a thread client under a second process. All I have 
to do is attach a second IDE debugging session to that process and the 
breakpoints work.

I got the BSCs too. Only the BuildBin, InstallBin, libapiconv_css_modules, and 
libapiconv_ces_modules projects use makefiles. The rest use the project files, 
so you can set the build and generate browser info flags as normal (for VS 
that is). Setting libhttpd as the active project allows you to browse the 
symbols for child.c and related modules.

It doesn't help my current problem, but at least now I'm cooking with LOX. 
<grin> Thanks for the suggestion.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by Robert Andersson <ro...@profundis.nu>.
Llelan D wrote:
> I know the function (winnt_accept in child.c), and it compiles in debug
mode
> just fine. It runs in the debugger, but refuses to break at any of my
breakpoints.

Hmm, not sure why. I've been able to set breakpoints just fine, although not
in that particular function. Sorry, cannot test right now. It might be
because some obscure threading stuff. Try in ap_read_request() in
server/protocol.c.

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.

Robert Andersson wrote:
> Yes, it's possible. Compile Apache in debug mode and set a breakpoint in the
> function where it reads the request (can't recall name/file, atm).

I know the function (winnt_accept in child.c), and it compiles in debug mode 
just fine. It runs in the debugger, but refuses to break at any of my breakpoints.

Also, the debug mode in the makefiles does not create the BSC file. Does 
anyone know how this is done?

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by Robert Andersson <ro...@profundis.nu>.
Llelan D wrote:
> Isn't there a finer grain of debugging this thing to find out if Apache is
> even seeing the connection? Can it be run in the VC debugger with
breakpoints?

Yes, it's possible. Compile Apache in debug mode and set a breakpoint in the
function where it reads the request (can't recall name/file, atm).

Regards,
Robert Andersson


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.
BAO RuiXian wrote:

> Okay, I have given it a search on google by the string "An operation was 
> attempted on something that is not a socket". This particular message 
> can result from two situations:
> 
>     1. Apache 2.0.43 with McAfee Firewall. Since you run with Apache 
> 2.047, so it is out of question. Because it is said the problem was 
> fixed in Apache 2.044.
> 
>     2. If you have a IP address from Dynamic Host Configuration Protocol 
> (DHCP) server, and you have a third party product installed on your 
> computer and also run the commands 'ipconfig', 'release' and 'renew', 
> your windows sockets registry entries may be corrupted.

The message was changed from an error in 43 to a debug because AcceptEx can 
return that error in a number of non-critical circumstances. Through the 
current code is a kludge around it, it does not seem to relate to my current 
problem.

Though McAfee VirusShield is installed, their firewall is not. I'm very 
familiar with their firewall from when they originally purchased the code. 
It's something I'll never install again (triple ech!). I've tried this with 
McAfee disabled and I get the same thing.

This machine is a Win2kPro and has a statically defined local IP 
(192.168.0.1), so it doesn't change with DHCP.

> Based on your claim, you can still run IIS on port 80 fine, I can't say 
> your sockets registry entries totally corrupted, but, I still think it 
> is somehow related to your port/socket. Maybe you still can try to 
> change the port 80 to 8100 in your config to see what happend. In case 
> it is your socket registry entries corrupted, see the following link how 
> to repair it:
> 
>     http://www.jsiinc.com/SUBN/tip6600/rh6613.htm

Different port, same problem. I can see the listener and the connections in 
netstat, but the file is never sent. What I really do not understand is why 
there are no access log entries if Apache accepted the connection.

I've never had a problem with any other network related software on this 
machine: Internet browsers, FTP, NNTP, socket pipes, etc.

Isn't there a finer grain of debugging this thing to find out if Apache is 
even seeing the connection? Can it be run in the VC debugger with breakpoints? 
Can it be compiled with the BSC information?

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by BAO RuiXian <ru...@pp.inet.fi>.

Llelan D. wrote:
> 
> 
> Llelan D. wrote:
> 
>> Checking child.c, I see that the WinSock AcceptEx is failing with a 
>> WSAEINVAL error (proved with a little code poking). I do not know if 
>> this is an actual error condition, or just a kludgy clean-up from the 
>> file transmission.
> 
> 
> <sigh> Sorry, cut and pasted the wrong error message. It fails with 
> WSAENOTSOCK.

Interesting. You could even made mistakes by cut-and-paste:)

Okay, I have given it a search on google by the string "An operation was 
attempted on something that is not a socket". This particular message 
can result from two situations:

	1. Apache 2.0.43 with McAfee Firewall. Since you run with Apache 2.047, 
so it is out of question. Because it is said the problem was fixed in 
Apache 2.044.

	2. If you have a IP address from Dynamic Host Configuration Protocol 
(DHCP) server, and you have a third party product installed on your 
computer and also run the commands 'ipconfig', 'release' and 'renew', 
your windows sockets registry entries may be corrupted.

Based on your claim, you can still run IIS on port 80 fine, I can't say 
your sockets registry entries totally corrupted, but, I still think it 
is somehow related to your port/socket. Maybe you still can try to 
change the port 80 to 8100 in your config to see what happend. In case 
it is your socket registry entries corrupted, see the following link how 
to repair it:

	http://www.jsiinc.com/SUBN/tip6600/rh6613.htm

Good luck

Bao





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.

Llelan D. wrote:

> Checking child.c, I see that the WinSock AcceptEx is failing with a 
> WSAEINVAL error (proved with a little code poking). I do not know if 
> this is an actual error condition, or just a kludgy clean-up from the 
> file transmission.

<sigh> Sorry, cut and pasted the wrong error message. It fails with WSAENOTSOCK.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Re: Browser access to Apache on W2k hangs.

Posted by "Llelan D." <NO...@TheSnakePitDev.com>.

Peter Bissmire wrote:

> Hi,
> 
> I have been running Apache on Windoze boxes for
> a few years.
> 
> Can I suggest you first go back to square one.
> Install your Apache with "dum" answers to any installer questions
> and using your machine's basic name (DNS A entry).
> 
> You should then get the Apache default page.

The binary installer forces you to choose a domain. I chucked the stupid 
thing, downloaded and compiled the source, and installed it directly. Using 
the cherry httpd.conf file that uses "localhost", I get exactly the same problem.

> One possible clue:- Have you got a DNS alias entry for "private"?
> It looks like you have if you can ping it.
> Have you tried asking your browser to get
> http://192.163.0.1 or http://127.0.0.1?
> With the default config, this should work without DNS.
> 
> You also need correct settings for DocumentRoot and
> directory access settings. The default config. gives this to you
> for Apache's default page.

As I stated in the original message, I can see the server in netstat listening 
on the correct port with the correct address, and I can see the two TCP 
connection entries for the browser. The connection IS being made and the 
browser is forever waiting for the file to be transferred. I have tried all 
the name and number options. By using ping and temporarily enabling IIS, I've 
already proved the DNS and underlying netork systems.

> Depending on the exact nature of a problem,
> some browsers can hang on for several minutes before giving up.
> If you go and have a coffee, you might find a message giving some clue.
> At least you will then see whether the server has responded
> or the browser has given up in desperation.

By "forever" I definitely mean longer than an hour - and I hate coffee 
<chuckle>. The browser only returns a "Document contains no data" error if I 
stop the server.

Another curious wrinkle: I found the "LogLevel" directive and set it to 
"debug". I get a continuous stream of this debug message.

     [Sun Oct 19 01:21:44 2003] [debug] child.c(547): (OS 10038)An operation 
was attempted on something that is not a socket.  : winnt_accept: AcceptEx 
failed due to early client disconnect. Reallocate the accept socket and try again.

Checking child.c, I see that the WinSock AcceptEx is failing with a WSAEINVAL 
error (proved with a little code poking). I do not know if this is an actual 
error condition, or just a kludgy clean-up from the file transmission.

-- 
--------------------------------------------------------
The Snake Pit - Development   www.TheSnakePitDev.com
Curtis Clauson                LlelanD@TheSnakePitDev.com
Proprietor

"Any sufficiently over-complicated magic is indistinguishable from 
technology." -- Llelan D.



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Browser access to Apache on W2k hangs.

Posted by Peter Bissmire <pb...@onetel.net.uk>.
Hi,

I have been running Apache on Windoze boxes for
a few years.

Can I suggest you first go back to square one.
Install your Apache with "dum" answers to any installer questions
and using your machine's basic name (DNS A entry).

You should then get the Apache default page.

Once this is working, you can tinker with config, one change at a time.
That way you narrow the field for your investigations
and can see which change breaks it.

One possible clue:- Have you got a DNS alias entry for "private"?
It looks like you have if you can ping it.
Have you tried asking your browser to get
http://192.163.0.1 or http://127.0.0.1?
With the default config, this should work without DNS.

You also need correct settings for DocumentRoot and
directory access settings. The default config. gives this to you
for Apache's default page.

Depending on the exact nature of a problem,
some browsers can hang on for several minutes before giving up.
If you go and have a coffee, you might find a message giving some clue.
At least you will then see whether the server has responded
or the browser has given up in desperation.

Hope that helps
Peter Bissmire




"Llelan D." wrote:

> I have installed the binary Apache 2.0.47 on a Win2KPro machine named
> "Private" (192.163.0.1) on a local private TCP/IP network. I specified
> "Private" as both the domain and server name. I can ping both "Private" and
> "localhost". No other server is running and netstat shows no listeners on port
> 80 before Apache is started. The Windows services monitor and the Apache
> monitor shows that the Apache service is up-and-running.
>
> When I try to access Apache with any browser from the same machine using the
> address "http://Private/" or "http://localhost/", the page never loads and the
> browser is forever stuck in the "loading" state for that page. This doesn't
> actually hang the browser, as it can load other pages, but it will never
> finish loading the Apache page nor does it display any error or timeout message.
>
> If I stop Apache and start IIS, things work fine. Neither the error log nor
> the access log have any error messages. The access log remains blank, and the
> error log only has the normal stop and start messages. There are no Apache
> entries in the Windows event logs.
>
> Does anyone have any idea what is going on, why I never get an error message
> on either the server or client side, and what tool I can use to find out why
> the page is never sent? It seems I connect just fine (netstat shows the TCP
> connection to port 80), but that no data is being sent. However, I never get a
> timeout.
>
> Any assistance provided would be greatly appreciated.
>
> Some related httpd.conf entries:
>      ServerRoot "C:/Program Files/Apache Group/Apache2"
>      Listen 80
>      ServerName Private:80
>
> The error.log:
>      [Sat Oct 18 16:09:34 2003] [notice] Parent: Received shutdown signal --
> Shutting down the server.
>      [Sat Oct 18 16:09:34 2003] [notice] Child 4492: Exit event signaled.
> Child process is ending.
>      [Sat Oct 18 16:09:35 2003] [notice] Child 4492: Released the start mutex
>      [Sat Oct 18 16:09:36 2003] [notice] Child 4492: Waiting for 250 worker
> threads to exit.
>      [Sat Oct 18 16:09:36 2003] [notice] Child 4492: All worker threads have
> exited.
>      [Sat Oct 18 16:09:36 2003] [notice] Child 4492: Child process is exiting
>      [Sat Oct 18 16:09:36 2003] [notice] Parent: Child process exited
> successfully.
>      [Sat Oct 18 16:09:41 2003] [notice] Parent: Created child process 120
>      [Sat Oct 18 16:09:41 2003] [notice] Child 120: Child process is running
>      [Sat Oct 18 16:09:41 2003] [notice] Child 120: Acquired the start mutex.
>      [Sat Oct 18 16:09:41 2003] [notice] Child 120: Starting 250 worker threads.
>
> --
> --------------------------------------------------------
> The Snake Pit - Development   www.TheSnakePitDev.com
> Curtis Clauson                LlelanD@TheSnakePitDev.com
> Proprietor
>
> "Any sufficiently over-complicated magic is indistinguishable from
> technology." -- Llelan D.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org