HDFGroup / h5pyd

h5py distributed - Python client library for HDF Rest API
Other
111 stars 39 forks source link

[Errno 503] Service Unavailable #43

Closed aparamon closed 6 years ago

aparamon commented 6 years ago

My set-up is:

1) Windows 10 with "Bash on Windows" (WSL), Ubuntu Xenial.

2) HDF Server (h5serv) running on WSL on default port 5000, exposing "Novartis" dataset.

3) HDF Server is accessible from Windows browser: http://localhost:5000/ {"root": "ddfa84c2-d5bc-11e7-bcec-d43d7e31e165", "lastModified": "2017-11-30T10:54:41Z", "created": "2017-11-30T10:54:41Z", "hrefs": [{"href": "http://localhost:5000/", "rel": "self"}, {"href": "http://localhost:5000/datasets", "rel": "database"}, {"href": "http://localhost:5000/groups", "rel": "groupbase"}, {"href": "http://localhost:5000/datatypes", "rel": "typebase"}, {"href": "http://localhost:5000/groups/ddfa84c2-d5bc-11e7-bcec-d43d7e31e165", "rel": "root"}]}

4) HDF Server is accessible via h5pyd from WSL:

>>> f = h5pyd.File('', 'r')
>>> print(list(f))
['Novartis']

5) The HDF Server is inaccessible via h5pyd from Windows:

File "C:\Program Files\Python 3.5\lib\site-packages\h5pyd\_hl\files.py", line 161, in __init__
    raise IOError(rsp.status_code, rsp.reason)
OSError: [Errno 503] Service Unavailable

Any pointers how to debug and eliminate the issue are appreciated!

jreadey commented 6 years ago

Hi, I haven't tried h5pyd on windows recently, but it looks like the requests are making it out of Windows.

Try adding these lines before the h5pyd.File call:

loglevel = logging.DEBUG logging.basicConfig(format='%(asctime)s %(message)s', level=loglevel)

And add the log output to this issue if you could.

aparamon commented 6 years ago

Thank you for the pointer! It appeared that I had misconfigured http_proxy env parameter, after fixing which connection began to work.