Skip to content

IERS Bulletin domain banned from certain countries #410

Closed

Description

@wtgee

Hi, we have a Google Summer of Code student who is working for us and they are running into some problems with the IERS download because the .mil domain is blocked in their country.

Is there a non-military domain where this is available? We could probably download a local copy ourselves and re-host it, but I'm not sure if that's even allowed.

panoptes/POCS#844

Activity

  1. bmorris3 commented on Jun 15, 2019

    @bmorris3
    Contributor

    Hi @wtgee -- sorry IERS is giving you trouble, I know how frustrating that is. This came up in astropy/astropy#5059 and astropy/astropy#5194, and we found alternative servers also with the .mil domain. Some googling yields that this address might be a viable alternative:

    ftp://cddis.gsfc.nasa.gov/pub/products/iers/finals.all
    

    Lemme know if this helps!

  2. wtgee commented on Jun 16, 2019

    @wtgee
    ContributorAuthor

    @ImmortalRabbit can you report here if the above works for you?

  3. ImmortalRabbit commented on Jun 17, 2019

    @ImmortalRabbit

    @wtgee @bmorris3 It worked. Thanks.

  4. wtgee commented on Jun 17, 2019

    @wtgee
    ContributorAuthor

    Thanks @ImmortalRabbit. For others in the future can you post the code that actually worked and then I'll close.

  5. ImmortalRabbit commented on Jun 17, 2019

    @ImmortalRabbit

    Thanks @ImmortalRabbit. For others in the future can you post the code that actually worked and then I'll close.

    Sorry, but it works strange, maybe I am doing something wrong. But when I run pytest it shows me to download it again.

    What I did:

    from astropy.utils.iers import IERS_A_URL
    IERS_A_URL = 'ftp://cddis.gsfc.nasa.gov/pub/products/iers/finals.all'
    from astroplan import download_IERS_A
    download_IERS_A()
    

    It worked once, but when I did it again it showed me error.

    Traceback (most recent call last):
      File "/usr/lib/python3.6/urllib/request.py", line 1318, in do_open
        encode_chunked=req.has_header('Transfer-encoding'))
      File "/usr/lib/python3.6/http/client.py", line 1239, in request
        self._send_request(method, url, body, headers, encode_chunked)
      File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
        self.endheaders(body, encode_chunked=encode_chunked)
      File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
        self.send(msg)
      File "/usr/lib/python3.6/http/client.py", line 964, in send
        self.connect()
      File "/usr/lib/python3.6/http/client.py", line 936, in connect
        (self.host,self.port), self.timeout, self.source_address)
      File "/usr/lib/python3.6/socket.py", line 704, in create_connection
        for res in getaddrinfo(host, port, 0, SOCK_STREAM):
      File "/usr/lib/python3.6/socket.py", line 745, in getaddrinfo
        for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
    socket.gaierror: [Errno -3] Temporary failure in name resolution
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.6/site-packages/astroplan/utils.py", line 126, in download_IERS_A
        show_progress=show_progress)
      File "/usr/lib/python3.6/site-packages/astropy/utils/data.py", line 1091, in download_file
        raise e
      File "/usr/lib/python3.6/site-packages/astropy/utils/data.py", line 1024, in download_file
        with urllib.request.urlopen(remote_url, timeout=timeout) as remote:
      File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/lib/python3.6/urllib/request.py", line 526, in open
        response = self._open(req, data)
      File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
        '_open', req)
      File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
        result = func(*args)
      File "/usr/lib/python3.6/urllib/request.py", line 1346, in http_open
        return self.do_open(http.client.HTTPConnection, req)
      File "/usr/lib/python3.6/urllib/request.py", line 1320, in do_open
        raise URLError(err)
    urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
    

    Even if it downloads or not, there is still errors when I run test_observatory that ask to update astroplan.

    E           astropy.utils.iers.iers.IERSRangeError: (some) times are outside of range covered by IERS table.
    

    @wtgee @bmorris3

  6. wtgee commented on Jun 17, 2019

    @wtgee
    ContributorAuthor

    Looks like NASA is redirecting ftp to ftps (FTP over SSL, not SFTP) and the underlying urllib.request isn't handling that well.

  7. wtgee commented on Jun 17, 2019

    @wtgee
    ContributorAuthor

    FYI, I've emailed the maintainers of the Bulletin to ask about redistribution rights for PANOPTES specific items, but this could remain an issue for certain international users.

  8. bmorris3 commented on Jun 17, 2019

    @bmorris3
    Contributor

    Yeah it sounds like building a local mirror of the IERS table might be a slightly more permanent solution. Feel free to close the issue if/when you create one!

  9. wtgee commented on Jun 17, 2019

    @wtgee
    ContributorAuthor

    Thanks @bmorris3. Are you aware if there are any issues with setting up a local mirror?

  10. bmorris3 commented on Jun 17, 2019

    @bmorris3
    Contributor

    Not that I know of, but I am far from the keeper of IERS 😉

  11. wtgee commented on Jun 18, 2019

    @wtgee
    ContributorAuthor

    FYI, file itself says:

         *                                                                     *
         * Distribution statement A.                                           *
         *   Approved for public release: distribution unlimited.              *
         *                                                                     *
         ***********************************************************************
    

    We'll make our own mirror. Thanks!

  12. wtgee commented on Jun 18, 2019

    @wtgee
    ContributorAuthor

    Just a quick follow-up that I heard from the Navy folks and re-hosting on a public mirror is not actually possible without explicit permission. We can work around things but wanted to let others know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions