I cannot get mmctl import to work.
mmctl --local import upload ./mattermost-bulk-import.zip
Error: failed to upload data: : Unable to write the file.,
unable write the data in the file import/m1tmnrw7d****8f1p3ct7a9h_mattermost-bulk-import.zip.tmp: Put "https://******/kamva-chat/import/m1tmnrw7dbdxfq38f1p3ct7a9h_mattermost-bulk-import.zip.tmp?partNumber=204&uploadId=*****TysJwdyxltqcPnxVAzA79JryjG":
context deadline exceeded
I tried everything. I changed the body size limit to 5G. I changed Read Timeout and Write Timeout to 3600. I tried local and remote import. neither works and both throw same error.
any idea what is wrong?
the validate output:
root@racknerd-00fbbd:~# ./mmctl import validate ./mattermost-bulk-import.zip
WARNING: server version 9.3.0.7014621505.1541b4eabce3bb7bd2ff469b044c9d35.false doesn't match mmctl version 8.0.0
The .jsonl file has 60713 lines
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:9439 field "post.attachments[0]": missing attachment file "data/bulk-export-attachments/FRLQPHQB0_VID_20191211_113612.MOV"
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:13175 field "post.attachments[0]": missing attachment file "data/bulk-export-attachments/F9U5FA431_Happy_Nowruz.MOV"
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:14205 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:14457 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:14655 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:14772 field "post.attachments[0]": missing attachment file "data/bulk-export-attachments/FFQ58GTHT_IMG_1920.MOV"
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:14873 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:15171 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:15216 field "post.attachments[0]": missing attachment file "data/bulk-export-attachments/FKP49U9N2_IMG_2331.MOV"
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:32749 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:37580 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:41331 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
import validation error in mattermost-bulk-import.zip->mattermost_import.jsonl:59797 field "post": BulkImport: app.import.validate_post_import_data.message_length.error
Progress: 60713/60713 (100.00%)
Schemes 0
Teams 0
Channels 33
Users 113
Emojis 0
Posts 60566
Direct Channels 0
Direct Posts 0
Attachments 2236
Unused Attachments (535):
data/bulk-export-attachments/****
It took 1.962112455s to validate 60713 lines in ./mattermost-bulk-import.zip
Validation complete
I highly doubt this is the reason but included this anyway
log
error web/context.go:115 timestamp=2025-01-17 10:25:51.762 Z path=/api/v4/uploads/y9kwqmeuu78i3edfmyzxtqfoae request_id=5su6113ag7d7zkgqjzdafwyr1c ip_addr=***** user_id=j7xhmcfmatnrugu3yiekkru15c method=POST err_where=WriteFile http_code=500 error=WriteFile: Unable to write the file., unable write the data in the file import/y9kwqmeuu78i3edfmyzxtqfoae_mattermost-bulk-import.zip.tmp: Put "https://******/****/import/y9kwqmeuu78i3edfmyzxtqfoae_mattermost-bulk-import.zip.tmp?partNumber=319&uploadId=2~*****": context deadline exceeded Unable to write the file.
updating to 10.3.2 fixed the issue of uploading the file.
I now have a different issue:
[
{
"id": "s5n19ogdn7dhiy9gnssarf3wya",
"type": "import_process",
"priority": 0,
"create_at": 1737119304306,
"start_at": 1737119311194,
"last_activity_at": 1737119312525,
"status": "error",
"progress": -1,
"data": {
"error": "Error during job execution. — UpdateUserRoles: Cannot demote last System Admin.",
"import_file": "x153b9iqhfdmdy77qjsqgmt7ae_mattermost-bulk-import.zip",
"line_number": "45"
}
}
]
I fixed this with adding a new admin. there were other minor errors but managed to fix them all