”Failed to get system bot” after importing old data to a fresh install
I’m just making this note here publicly, since I was first going to pose this as a question, but then managed to solve it by myself:
For background, I recently switched my Mattermost from a tar archive installation to installing it from the package repository, and simultaneously switched it from using a MySQL database to using PostgreSQL, all in one fell swoop by exporting the old content, doing a fresh install, and then importing. This appears to have mostly worked, with just user profile images having been lost, and passwords requiring a reset, both of which (I’ve gleaned from various places) were to be expected.
However, all bot accounts also seem to have been converted into normal user accounts somewhere during this process. So far the only issue I’ve discovered resulting from this is this entry getting logged repeatedly:
Failed to get system bot caller="app/post.go:2205" component=post_reminders error="SqlBotStore.Get: Bot does not exist., resource "Bot" not found, id: <my system bot's id>"
I solved this by running
sudo -u mattermost mmctl user convert --bot "<bot id>" # replace <bot id> with your real system bot account id
Since that seems to have gone well (the error messages stopped), I went ahead and converted the rest of the bot accounts back to true bots likewise.
Vastaa viestiin sen kontekstissa (Mattermost Discussion Forums)