Hello!
I trying upgrade mattermost from 5.34.2 to 5.35.0, but I’m getting error:
{"level":"error","ts":1621062182.626727,"caller":"commands/extract_content.go:84","msg":"Failed to extract file content","error":"failed to save the extracted file content: failed to update FileInfo content with id=3a5on3zgujnnmkkd1h5sk1ktzr: Error 1366: Incorrect string value: '\\xCC\\xE5\\xE4\\xE0\\xEB\\xFC...' for column 'Content' at row 1","errorVerbose":"Error 1366: Incorrect string value: '\\xCC\\xE5\\xE4\\xE0\\xEB\\xFC...' for column 'Content' at row 1\nfailed to update FileInfo content with id=3a5on3zgujnnmkkd1h5sk1ktzr\ngithub.com/mattermost/mattermost-server/v5/store/sqlstore.SqlFileInfoStore.SetContent\n\tgithub.com/mattermost/mattermost-server/v5/store/sqlstore/file_info_store.go:368\ngithub.com/mattermost/mattermost-server/v5/store/retrylayer.(*RetryLayerFileInfoStore).SetContent\n\tgithub.com/mattermost/mattermost-server/v5/store/retrylayer/retrylayer.go:3523\ngithub.com/mattermost/mattermost-server/v5/store/searchlayer.SearchFileInfoStore.SetContent\n\tgithub.com/mattermost/mattermost-server/v5/store/searchlayer/file_info_layer.go:106\ngithub.com/mattermost/mattermost-server/v5/store/timerlayer.(*TimerLayerFileInfoStore).SetContent\n\tgithub.com/mattermost/mattermost-server/v5/store/timerlayer/timerlayer.go:3015\ngithub.com/mattermost/mattermost-server/v5/app.(*App).ExtractContentFromFileInfo\n\tgithub.com/mattermost/mattermost-server/v5/app/file.go:1404\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.extractContentCmdF\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/extract_content.go:82\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:852\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.1.3/command.go:960\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:897\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.Run\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/root.go:14\nmain.main\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/main.go:31\nruntime.main\n\truntime/proc.go:204\nruntime.goexit\n\truntime/asm_amd64.s:1374\nfailed to save the extracted file content\ngithub.com/mattermost/mattermost-server/v5/app.(*App).ExtractContentFromFileInfo\n\tgithub.com/mattermost/mattermost-server/v5/app/file.go:1405\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.extractContentCmdF\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/extract_content.go:82\ngithub.com/spf13/cobra.(*Command).execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:852\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\tgithub.com/spf13/cobra@v1.1.3/command.go:960\ngithub.com/spf13/cobra.(*Command).Execute\n\tgithub.com/spf13/cobra@v1.1.3/command.go:897\ngithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands.Run\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/commands/root.go:14\nmain.main\n\tgithub.com/mattermost/mattermost-server/v5/cmd/mattermost/main.go:31\nruntime.main\n\truntime/proc.go:204\nruntime.goexit\n\truntime/asm_amd64.s:1374","fileInfoId":"3a5on3zgujnnmkkd1h5sk1ktzr"}
and mattermost won’t index more and stops. There’s many files and indexing should be long.
Can you please run the following SQL command and share the output of it?
SELECT * FROM FileInfo WHERE Id = "3a5on3zgujnnmkkd1h5sk1ktzr";
The error complains of an incorrect string value of Content column for that particular file. So, I’d like to know what is currently being stored there.
Does the error occur once for that file or does it also happen to others as well?
@olodar Our devs will look into it, but for now they suggested that it would be good to know more about the file that is being indexed. They are thinking that the file is not indexable but gives a false positive related to plain text extraction, and the database text field is not supporting the content that we tried to store. Other option is that the encoding of the field in the database may need to be something like utf-8 to work properly.
If needed, we can then make the change as suggested by @jespino to verify if that helps. Make sure you backup the database first before performing any updates.