Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ensure that solr checksum verification does not obscure 404 responses… #2668

Merged
merged 1 commit into from May 13, 2022

Conversation

quoideneuf
Copy link
Collaborator

@quoideneuf quoideneuf commented Mar 22, 2022

… or tcp/http errors

Description

Distinct startup errors when AppConfig[:solr_verify_checksums] = true and a) Solr (or any web server) is online but returns a non 200 response; or b) Solr returns a 200 but the checksum of the body does not pass verification.

Related JIRA Ticket or GitHub Issue

Github Issue 2634

How Has This Been Tested?

Reworked the backend sole tests to use mock solr responses.

Screenshots (if appropriate):

 + NET HTTP ERROR

[java]       ========================================================================
[java]       A trace file has been written to the following location: /var/folders/cf/y6d0x2z11g59hm9zcwbtrsnm0000gn/T/aspace_diagnostic_1647950175.txt
[java]
[java]       This file contains information that will assist developers in diagnosing
[java]       problems with your ArchivesSpace installation.  Please review the file's
[java]       contents for sensitive information (such as passwords) that you might not
[java]       want to share.
[java]       ========================================================================
[java] Errno::ECONNREFUSED: Connection refused - Failed to open TCP connection to localhost:8985 (Connection refused - connect(2) for "localhost" port 8985)

 + SOLR SERVER 404
[java]       ========================================================================
[java]       A trace file has been written to the following location: /var/folders/cf/y6d0x2z11g59hm9zcwbtrsnm0000gn/T/aspace_diagnostic_1647950027.txt
[java]
[java]       This file contains information that will assist developers in diagnosing
[java]       problems with your ArchivesSpace installation.  Please review the file's
[java]       contents for sensitive information (such as passwords) that you might not
[java]       want to share.
[java]       ========================================================================
[java] Solr::NotFound: Status 404 when trying to verify http://localhost:8983/solr/nothereServer response:
[java] <html>
[java] <head>
[java] <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/>
[java] <title>Error 404 Not Found</title>
[java] </head>
[java] <body><h2>HTTP ERROR 404 Not Found</h2>
[java] <table>
[java] <tr><th>URI:</th><td>/solr/nothere/admin/file</td></tr>
[java] <tr><th>STATUS:</th><td>404</td></tr>
[java] <tr><th>MESSAGE:</th><td>Not Found</td></tr>
[java] <tr><th>SERVLET:</th><td>default</td></tr>
[java] </table>
[java]
[java] </body>
[java] </html>

 + BAD SCHEMA
[java]       ========================================================================
[java]       A trace file has been written to the following location: /var/folders/cf/y6d0x2z11g59hm9zcwbtrsnm0000gn/T/aspace_diagnostic_1647951569.txt
[java]
[java]       This file contains information that will assist developers in diagnosing
[java]       problems with your ArchivesSpace installation.  Please review the file's
[java]       contents for sensitive information (such as passwords) that you might not
[java]       want to share.
[java]       ========================================================================
[java] Solr::ChecksumMismatchError: Solr checksum verification failed (schema): expected [4d4849771a91d677f255b638cbefa8b8d67a236c56c645bb13c2842480614d78] got [6a6bcb1bb3096ee832a22243992592221740e40821da7e0e1d42a861bbd59313]

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have read the CONTRIBUTING document.
  • I have authority to submit this code.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@quoideneuf quoideneuf force-pushed the GH-2634-solr-checksum-verification branch from dff330a to de4afbc Compare March 22, 2022 14:49
@cdibella cdibella added this to the 3.2.1 milestone Apr 27, 2022
@mark-cooper mark-cooper merged commit b73a8e6 into master May 13, 2022
@mark-cooper mark-cooper deleted the GH-2634-solr-checksum-verification branch May 13, 2022 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants