Traceback (most recent call last):
File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 755, in next
chunk = self._next_with_retry()
File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 747, in _next_with_retry
return self._cursor.next()
File "/usr/local/lib64/python3.6/site-packages/pymongo/cursor.py", line 1215, in next
raise StopIteration
StopIteration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./migrate.py", line 229, in <module>
obj.dumpfiles("rocketchat_uploads", store)
File "./migrate.py", line 104, in dumpfiles
data = res.read()
File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 565, in read
chunk_data = self.readchunk()
File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 528, in readchunk
chunk = self.__chunk_iter.next()
File "/usr/local/lib64/python3.6/site-packages/gridfs/grid_file.py", line 759, in next
raise CorruptGridFile("no chunk #%d" % self._next_chunk)
gridfs.errors.CorruptGridFile: no chunk #0
Server Setup Information
Version of Rocket.Chat Server: 3.6.1
Version of MongoDB server: 4.4
Operating System: CentOS 7
Deployment Method: both RocketChat and MongoDB in Docker container
There are a number of potential reasons - out of space etc etc
Personally I would get a good backup and then update your whole Rocket install first - if you want to be cautious do it a version at a time with backups between just to make sure the DB modifications work.
When moving DB make sure you move between the SAME versions of Rocket or you will hit problems.
Do NOT export from 3.6.1 and import to say 3.14.0
Make a sure you have plenty of space to export from GridFS
Something else I have just seen is you are running 3.6.1 on Mongo 4.4 ?
Did you import to Mongo 4.4 first and THEN try to export from GridFS? Iâm not sure how good 4.4 support is.
If the admin page shows âTotal Uploads Size 3.40 GBâ, how much storage space shoud I give?
(Actually there is about less than 3 GB in GridFS, 400 MB already in MinIO.)
Maybe I should wait for RocketChat compatibility MongoDB version 4.4 to get all the old data out of GridFS to MinIO. I prefer hold all old data in GridFS for now.
Yes, I have new issues about MinIO. If I need to post this in new thread, please that me know.
After I change the storage to MinIO (AWS S3 in RocketChat setting) the picture will got âretryâ after 15 mins.
Used mc admin trace to show require status and do some search, I found that in the require url, there is a parameter X-Amz- Expires = 900 defined âAWS S3 presigned urlâ expired time. But I setted URLs Expiration Timespan: 0.
This âpicture retryâ situation will recover it self the next day.
02:30:09.936 [403 Forbidden] s3.GetObject minio-cvt.domain.com/rocket-cdn/kTKesiQB9hQ5NtsTg/uploads/2YwwxaS8hJqDDBPXF/gzHk8qHmbZaXCSCb7/apiuZWRLvcHeuDfNA?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=rocket%2F20210608%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20210608T011121Z&X-Amz-Expires=900&X-Amz-Signature=c82d9b267c8b954b7da26a3ee2cdf62b56e8ab4952af69fe206d5319df45dbf4&X-Amz-SignedHeaders=host&response-content-disposition=inline%3B%20filename%3D%22IMG_8705.png.JPG%22 <Client_IP_Here> 1.146ms â 253 B â 674 B
Hits âretryâ for many times will show the XML like below.
First thing to do is upgrade your Rocket to at least 3.14.4 - please read the release notes for why.
More than that
I think you need enough to store a whole copy. So several Gb to be sure.
If you are already on Mongo 4.4, which as far as I am aware is not officially supported yet, then the exporter may not work- it is not in our control! However, I donât suggest you try and go back to an earlier Mongo DB version now.
There is another exporter in the Rocket.Chat repo you could try that may possibly work - Iâll try and find it.
As far as CDN goes, Iâd disable it first and test without it. That can cause all sorts of issues so you need to figure out where the problem really lies - either with Rocket or CDN.