Skip to content
This repository has been archived by the owner on May 20, 2022. It is now read-only.

Bucket name contains invalid characters #68

Closed
Analect opened this issue Dec 7, 2016 · 5 comments
Closed

Bucket name contains invalid characters #68

Analect opened this issue Dec 7, 2016 · 5 comments

Comments

@Analect
Copy link

Analect commented Dec 7, 2016

Having just upgrade from version 3.2 to version 3.5.1, I'm finding the Wal-E set-up against S3 complaining about bucket name. This wasn't something I was previously aware of.

In the console, I'm getting 500 errors when mattermost tries to get a user's profile image:
http://myserver.com:8001/api/v3/users/65k7nxg67t8uzknbzwtzeiqfnc/image?time=1464276885722

{"id":"api.file.write_file.s3.app_error","message":"Encountered an error writing to S3","detailed_error":"Bucket name contains invalid characters.","request_id":"inifyoqwf7rujykh1umnapuuar","status_code":500}

In the app, the user profile images are failing.
image

The bucket prefix looks like this:
WALE_S3_PREFIX=s3://mybucket.mattermost/version_3.0

As I've said, I used this in earlier versions without a problem.
Can't see any references to this problem on https://github.com/wal-e/wal-e
Any thoughts on what might be going wrong here?

@jasonblais
Copy link
Contributor

@xcompass Any thoughts on this question?

@xcompass
Copy link
Contributor

Is there any special characters in your bucket name?

Are you sure the error is triggered by Wal-E? Wal-E is only for backup, not image storage. Also it looks like it is trying to write to S3 from the error message, it doesn't sound like getting profile. Did you setup mattermost to use S3 as storage? It seems the error came from mattermost not wal-e based on the id (api.file.write_file.s3.app_error). https://github.com/mattermost/platform/blob/master/api/file.go#L754

If your bucket have "-" or any other special characters, that might be the cause. Because mattermost platform switched S3 library from goamz to minio-go (mattermost/mattermost@f02620b) And minio-go doesn't like "-". (https://github.com/minio/minio-go/blob/d02caa62b9e1034f93a82d41da806651a666c5a3/api-put-bucket_test.go#L145) And maybe some other characters.

@xcompass xcompass added the Awaiting Submitter Action Blocked on the author label Dec 19, 2016
@mtrofimm
Copy link

@xcompass I also noticed that it's not possile to include a folder name like backet/folder for the Amazon S3 Bucket config option. One gets Bucket name contains invalid characters then :(

@xcompass
Copy link
Contributor

Thanks @mtrofimm. It seems you have to use the bucket instead of the subfolder. It could be bug in Wal-E.

@xcompass xcompass removed the Awaiting Submitter Action Blocked on the author label Feb 17, 2017
@xcompass
Copy link
Contributor

xcompass commented Jun 8, 2017

I'm closing this for now. Let me know if there is any question.

@xcompass xcompass closed this as completed Jun 8, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants