hub: Module downloading failed - No address associated with hostname (tfhub.dev)

I am trying to run this Semantic Similarity with TF-Hub Universal Encoder

But in the module initialization, downloading is failed with

URLError: <urlopen error [Errno -5] No address associated with hostname>

Also tried in my local machine and a remote machine that is in another network, both hits the same error.

Seems the downloading server is down?

Full log is attached in here:

INFO:tensorflow:Using /tmp/tfhub_modules to cache modules.
INFO:tensorflow:Downloading TF-Hub Module 'https://tfhub.dev/google/universal-sentence-encoder-large/3'.
---------------------------------------------------------------------------
gaierror                                  Traceback (most recent call last)
/usr/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
   1317                 h.request(req.get_method(), req.selector, req.data, headers,
-> 1318                           encode_chunked=req.has_header('Transfer-encoding'))
   1319             except OSError as err: # timeout error

/usr/lib/python3.6/http/client.py in request(self, method, url, body, headers, encode_chunked)
   1238         """Send a complete request to the server."""
-> 1239         self._send_request(method, url, body, headers, encode_chunked)
   1240 

/usr/lib/python3.6/http/client.py in _send_request(self, method, url, body, headers, encode_chunked)
   1284             body = _encode(body, 'body')
-> 1285         self.endheaders(body, encode_chunked=encode_chunked)
   1286 

/usr/lib/python3.6/http/client.py in endheaders(self, message_body, encode_chunked)
   1233             raise CannotSendHeader()
-> 1234         self._send_output(message_body, encode_chunked=encode_chunked)
   1235 

/usr/lib/python3.6/http/client.py in _send_output(self, message_body, encode_chunked)
   1025         del self._buffer[:]
-> 1026         self.send(msg)
   1027 

/usr/lib/python3.6/http/client.py in send(self, data)
    963             if self.auto_open:
--> 964                 self.connect()
    965             else:

/usr/lib/python3.6/http/client.py in connect(self)
   1391 
-> 1392             super().connect()
   1393 

/usr/lib/python3.6/http/client.py in connect(self)
    935         self.sock = self._create_connection(
--> 936             (self.host,self.port), self.timeout, self.source_address)
    937         self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

/usr/lib/python3.6/socket.py in create_connection(address, timeout, source_address)
    703     err = None
--> 704     for res in getaddrinfo(host, port, 0, SOCK_STREAM):
    705         af, socktype, proto, canonname, sa = res

/usr/lib/python3.6/socket.py in getaddrinfo(host, port, family, type, proto, flags)
    744     addrlist = []
--> 745     for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    746         af, socktype, proto, canonname, sa = res

gaierror: [Errno -5] No address associated with hostname

During handling of the above exception, another exception occurred:

URLError                                  Traceback (most recent call last)
<ipython-input-4-b76b84710602> in <module>()
----> 1 embed = hub.Module(module_url)
      2 
      3 # Compute a representation for each message, showing various lengths supported.
      4 word = "Elephant"
      5 sentence = "I am a sentence for which I would like to get its embedding."

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/module.py in __init__(self, spec, trainable, name, tags)
    103     """
    104     self._graph = tf.get_default_graph()
--> 105     self._spec = as_module_spec(spec)
    106     self._trainable = trainable
    107 

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/module.py in as_module_spec(spec)
     29     return spec
     30   elif isinstance(spec, str):
---> 31     return native_module.load_module_spec(spec)
     32   else:
     33     raise ValueError("Unknown module spec type: %r" % type(spec))

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/native_module.py in load_module_spec(path)
     97     tf.OpError: on file handling exceptions.
     98   """
---> 99   path = compressed_module_resolver.get_default().get_module_path(path)
    100   module_def_path = _get_module_proto_path(path)
    101   module_def_proto = module_def_pb2.ModuleDef()

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/resolver.py in get_module_path(self, handle)
    383     """
    384     if self.is_supported(handle):
--> 385       return self._get_module_path(handle)
    386     else:
    387       raise UnsupportedHandleError(

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/resolver.py in _get_module_path(self, handle)
    465       raise UnsupportedHandleError(
    466           self._create_unsupported_handle_error_msg(handle))
--> 467     return resolver.get_module_path(handle)
    468 
    469   def _create_unsupported_handle_error_msg(self, handle):

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/resolver.py in get_module_path(self, handle)
    383     """
    384     if self.is_supported(handle):
--> 385       return self._get_module_path(handle)
    386     else:
    387       raise UnsupportedHandleError(

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/compressed_module_resolver.py in _get_module_path(self, handle)
    103 
    104     return resolver.atomic_download(handle, download, module_dir,
--> 105                                     self._lock_file_timeout_sec())
    106 
    107   def _lock_file_timeout_sec(self):

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/resolver.py in atomic_download(handle, download_fn, module_dir, lock_file_timeout_sec)
    311     tf.logging.info("Downloading TF-Hub Module '%s'.", handle)
    312     tf.gfile.MakeDirs(tmp_dir)
--> 313     download_fn(handle, tmp_dir)
    314     # Write module descriptor to capture information about which module was
    315     # downloaded by whom and when. The file stored at the same level as a

/usr/local/lib/python3.6/dist-packages/tensorflow_hub/compressed_module_resolver.py in download(handle, tmp_dir)
     99 
    100       url_opener = url.build_opener(LoggingHTTPRedirectHandler)
--> 101       response = url_opener.open(request)
    102       return resolver.download_and_uncompress(cur_url, response, tmp_dir)
    103 

/usr/lib/python3.6/urllib/request.py in open(self, fullurl, data, timeout)
    524             req = meth(req)
    525 
--> 526         response = self._open(req, data)
    527 
    528         # post-process response

/usr/lib/python3.6/urllib/request.py in _open(self, req, data)
    542         protocol = req.type
    543         result = self._call_chain(self.handle_open, protocol, protocol +
--> 544                                   '_open', req)
    545         if result:
    546             return result

/usr/lib/python3.6/urllib/request.py in _call_chain(self, chain, kind, meth_name, *args)
    502         for handler in handlers:
    503             func = getattr(handler, meth_name)
--> 504             result = func(*args)
    505             if result is not None:
    506                 return result

/usr/lib/python3.6/urllib/request.py in https_open(self, req)
   1359         def https_open(self, req):
   1360             return self.do_open(http.client.HTTPSConnection, req,
-> 1361                 context=self._context, check_hostname=self._check_hostname)
   1362 
   1363         https_request = AbstractHTTPHandler.do_request_

/usr/lib/python3.6/urllib/request.py in do_open(self, http_class, req, **http_conn_args)
   1318                           encode_chunked=req.has_header('Transfer-encoding'))
   1319             except OSError as err: # timeout error
-> 1320                 raise URLError(err)
   1321             r = h.getresponse()
   1322         except:

URLError: <urlopen error [Errno -5] No address associated with hostname>

UPDATE

Also tried wget 'https://tfhub.dev/google/universal-sentence-encoder-large/3?tf-hub-format=compressed' -O /tmp/module.tar.gz in my local and it is not working either.

resec@mpc:~$ wget 'https://tfhub.dev/google/universal-sentence-encoder-large/3?tf-hub-format=compressed' -O /tmp/module.tar.gz
--2018-08-15 01:57:33--  https://tfhub.dev/google/universal-sentence-encoder-large/3?tf-hub-format=compressed
Resolving tfhub.dev (tfhub.dev)... failed: No address associated with hostname.
wget: unable to resolve host address ‘tfhub.dev’

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 23

Most upvoted comments

TF Hub team is aware of tfhub.dev name resolution issue and is working on addressing it. We will update this thread once the issue is fully resolved. Apologies for any inconvenience.

On Wed, Aug 15, 2018 at 7:47 AM bombdiggity notifications@github.com wrote:

Same here

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tensorflow/hub/issues/136#issuecomment-413100218, or mute the thread https://github.com/notifications/unsubscribe-auth/AbunTAWN91qXYpk5irlK7uaab6UM1vDMks5uQ7XlgaJpZM4V9bar .

tfhub.dev should be back up and functioning as of 10:30 GMT+2. Please report any further issues.

On Wed, Aug 15, 2018 at 10:49 AM Andrey Khorlin akhorlin@google.com wrote:

We are investing again. We will update the thread once we know more.

On Wed, Aug 15, 2018 at 9:51 AM Hao Xi notifications@github.com wrote:

Yes, worked once and then down again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tensorflow/hub/issues/136#issuecomment-413121718, or mute the thread https://github.com/notifications/unsubscribe-auth/AbunTBLBpxNo2mGxcbvVFYX5gEPVWRUlks5uQ9MXgaJpZM4V9bar .