[MGNLEESOLR-23] Solr server returns unauthorized response status code when indexing documents from dam Created: 07/Jan/15  Updated: 27/Jan/15  Resolved: 15/Jan/15

Status: Closed
Project: Solr Search Provider
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0

Type: Bug Priority: Critical
Reporter: Milan Divilek Assignee: Milan Divilek
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   
2015-01-07 09:51:38,180 ERROR h.solrsearchprovider.logic.indexer.SolrIndexerImpl: error reading streams
2015-01-07 09:51:38,184 ERROR h.solrsearchprovider.logic.indexer.SolrIndexerImpl: Server returned HTTP response code: 401 for URL: http://localhost:8080/magnoliaAuthor/dam/solr/Magnolia_Flyer_4-0/neco.pdf

Problem is probably caused by that solr server sends request to document as anonymous user, but that one has no permission to read the document from dam.

Proposal:
Store dam document as temp file and then use ContentStreamUpdateRequest.addFile(file) instead of using ContentStreamBase.URLStream(url); up.addContentStream(base); in info.magnolia.search.solrsearchprovider.logic.indexer.SolrIndexerImpl#pullExtract method.



 Comments   
Comment by Roman Kovařík [ 20/Jan/15 ]

Please save current context and retrieve after processing in DataIndexer.

Generated at Mon Feb 12 10:59:21 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.