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

direct download causes RedirectException #7060

Closed
qqmyers opened this issue Jul 7, 2020 · 3 comments · Fixed by #7085
Closed

direct download causes RedirectException #7060

qqmyers opened this issue Jul 7, 2020 · 3 comments · Fixed by #7085
Milestone

Comments

@qqmyers
Copy link
Member

qqmyers commented Jul 7, 2020

On the current develop branch, setting -Ddataverse.files.s3.download-redirect=true and trying to download a file gives me:

{
"status": "ERROR",
"code": 500,
"type": "RedirectionException",
"message": "Internal server error. More details available at the server logs.",
"incidentId": "113fbb33-f4e0-402e-b9a9-5417c3c9822b"
}

If I remove that jvm option, I can download the file, so I think the underlying s3 store is configured correctly. WHen I use:
bin/asadmin set-log-levels edu.harvard.iq.dataverse.api.DownloadInstanceWriter=FINE
the presigned download URL that shows in the log is actually correct/works, so it looks like something has changed in how the redirect is processed in Dataverse.

FWIW: I used the ansible scripts to create an EC2 instance and configured s3 manually after that.

@djbrooke djbrooke added this to the Dataverse 5 milestone Jul 7, 2020
@pdurbin pdurbin moved this from Up Next 🛎 to IQSS Team - In Progress 💻 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jul 8, 2020
@pdurbin pdurbin self-assigned this Jul 8, 2020
@pdurbin pdurbin moved this from IQSS Team - In Progress 💻 to Up Next 🛎 in IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) Jul 9, 2020
@pdurbin pdurbin removed their assignment Jul 9, 2020
@qqmyers
Copy link
Member Author

qqmyers commented Jul 14, 2020

Looks like the 500 error is being generated by the api.errorhandlers.ThrowableHandler class. Perhaps what's needed is a class to implement ExceptionMapper? Not sure why this would have changed from 4.20 to current develop branch though unless some default handler for that has disappeared/not been configured.

@qqmyers
Copy link
Member Author

qqmyers commented Jul 14, 2020

That seems to work - I'll put in a PR.

qqmyers added a commit to GlobalDataverseCommunityConsortium/dataverse that referenced this issue Jul 14, 2020
@poikilotherm
Copy link
Contributor

/me added a lengthy discussion about what ThrowableHandler is about and what IMHO should be done now to the PR at #7085 (comment)

kcondon added a commit that referenced this issue Jul 17, 2020
…/7060

Fix for #7060 direct download causes RedirectException
qqmyers added a commit to GlobalDataverseCommunityConsortium/dataverse that referenced this issue Jul 22, 2020
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 a pull request may close this issue.

4 participants