By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,270 Members | 1,703 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,270 IT Pros & Developers. It's quick & easy.

Webware / localhost vs. real IP address

P: n/a
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/
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,
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'.
Any clues?


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
Jul 18 '05 #2

P: n/a
On Sun, 15 Feb 2004 19:04:50 +0100, "Diez B. Roggisch"
<de************@web.de> wrote:
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.


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
--
http://www.homepages.lu/pu/
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.