Webware / localhost vs. real IP address

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick Useldinger

    Webware / localhost vs. real IP address

    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:808 0, 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\Py thon23\lib\site-packages\Python win\pywin\frame work\scriptutil s.py",
    line 310, in RunScript
    exec codeObject in __main__.__dict __
    File "C:\prj\dynip\m yselfhttp.py", line 11, in ?
    router.request( 'GET','/')
    File "C:\Programs\Py thon23\Lib\http lib.py", line 718, in request
    self._send_requ est(method, url, body, headers)
    File "C:\Programs\Py thon23\Lib\http lib.py", line 739, in _send_request
    self.endheaders ()
    File "C:\Programs\Py thon23\Lib\http lib.py", line 712, in endheaders
    self._send_outp ut()
    File "C:\Programs\Py thon23\Lib\http lib.py", line 597, in _send_output
    self.send(msg)
    File "C:\Programs\Py thon23\Lib\http lib.py", line 564, in send
    self.connect()
    File "C:\Programs\Py thon23\Lib\http lib.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>rou te 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
    --

  • Diez B. Roggisch

    #2
    Re: Webware / localhost vs. real IP address

    Hi,
    [color=blue]
    > If I point my Opera to 127.0.0.1:8080, all works well. If I do the same
    > with 192.168.1.2:808 0, which should be the same, it says 'could not
    > connect to remote server'.[/color]
    [color=blue]
    >
    > Any clues?[/color]

    Yes - sockets that are connected to '' listen to all local addresses, while
    localhost listens only to 127.0.0.1 - this is somewhat misleading described
    in the socket module. So I guess you should configure webware in a way that
    its listening on '', not on localhost.

    --
    Regards,

    Diez B. Roggisch

    Comment

    • Patrick Useldinger

      #3
      Re: Webware / localhost vs. real IP address

      On Sun, 15 Feb 2004 19:04:50 +0100, "Diez B. Roggisch"
      <deets_noospaam @web.de> wrote:
      [color=blue]
      >Yes - sockets that are connected to '' listen to all local addresses, while
      >localhost listens only to 127.0.0.1 - this is somewhat misleading described
      >in the socket module. So I guess you should configure webware in a way that
      >its listening on '', not on localhost.[/color]

      I was mislead by the fact that 127.0.0.1 == 192.168.1.2 in my case.
      While this is logically true, the addresses are obviously still
      considered physically different
      Thank you.

      -PU
      --

      Comment

      Working...