urllib.urlopen returns 'connection refused' on Solaris

Richard Gruet rgruet at ina.fr
Fri Jan 7 06:19:43 EST 2000


Hi everybody,

On Solaris 2.6 (Sun OS 5.6), the fct urllib.urlopen() returns an error
'Connection refused' for all URLs:

>>> urlopen('http://www.python.org')
Traceback (innermost last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python1.5/urllib.py", line 59, in urlopen
    return _urlopener.open(url)
  File "/usr/local/lib/python1.5/urllib.py", line 157, in open
    return getattr(self, name)(url)
  File "/usr/local/lib/python1.5/urllib.py", line 253, in open_http
    h = httplib.HTTP(host)
  File "/usr/local/lib/python1.5/httplib.py", line 51, in __init__
    if host: self.connect(host, port)
  File "/usr/local/lib/python1.5/httplib.py", line 79, in connect
    self.sock.connect(host, port)
IOError: [Errno socket error] (146, 'Connection refused')

Could it be my build of Python 1.5.2 on Solaris ?? This fct works well
on other platforms.
The equivalent fct in Java works fine, too (so this is not a matter of
host config).

Any ideas ?

Richard




More information about the Python-list mailing list