Webware / localhost vs. real IP address

Patrick Useldinger p at trick.lu
Sun Feb 15 11:48:56 EST 2004


Hi all,

I'm not sure whether this is Webware or Python-related, but I have to
start somewhere.

I have a small Webware server running on port 8086, with Webware's http
server listening to port 8080 (all standard). The IP address of my
machine is 192.168.1.2, and it's running WinXP. 

If I point my Opera to 127.0.0.1:8080, all works well. If I do the same
with 192.168.1.2:8080, which should be the same, it says 'could not
connect to remote server'.

A short Python http client will work with the first address, and says
the follwing when pointed to the second:
Traceback (most recent call last):
  File
"C:\Programs\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
    exec codeObject in __main__.__dict__
  File "C:\prj\dynip\myselfhttp.py", line 11, in ?
    router.request('GET','/')
  File "C:\Programs\Python23\Lib\httplib.py", line 718, in request
    self._send_request(method, url, body, headers)
  File "C:\Programs\Python23\Lib\httplib.py", line 739, in _send_request
    self.endheaders()
  File "C:\Programs\Python23\Lib\httplib.py", line 712, in endheaders
    self._send_output()
  File "C:\Programs\Python23\Lib\httplib.py", line 597, in _send_output
    self.send(msg)
  File "C:\Programs\Python23\Lib\httplib.py", line 564, in send
    self.connect()
  File "C:\Programs\Python23\Lib\httplib.py", line 548, in connect
    raise socket.error, msg
error: (10061, 'Connection refused')

The local firewall has been disabled.

The routes seem to be OK as well:
C:\Documents and Settings\pu>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 80 ad 0b 16 22 ...... CNet PRO200 PCI Fast Ethernet Adapter -
Packet Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface
Metric
          0.0.0.0          0.0.0.0      192.168.1.1     192.168.1.2
30
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1
1
      192.168.1.0    255.255.255.0      192.168.1.2     192.168.1.2
30
      192.168.1.2  255.255.255.255        127.0.0.1       127.0.0.1
30
    192.168.1.255  255.255.255.255      192.168.1.2     192.168.1.2
30
        224.0.0.0        240.0.0.0      192.168.1.2     192.168.1.2
30
  255.255.255.255  255.255.255.255      192.168.1.2     192.168.1.2
1
Default Gateway:       192.168.1.1
===========================================================================
Persistent Routes:
  None

Any clues?

Regards,
-PU
--
http://www.homepages.lu/pu/



More information about the Python-list mailing list