Cant Use S3 Storage


#10

Hi @RbDev! Apologies for late reply.

Are you seeing any errors in logs?

Were you attempting to make a post with the file?

Also, if you encounter crashing issues with S3 file uploads, we have an open ticket for a fix: https://mattermost.atlassian.net/browse/MM-10677.


#11

all the info is already in this thread


#12

Hi @RbDev - I checked with our developers about this and they said that the error messages you are getting mean that the setting AmazonS3Bucket in your config.json is not set. Can you help set that setting?


#13

That’s not how it should work.
The user doesn’t have to guess how to do something in mattermost.
There should be instructions available in documents website for everybody to see.
Ask the devs to send clear instructions how to create a s3 bucket for mm and how to configure mm to access it.
and please place them on documents websites.


#14

@RbDev I agree, thanks for the feedback - I’ll forward your feedback to the devs and find out how we can improve the documentation on this.


#15

@RbDev, thanks for your feedback and sorry about the issues you’re running into. Setting up S3 /should/ be as easy as filling in the requisite Amazon S3 configuration values, but there’s a couple of known issues that can impact some installations.

You mentioned seeing a message: “There appears to be a problem with your internet connection.” Is this reproducible for every file upload? Can you check your server logs to see if there is a panic or crash when this occurs? If so, you’re likely running into https://mattermost.atlassian.net/browse/MM-10677. A short-term workaround until that bug is fixed would be to increase the amount of memory on your Mattermost server.

You also asked, “Does using S3 redirects all file upload and download to amazon servers?” Yes: any file uploads and subsequent downloads are handled by Amazon servers. Mattermost will proxy the downloaded file back to the user.


#16

The issue happens all the time. In fact, the MM is unstable returning not found from time to time.

I’ve decided not to use group account between the server and the storage since I cant get it to work.

I’m using a IAM user account with S3FullAccess policy to log in but I’m still getting the same errors.

Admin console storage is set to work with S3 and test connection is returning successful.

Logs don’t report any errors.


#17

Hi @RbDev,

Is this reproducible for every file upload? Can you check your server logs to see if there is a panic or crash when this occurs?


#18

Hi Amy,

I already answer those questions in my previous reply.

Yes. it happens all the time and no log errors are reported.


#19

Do you have DEBUG log messages turned on as this might help with capturing more server log errors?


#20

Debug is selected. I think because it’s a client error, it’s not getting logged.

It must be some sort of permission issue.


#22

Summary of issue:

RbDev has created an S3 bucket with S3FullAccess policy and a IAM role to give read/write permissions.

They configured S3, saved all changes, and clicked the “Test button” and it returned successful.
When he tried to upload a file, he got an error “there appears to be a problem with your internet connection.”, but going to the s3 repo he could see that the file is there. There are no log errors and the issue happens all the time. https://mattermost.atlassian.net/browse/MM-10677 is not related.


#23

Hi @RbDev,

The test connection button in the System Console just makes sure the user can connect and check that it can see that the bucket exists, but it doesn’t check that you can actually put an object into the bucket or get one that’s already been uploaded. Can you confirm that the user that you’re using for Mattermost has s3:GetObject permissions?

If it does have have access to that, you could try turning on the FileSettings.AmazonS3Trace setting in Mattermost to see if there’s any more information logged on the server when you try to upload a file.

The only other thing I’d note is that ERR_CONNECTION_REFUSED usually means there’s an issue between your Mattermost server and the web browser, but seeing as the file was uploaded to S3, that doesn’t seem related.


#24

I had to not use S3 because of the permission issues.

I suggest the team to setup a brand new environment and document each step of the way.


#25

Hi @RbDev! Can you help with more details on what permission issues you are seeing?


#26

sure. what do you need?


#27

@RbDev you mentioned that you were experiencing permission issues so I was wondering if you have any additional details on that?


#28

no. I don’t see any errors apart from the ones already posted in this thread.


#29

@RbDev Did the suggestions given by our devs here help Cant Use S3 Storage ?


#30

no sorry. Ive tried this for to long and nothing worked so I went back to standard storage.