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

RotatingCloudOutput can't connect to S3 bucket #72

Closed
msempere opened this issue Feb 7, 2014 · 7 comments
Closed

RotatingCloudOutput can't connect to S3 bucket #72

msempere opened this issue Feb 7, 2014 · 7 comments

Comments

@msempere
Copy link

msempere commented Feb 7, 2014

RotatingCloudOutput can't connect to S3 bucket and I'm getting a 403 error. The error output sais that it can't access to https://s3.amazonaws.com/BUCKET_NAME

RotatingCloudOutput(SOME_DIR, BUCKET_NAME, ACCESS_KEY_ID, ACCESS_KEY);

@marksweiss
Copy link
Contributor

Can you please give us more context. I don't understand how to resolve this
from what you have sent.

On Fri, Feb 7, 2014 at 4:46 PM, msempere notifications@github.com wrote:

RotatingCloudOutput can't connect to S3 bucket and I'm getting a 403
error. The error output sais that it can't access to
https://s3.amazonaws.com/BUCKET_NAME

RotatingCloudOutput(SOME_DIR, BUCKET_NAME, ACCESS_KEY_ID, ACCESS_KEY);

Reply to this email directly or view it on GitHubhttps://github.com//issues/72
.

Mark Weiss
Head of Client Solutions

Datacratic
New York, NY, US
www.datacratic.com

http://www.linkedin.com/in/marksweiss

@marksweiss
Copy link
Contributor

Also, can you give me any idea why you alerted me about this? I've not taken any actions in the soa repo recently, other than trying to pull it down today and having that hang. If this is related to that action, you can close the ticket, as I was later able to pull the repo.

Thanks,
Mark

@msempere
Copy link
Author

I mean, when I make:
make_shared(BACKUPDIR, BUCKET, .......)

with BUCKET = "s3://my-test2", I'm getting:

--------------------------[Exception thrown]---------------------------
time: 2014-02-10-104536
type: ML::Exception
pid: 10707; tid: 10797
what: attempt to perform s3 request with double slash: /s3://my-test2/

If I use BUCKET = "my-test2", I get:

--------------------------[Exception thrown]---------------------------
time: 2014-02-10-110152
type: ML::Exception
pid: 11649; tid: 11747
what: wrong scheme (should start with s3://)

@marksweiss
Copy link
Contributor

You need to configure that with an actual valid S3 bucket that your process has permission to write to. That will also require modifying the config this code is using to have your credentials. You don't specify where this code is, but given my experience with the codebase in general you want to:

  • read the code to see where config is being read from
  • modify the S3_KEY and S3_ACCESS_KEY in that file with your credentials

@msempere
Copy link
Author

The only I've found related to that config file is this:

/** Parse the ~/.cloud_credentials file and add those buckets in.

The format of that file is as follows:

  1. One entry per line
  2. Tab separated
  3. Comments are '#' in the first position
  4. First entry is the name of the URI scheme (here, s3)
  5. Second entry is the "version" of the configuration (here, 1)
    for forward compatibility
  6. The rest of the entries depend upon the scheme; for s3 they are
    tab-separated and include the following:
  • Access key ID
  • Access key
  • Bandwidth from this machine to the server (MBPS)
  • Protocol (http)
  • S3 machine host name (s3.amazonaws.com)

If S3_ACCESS_KEY_ID and S3_ACCESS_KEY environment variables are specified,
they will be used first.
*/

But, Why do I need to create a credentials file if I'm using parameters?
make_shared (BACKUPDIR, BACKUP, KEYID, KEY)

@msempere
Copy link
Author

And now:

S3 REST error: [SignatureDoesNotMatch] message [The request signature we calculated does not match the signature you provided. Check your key and signing method.]

@marksweiss
Copy link
Contributor

These are errors connecting to S3, and not with this code per se. This code has been used in production to connect to S3. My suggestions:

  • print debug to make sure all config values are where they should be
  • use a simple, isolated, independent like s3cmd with the same credentials, from the same host and running as the same user, to see if that can connect

Also, note that there is community support for RTBKit, which is an open source project using soa, on Google groups, but for soa itself there isn't any additional support offered.

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

No branches or pull requests

2 participants