NASA-PDS / deep-archive

PDS Open Archival Information System (OAIS) utilities, including Submission Information Package (SIP) and Archive Information Package (AIP) generators
https://nasa-pds.github.io/deep-archive/
Other
7 stars 4 forks source link

Cannot connect to any PDS API endpoints for pds-deep-archive-registry #134

Closed jordanpadams closed 1 year ago

jordanpadams commented 1 year ago

πŸ› Describe the bug

Running pds-deep-archive-registry with both the default config API (pds-gamma) or the operational deployment with --url https://pds.nasa.gov/api/search/1.0/, yields a connection failure.

πŸ“œ To Reproduce

% pds-deep-registry-archive --url https://pds.nasa.gov/api/search/1/ --site PDS_RNG urn:nasa:pds:cassini_iss_cruise::1.0
INFO πŸ‘Ÿ PDS Deep Registry-based Archive, version 1.1.2
ERROR πŸ’₯ We got an unexpected error; sorry it didn't work out
Traceback (most recent call last):
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds2/aipgen/registry.py", line 454, in main
    generatedeeparchive(args.url, args.bundle, [args.site](https://urldefense.us/v3/__http://args.site__;!!PvBDto6Hs4WbVuu7!fs8JIdsZZsRzEmEJtD2DEGa2gT7EeXrqIMq4QOHSlP0z9_lURH-XwGsLEdIv76Tp9Z4aworAHw$), not args.include_latest_collection_only)
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds2/aipgen/registry.py", line 429, in generatedeeparchive
    prefixlen, bac, title = _comprehendregistry(url, bundlelidvid, allcollections)
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds2/aipgen/registry.py", line 283, in _comprehendregistry
    bundle = _getbundle(apiclient, bundlelidvid)  # There's no class "Bundle" but class Product πŸ€·β€β™€οΈ
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds2/aipgen/registry.py", line 161, in _getbundle
    return bundles.bundle_by_lidvid(lidvid)  # type = ``Product_Bundle``
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/api/bundles_api.py", line 433, in bundle_by_lidvid
    return self.bundle_by_lidvid_endpoint.call_with_http_info(**kwargs)
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/api_client.py", line 849, in call_with_http_info
    return self.api_client.call_api(
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/api_client.py", line 410, in call_api
    return self.__call_api(resource_path, method,
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/api_client.py", line 204, in __call_api
    raise e
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/api_client.py", line 197, in __call_api
    response_data = self.request(
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/api_client.py", line 436, in request
    return self.rest_client.GET(url,
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/rest.py", line 234, in GET
    return self.request("GET", url,
  File "/Users/webmaster/.virtualenvs/pds-deep-archive/lib/python3.9/site-packages/pds/api_client/rest.py", line 226, in request
    raise ServiceException(http_resp=r)
pds.api_client.exceptions.ServiceException: (503)
Reason: Service Unavailable
HTTP response headers: HTTPHeaderDict({'Content-Type': 'text/html; charset=iso-8859-1', 'Content-Length': '299', 'Connection': 'keep-alive', 'Date': 'Fri, 09 Dec 2022 20:33:29 GMT', 'Set-Cookie': 'AWSALB=RhBVq317xY2uynfHhgKmzL+edgR4aAqXu68jRie6NNMBJdiRArrIg6tK31uzUDFj5QMprXOlkVJsBi/uMbXACbmhS1QRO7oBFFRW6b2oERGjZOp2l5nFqlvfa9F5; Expires=Fri, 16 Dec 2022 20:33:29 GMT; Path=/, AWSALBCORS=RhBVq317xY2uynfHhgKmzL+edgR4aAqXu68jRie6NNMBJdiRArrIg6tK31uzUDFj5QMprXOlkVJsBi/uMbXACbmhS1QRO7oBFFRW6b2oERGjZOp2l5nFqlvfa9F5; Expires=Fri, 16 Dec 2022 20:33:29 GMT; Path=/; SameSite=None; Secure', 'Server': 'Apache', 'X-Frame-Options': 'SAMEORIGIN', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 [cb0b891eddf58d69d157d55977c68bce.cloudfront.net](https://urldefense.us/v3/__http://cb0b891eddf58d69d157d55977c68bce.cloudfront.net__;!!PvBDto6Hs4WbVuu7!fs8JIdsZZsRzEmEJtD2DEGa2gT7EeXrqIMq4QOHSlP0z9_lURH-XwGsLEdIv76Tp9Z6ZVueTBw$) (CloudFront)', 'X-Amz-Cf-Pop': 'SFO53-P2', 'X-Amz-Cf-Id': '5WMqIkUOboUt7s3ciWWebAiPFeZVYz1G5ZVaGmkMOm3LDw08htS_ZQ==', 'X-XSS-Protection': '1; mode=block', 'Strict-Transport-Security': 'max-age=31536000; preload', 'Vary': 'Origin'})
HTTP response body: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>

INFO πŸ‘‹ Thanks for using this program! Bye!

πŸ•΅οΈ Expected behavior

Works

πŸ“š Version of Software Used

1.1.2

🩺 Test Data / Additional context

See example above


πŸ¦„ Related requirements

βš™οΈ Engineering Details

blocked by https://github.com/NASA-PDS/pds-api/issues/240

nutjob4life commented 1 year ago

Is this a server-side issue @jordanpadams?

Stepping through the code, the client is calling either of these URLs:

Both return "503 Service Unavailable".

jordanpadams commented 1 year ago

@nutjob4life that is my guess

@jimmie @tloubrieu-jpl ☝️

jimmie commented 1 year ago

If I remove the double backslash (between '1.0' and 'bundles' in the first URI) - I get a valid response albeit one indicating that the LIDVID is not found.

nutjob4life commented 1 year ago

(*forward slash) confirmed.

jordanpadams commented 1 year ago

new error:

INFO πŸ‘Ÿ PDS Deep Registry-based Archive, version 1.1.2
DEBUG πŸ’’ command line args = Namespace(loglevel=10, include_latest_collection_only=False, url='https://pds.nasa.gov/api/search/1.0', site='PDS_RNG', bundle='urn:nasa:pds:mess_rs_derived::3.0')
DEBUG πŸ€” Comprehending the registry at https://pds.nasa.gov/api/search/1.0 for urn:nasa:pds:mess_rs_derived::3.0
DEBUG βš™οΈ Asking ``bundle_by_lidvid`` for urn:nasa:pds:mess_rs_derived::3.0
DEBUG βš™οΈ Asking ``collections_of_a_bundle`` for urn:nasa:pds:mess_rs_derived::3.0 at 0 limit 50
CRITICAL 🚨 The server at https://pds.nasa.gov/api/search/1.0 gave an INTERNAL SERVER ERROR; you should contact its administrator if you can figure out who that is. The following information may be helpful to them in figuring out the issue: «'{"timestamp":1671740058345,"status":500,"error":"Internal Server Error","path":"/bundles/urn%3Anasa%3Apds%3Amess_rs_derived%3A%3A3.0/collections/all"}'»
INFO πŸ‘‹ Thanks for using this program! Bye!
jordanpadams commented 1 year ago

now blocked by https://github.com/NASA-PDS/registry-api/issues/222

jordanpadams commented 1 year ago

this appears to be working now per fix to NASA-PDS/registry-api#222