Solved

Apache accessible from localhost, but not from LAN: Socket error # 10061 Connection refused

Posted on 2004-08-18
19
840 Views
Last Modified: 2010-03-04
Hi all,

I installed Apache 2.0.50 on a W2K system (machine A). It works fine on that machine (localhost, 127.0.0.1 using port 80), but it is not accessible from another machine within the same LAN (machine B). In Internet Explorer I get the "page not found" error; using the Indy component in Borland C++ Builder I get the error: Socket error # 10061 Connection refused

I am not using any firewalls. I can ping A from B.

I have installed Apache on several other machines, but I've never encountered this problem.

Thank you for your help!

Manu



0
Comment
Question by:_manu_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 6
  • 4
  • +1
19 Comments
 
LVL 15

Accepted Solution

by:
samri earned 125 total points
ID: 11828685
Things that you could try;

- Test IP connectivity to that machine from remote machine. You can ping from A (apache) to B, but how about B (remote) to A (apache) ?
- Any customization to apache configuration file?  Please check you httpd.conf, and locate the Bind (which I think being obseleted in Apache2) and Listen (http://httpd.apache.org/docs-2.0/mod/mpm_common.html#listen) directive.  Make sure it's not configure to use only 127.0.0.1

More stuff to look at:
http://httpd.apache.org/docs-2.0/bind.html

Hope this would help.
0
 

Author Comment

by:_manu_
ID: 11828730
Hi samri,

I can ping from B to A and from A to B.

I didn't do any changes to the configuration file, except two lines for the DocumentRoot.

Listen 80

The bind directive isn't there.


0
 
LVL 15

Expert Comment

by:samri
ID: 11829290
the error that you are getting is from a customized application -- which i am not sure of the behavior.

Please could you test with using a normail web browser, and do http://ipaddressofapache/ or do a "telnet ipaddressofapache 80".  If using telnet, you should be getting a blank screen, type in anything, and press enter twice.  If there is a problem with connection, you should get "connection refused" error.

Give it a try.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:_manu_
ID: 11829551
I don't know the exact English translation of the error that I get in IE6 because the error page is in Dutch, but it should be something like this:

The page cannot be displayed/found.

At the bottom:

Cannot find the server or DNS error

Each time I do the request, I can very briefly see some network traffic on the apache machine.



0
 

Author Comment

by:_manu_
ID: 11829614
Oh telnet didn't work either :-(
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11830883
can you not access using IP, or using hostname?
0
 

Author Comment

by:_manu_
ID: 11831245
ahoffmann: both.

I also have apache installed on the "remote" machine; i can access it without a problem from my "apache" machine if you see what i mean

0
 
LVL 15

Expert Comment

by:samri
ID: 11831527
_manu_,

So we you can reach apache on machineB from machineA, but not be able to reach apacheA from machineB.

Do you had any chance of try from another machine.  (if you could, then maybe something is funny with machineB),

If not, then -- it's heck of a problem (to me).

Could you check if the network setting for both machine A and B is the same .. Ip address got to be different (of course), but check the netmask, gateway.

Also try to do tracert (traceroute) from A -> B and B -> A , and check the hops.  I would suspect that there should be no problem since both machine can ping each other.

Do you use proxy setting on machineB.   (doesn't make much sense since "telnet machineA 80" does not work at all).

Personally, I would try to reboot, and reinstall Apache, or maybe totally remove it, and do fresh install  -- kind harsh suggestion, but knowing windows env, most of the time the problem will just "mysteriously" self-resolved. :)

0
 

Author Comment

by:_manu_
ID: 11831625
I can't reach apacheA, not from machineB, nor from machineC :-)

so it is heck of a problem to me too

subnet mask and default gateway are the same; ip 192.168.123.120 & 192.168.123.110 ...

it IS a fresh installation on machineA and i've also rebooted it

and no problem with tracert

try a re-reinstallation? :-)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11831692
check with:
   netstat -pan|grep 80
0
 
LVL 15

Expert Comment

by:samri
ID: 11832888
ahoffmann,

on which machine? A (running apache) or B ?

Okay..

onmachineA (which is running apache), we can confirm that you could do http://127.0.0.1/ or http://localhost/, but could you test http://ipaddress/ <-- which is the ipaddress of network card.
0
 

Author Comment

by:_manu_
ID: 11833588
http://127.0.0.1, http://localhost/, http://192.168.123.120/  on Apache machine: they all work.
0
 
LVL 15

Expert Comment

by:samri
ID: 11833670
hmm... it's almost 2 in the morning... (it;s hard to think when half of you brain is already in bed :)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11834676
> http://127.0.0.1, http://localhost/, http://192.168.123.120/  on Apache machine: they all work.
and not from machineB, then either routing or firewall problem
did you see somthing in error_log when trying to connect from machineB?
0
 

Author Comment

by:_manu_
ID: 11838667
ahoffmann, machineA does not have a firewall; both machines are connected to a router; and if - on my router - I explicitly allow machineB to connect to machineA on port 80 the page cannot be displayed

there is one other thing that I think of now: machineA is in a domain, machineB isn't (just a workgroup); could it have something to do with this?
0
 

Author Comment

by:_manu_
ID: 11838679
I don't see anything special in the error_log
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 11839237
can you sniff the network on machineA, ethereal or whatever ...
0
 
LVL 15

Expert Comment

by:samri
ID: 11842457
apart from sniffing, the problems just a bit too weird.

could you try to configure apache to listen on different port -- let say 9000 (look for Listen directive in httpd.conf), and adjust it to "Listen 9000", and see if you could do http://machinea:9000/ from machineB.

0
 

Expert Comment

by:tiamkean
ID: 11899005
Maybe you can try to connect machineA and machineB using cross cable only to check out whether your router is creating some problem.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question