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

Server error when navigating to admin image panel #775

Closed
Tracked by #60
noahmanger opened this issue Jan 31, 2017 · 9 comments
Closed
Tracked by #60

Server error when navigating to admin image panel #775

noahmanger opened this issue Jan 31, 2017 · 9 comments

Comments

@noahmanger
Copy link

Something is broken with the S3 static asset work we merged in earlier. Now going to the Images tab in the admin panel yields a 500 error. cc @patphongs @ccostino

@patphongs
Copy link
Member

@ccostino Can you please check if each of the environments (dev, stage, and prod) have these variables set? That might be the problem.

CMS_AWS_ACCESS_KEY
CMS_AWS_SECRET_ACCESS_KEY
CMS_AWS_STORAGE_BUCKET_NAME
CMS_AWS_DEFAULT_REGION_NAME

@ccostino
Copy link
Contributor

All three environments do have those set, but I will continue to take a look and see if I can reproduce this locally too.

@ccostino
Copy link
Contributor

Come to think of it, is it possible that we need to rename these environment variables to not have the CMS_ in front of them? The AWS utilities (such as boto3) expect the environment variables to be named a certain way (see AWS CLI Documentation and boto3 documentation around this)

@LindsayYoung, do you happen to know if these were working as they are called now prior to the changes we were working on for the S3 buckets? Or do you know who might?

@ccostino ccostino modified the milestones: Sprint 5, Sprint 6 Jan 31, 2017
@ccostino ccostino self-assigned this Jan 31, 2017
@ccostino
Copy link
Contributor

ccostino commented Feb 1, 2017

I am still stuck on this. At the moment the best I've been able to do is see a 500 response being returned in the CMS logs (e.g., on Staging), but there's no actual error or stack trace being shown either.

I was unsure if it was the proxy app having an issue or the CMS, but it does appear to be the CMS itself given the log output of the one response for admin/images/, but again, I'm not sure what is actually failing, and I've not been able to reproduce the problem locally either.

@ccostino
Copy link
Contributor

ccostino commented Feb 1, 2017

Thanks @LindsayYoung and @patphongs for a couple of leads to look into! I'm going to continue check connectivity between the CMS and S3, make sure environment variables are being read in and used properly, and that the underlying path is being constructed correctly.

We've ruled out the CORS setup being an issue because that has already been done in all of the S3 buckets and proven to work as demonstrated in the links in https://github.com/18F/fec-proxy/pull/11.

@ccostino
Copy link
Contributor

ccostino commented Feb 2, 2017

Looks like the issue was due to a couple of mis-named environment variable references that I just didn't catch. I'm sorry about that, and a big thank you to @LindsayYoung for spotting them!

@patphongs
Copy link
Member

major thanks to both of you @ccostino and @LindsayYoung !

@ccostino
Copy link
Contributor

ccostino commented Feb 2, 2017

Final tests show this is okay, closing this issue and moving forward!

@ccostino ccostino closed this as completed Feb 2, 2017
@noahmanger
Copy link
Author

Nice work, all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants