Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Web SPICE completely broken #5460

Open
rvwagner opened this issue Apr 12, 2024 · 23 comments
Open

Web SPICE completely broken #5460

rvwagner opened this issue Apr 12, 2024 · 23 comments
Assignees
Labels
bug Something isn't working

Comments

@rvwagner
Copy link

rvwagner commented Apr 12, 2024

ISIS version(s) affected: 8.0.2, 8.1.0 RC2

Description
Web SPICE is now broken for all images, not just recent LROC images.

wget https://pds.lroc.asu.edu/data/LRO-L-LROC-2-EDR-V1.0/LROLRC_0005/DATA/SCI/2010321/NAC/M144611506RE.IMG
lronac2isis from=M144611506RE.IMG to=M144611506R.cub
spiceinit from= M144611506R.cub web=true

Result: **ERROR** The server sent an unrecognized response in SpiceClient.cpp at 588.

(This image is about 14 years old, and thus should have SPICE data even on the old server that runs out of disk space.)

I suspect that the issue is that you have set up a redirect from the old URL to a newer server, as described in #5428, but spiceinit doesn't understand the HTTP redirect code (it seems to be "301 Moved Permanently").

I don't know if this is fixable for old versions, the best option might be to keep the old server running until a few months after the first version that can be redirected is publicly released (maybe a few months after the first version with the new URL as the default is released, if you don't anticipate changing that URL again until well after a redirect-savvy spiceinit version is released). If you can update the LROC kernels once right now, the data should work with almost all publicly released LROC data through July.

Future versions of spiceinit should get modified to recognize HTTP redirects and follow them correctly, in addition to pointing to the new server.

Edit: To be clear, adding url=https://astrogeology.usgs.gov/apis/ale/v0.9.1/spiceserver/ to the spiceinit call makes everything work right, but there's currently no way for users to learn that without digging through not-yet-released versions' release notes, or closed issues on this tracker.

@rvwagner rvwagner added the bug Something isn't working label Apr 12, 2024
@toihr
Copy link

toihr commented Apr 26, 2024

Bumping this up having the same problem with recently installed (2 Weeks ago) ISIS.
Can also report that adding the url=https://astrogeology.usgs.gov/apis/ale/v0.9.1/spiceserver/ makes it work again.

@shannonmackenzie
Copy link

shannonmackenzie commented Jul 2, 2024

I've also recently reinstalled ISIS (June 26, 2024) and still run into the spiceinit web issue:

spiceinit from=N1313633907_1.cub web=true url=https://astrogeology.usgs.gov/apis/ale/v0.9.1/spiceserver/
**ERROR** An error occurred when talking to the server. The spice server script was not found (404).

isis version = 8.1.0
conda version : 24.5.0
python version : 3.8.19.final.0

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Jul 2, 2024

Can ya'll post your environments? Could there be something about you networks that might be causing issues?

Using 8.0.2 it seems to be working

(isis8.0.3) krodriguez$ spiceinit from= M144611506R.cub web=true
Group = Kernels
  NaifFrameCode             = -85610
  LeapSecond                = $base/kernels/lsk/naif0012.tls
  TargetAttitudeShape       = ($base/kernels/pck/pck00009.tpc,
                               $lro/kernels/pck/moon_080317.tf,
                               $lro/kernels/pck/moon_assoc_me.tf)
  TargetPosition            = (Table,
                               $lro/kernels/tspk/moon_pa_de421_1900-2050.bpc,
                               $lro/kernels/tspk/de421.bsp)
  InstrumentPointing        = (Table,
                               $lro/kernels/ck/lrolc_2010304_2010335_v02.bc,
                               $lro/kernels/ck/moc42r_2010304_2010335_v03.bc,
                               $lro/kernels/fk/lro_frames_2014049_v01.tf)
  Instrument                = $lro/kernels/ik/lro_lroc_v18.ti
  SpacecraftClock           = $lro/kernels/sclk/lro_clkcor_2024171_v00.tsc
  InstrumentPosition        = (Table,
                               $lro/kernels/spk/fdf29r_2010305_2010335_v01.bsp)
  InstrumentAddendum        = $lro/kernels/iak/lro_instrumentAddendum_v05.ti
  ShapeModel                = $base/dems/ldem_128ppd_Mar2011_clon180_radius_p-
                              ad.cub
  InstrumentPositionQuality = Reconstructed
  InstrumentPointingQuality = Reconstructed
  CameraVersion             = 2
End_Group

As of writing this comment, both endpoints (https://services.isis.astrogeology.usgs.gov/cgi-bin/spiceinit.cgi/ and https://astrogeology.usgs.gov/apis/ale/v0.9.1/spiceserver/) are giving back healthy responses:

{
   "body":{
      "status":{
         "is_app_available":true,
         "is_cache_available":false,
         "is_spice_available":true
      }
   }
}

cache status doesn't affect functionality and is shutoff currently so that can be ignored.

@shannonmackenzie
Copy link

Updated above.

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Jul 2, 2024

@shannonmackenzie What do you get if you run: curl https://astrogeology.usgs.gov/apis/ale/v0.9.1/spiceserver/?

@shannonmackenzie
Copy link

{"body":{"status":{"is_app_available":true,"is_cache_available":false,"is_spice_available":true}}}

@shannonmackenzie
Copy link

Is there perhaps a special port one should specify?

@amystamile-usgs
Copy link
Contributor

amystamile-usgs commented Jul 3, 2024

@Kelvinrr I was able to replicate the error against the dev branch. So maybe something is wrong with version 8.1 and up?

(isis) spiceinit from=VIR_IR_1A_1_362681634_1.cub web=true
**ERROR** An error occurred when talking to the server. The spice server script was not found (404).
(isis) curl https://astrogeology.usgs.gov/apis/ale/v0.9.1/spiceserver/
{"body":{"status":{"is_app_available":true,"is_cache_available":false,"is_spice_available":true}}}

Sounds like switching to version 8.0.2 is the solution for now until we figure out this bug.

@shannonmackenzie
Copy link

shannonmackenzie commented Jul 3, 2024

I just downgraded isis (conda install -c usgs-astrogeology isis=8.0.2) and still get the error

spiceinit from=N1313633907_1.cub web=true url=https://astrogeology.usgs.gov/apis/ale/v0.9.1/spiceserver/ **ERROR** An error occurred when talking to the server. The spice server script was not found (404).

I also tried downgrading to 8.0.1, to no avail.

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Jul 12, 2024

This is going into the support sprint coming up starting Monday, this will require digging through the logs to see what might be happening.

@shannonmackenzie
Copy link

shannonmackenzie commented Jul 12, 2024 via email

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Jul 19, 2024

Seems to be not a software issue but rather an issue with DOI's network. Which is causing redirects on the old URL to come back empty, and requests on the new open to randomly fail with 502s. Looking into it but iteration with people outside the building can take some time.

@michaelaye
Copy link
Contributor

the default server still fails, how can I make the ale spiceserver permanent? Could this be added to the install documentation?

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Dec 18, 2024

@michaelaye the new Url should be default on the latest version of ISIS, old one should redirect to the ALE endpoint. Are you seeing the same error as Wagner?

@michaelaye
Copy link
Contributor

michaelaye commented Dec 18, 2024

not 100% (version is 8.1.0):

Execution of PAC script at "http://wpad/wpad.dat" failed: The operation couldn’t be completed. (NSURLErrorDomain error -1003.)
**ERROR** The server sent an unrecognized response.

@michaelaye
Copy link
Contributor

hm, i see this in bin/xml/spiceinit.xml, looks like it points to the old server?

   <group name="Spice Service Parameters">
      <parameter name="URL">
        <type>string</type>
        <brief>The Spice Service URL</brief>
        <description>
          This is where a request for SPICE data is sent. The default is the USGS SPICE server.
        </description>
        <default><item>https://services.isis.astrogeology.usgs.gov/cgi-bin/spiceinit.cgi</item></default>
      </parameter>
      <parameter name="PORT">
        <type>integer</type>
        <brief>The Spice Service Port</brief>
        <description>
          This is the port on which a request for SPICE data is sent.
        </description>
        <default><item>443</item></default>
        <minimum inclusive="yes">0</minimum>
      </parameter>
    </group>
  </groups>

@michaelaye
Copy link
Contributor

yeah, it's not part of the 8.1.0 release.

@michaelaye
Copy link
Contributor

michaelaye commented Dec 18, 2024

now the question is, why i received an 8.1.0 release when I installed fresh 2 days ago...

got it... tons of compatibility issues with python 3.9 these days..., so conda resolves to 8.1 the only one working...

@amystamile-usgs
Copy link
Contributor

amystamile-usgs commented Dec 18, 2024

now the question is, why i received an 8.1.0 release when I installed fresh 2 days ago...

got it... tons of compatibility issues with python 3.9 these days..., so conda resolves to 8.1 the only one working...

I believe to install 8.2.0+ versions, you need at least python version 3.11. We have updated our install docs to reflect this:

conda create -n isis python>=3.9
conda activate isis
conda config --env --add channels conda-forge
conda config --env --add channels usgs-astrogeology
conda install -c usgs-astrogeology isis

Hopefully this will get you the latest install.

@Kelvinrr
Copy link
Collaborator

not 100% (version is 8.1.0):

Execution of PAC script at "http://wpad/wpad.dat" failed: The operation couldn’t be completed. (NSURLErrorDomain error -1003.)
**ERROR** The server sent an unrecognized response.

Looks like something to bring up with DOI, redirect is probably borked...

@michaelaye
Copy link
Contributor

michaelaye commented Dec 19, 2024

FYI, Python 3.13 and 3.12 fail (which you will get when using `python>=3.9), it has to be capped at 3.11. Happy holidays!

EDIT: And with 3.11 I only get 8.2.0 on macos-arm (using osx-64).

@Kelvinrr
Copy link
Collaborator

Kelvinrr commented Jan 2, 2025

Seems like the issue might fixed using the old URL, I would try again and update here.

@rvwagner
Copy link
Author

rvwagner commented Jan 2, 2025

A quick test of spiceinit from= M144611506R.cub web=true in ISISes 8.0.2, 8.0.3, 8.1.0, 8.2.0, and 8.3.0 all worked fine for me with each of those versions' respective default URLs, so hopefully things are working for Michael now, too.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

No branches or pull requests

6 participants