For troubleshooting questions, please post in the following format:
Summary
I am trying to restore a backup from Bitnami Team Edition AWS Marketplace version EC2 to another instance. This does not seem to be working. I already have backup taken and uploaded to new instance. I am following Part B of this: Create and restore application backups
This works and I am able to get the new instance working. But after this I want to upgrade from 5.25 like this: 5.25.0 â 5.25.7->v5.26.2 â v5.27.2 ->v5.28.2 ->v5.29.2 ->v5.30.3 â v5.31.1 *Extended Support Release (ESR)->v5.32.1 .
Firstly when I restore backup onto the new instance, I go back to version 5.25.0. After that I am upgrading using this guide: Upgrade Mattermost Team Edition
After upgrading to 5.26 mattermost is not working. I see this error: {âlevelâ:âinfoâ,âtsâ:1614628262.9054418,âcallerâ:âsqlstore/supplier.go:227â,âmsgâ:âPinging SQLâ,âdatabaseâ:âmasterâ}
{âlevelâ:âerrorâ,âtsâ:1614628262.9204803,âcallerâ:âsqlstore/supplier.go:174â,âmsgâ:âError creating database tables.â,âerrorâ:âError 1146: Table âbitnami_mattermost.sidebarcategoriesâ doesnât existâ}
Steps to reproduce
How can we reproduce the issue (what version are you using?) Version 5.25.0 â 5.25.7->5.26.2
Expected behavior
Upgrade should work properly according to guide
Observed behavior
What did you see happen? Please include relevant error messages and/or screenshots.
Mattermost starts when doing ctlscript.sh restart
But then I see the error given above and I cannot open the url. It says 502 nginx error.
I would also like to check the ownership and permission of the database in use. Switch to root access and run ls -lAh /var/lib/mysql | grep "<database_name>". In your case, I believe it should be bitnami_mattermost based on the error we are seeing.
For example, this is how it looks like on my side based on my database table mattermost:
root@mattermost:~# ls -lAh /var/lib/mysql | grep "mattermost"
drwxr-x--- 2 mysql mysql 12K Mar 2 01:51 mattermost
Lastly, run the mysqlcheck to verify the status of the tables. For example:
ahmaddanial@mattermost:~$ mysqlcheck -u <username> -p <database_name>
Enter password:
mattermost.Audits OK
mattermost.Bots OK
mattermost.ChannelMemberHistory OK
mattermost.ChannelMembers OK
mattermost.Channels OK
mattermost.ClusterDiscovery OK
mattermost.CommandWebhooks OK
mattermost.Commands OK
mattermost.Compliances OK
mattermost.Emoji OK
mattermost.FileInfo OK
mattermost.GroupChannels OK
mattermost.GroupMembers OK
mattermost.GroupTeams OK
mattermost.IncomingWebhooks OK
mattermost.Jobs OK
mattermost.Licenses OK
mattermost.LinkMetadata OK
mattermost.OAuthAccessData OK
mattermost.OAuthApps OK
mattermost.OAuthAuthData OK
mattermost.OutgoingWebhooks OK
mattermost.PluginKeyValueStore OK
mattermost.Posts OK
mattermost.Preferences OK
mattermost.PublicChannels OK
mattermost.Reactions OK
mattermost.Roles OK
mattermost.Schemes OK
mattermost.Sessions OK
mattermost.SidebarCategories OK
mattermost.SidebarChannels OK
mattermost.Status OK
mattermost.Systems OK
mattermost.TeamMembers OK
mattermost.Teams OK
mattermost.TermsOfService OK
mattermost.Tokens OK
mattermost.UserAccessTokens OK
mattermost.UserGroups OK
mattermost.UserTermsOfService OK
mattermost.Users OK
Just to be clear: These outputs are from the second Mattermost instance. I had to restore the first instance back to working 5.25.0.
After taking a backup and restoring onto second instance (Another Bitnami image which was launched at 5.32.1 on Debian 10) After restoring using the documentation, the second instance also worked fine. I am getting this issue when I upgrade the second instance.
Also what do I enter as password for the 3rd check you mentioned?
I tried the bitnami credentials I got when I launched the instance but it doesnt seem to work
The ls -lAh /var/lib/mysql | grep "<database_name>" is to be ran on the server hosting your Mattermost database. I noticed from your configuration that it is on localhost. Can I please confirm where is your MySQL database being stored in that machine? By default, it is stored in /var/lib/mysql which is why I shared to you the command earlier.
For the third check, you should be using the password you used to access your database. If I look at your example, it is e47cb77d6.
I dont understand. This is just one instance. So that mattermost database is also on the same server. Do you mean my original instance whoâs backup I restored here?
That shows that there isnât any database at all in the directory. How is the database actually being configured in the new instance?
How did you access the MySQL backend in the original instance? What username and password did you use?
What is the configuration like on this new instance? Is it self hosted on a Linux machine or it is still running on another Bitnami deployment as well?
If it is an a Linux machine, is the MySQL database that you are using to restore the information back hosted on the same machine? How do you access it?
When you mentioned this, what I understand here is that you are currently have a working Mattermost Server 5.25.7.
The specific issue that you are facing here is the database issue when you upgraded to 5.26.2. Just to double confirm that you did not miss any steps in the Upgrade Mattermost Team Edition guide.
I went through the upgrade notes and the changelog of Mattermost, did not see any breaking changes that would affect the database when we move from the said versions.
I did not access the MySQL while backing up. I just got application-backup.tar.gz which I then unzipped on new instance. Then I restarted all services using the ctlscript.sh restart command.
I followed this: Upgrade Mattermost Team Edition
to take a backup from my Instance A which is Bitnami Mattermost Team Edition running on Ubuntu 14.04.
Instance B is also a Bitnamo Mattermost Team Edition but this runs on Debian 10. As I didnt see the latest Ubuntu version support while configuring the new instance from AWS Marketplace.
Iâm not sure how to access this mysql database. I have never done this before.
Just want to make sure that there are no loose ends.
So, itâs on a different distro. I donât see it as a problem since the error that we are seeing is specific to the database table.
Do you have any database administrator who is helping you with the original Mattermost setup, migration. and upgrade that we can get involve in this discussion?
Yes I have followed all steps in the upgrade procedure. All the steps.
I have managed this instance since a long time(no separate database admin). I have never had the need to access the database so Iâm not sure if I have any such credentials. I can look in my previous notes if I have saved any such configurations.
Got it. I would like to check the database side of it based on the error you shared. Hence, the database access that I asked. All the steps were followed correctly based on the documentation provided by Bitnami themselves, so there should not be any issues there.
Side note: Can you attempt to upgrade the working 5.25.7 to the latest version and confirm if you are still hitting into the same problem? Just trying to further isolate if this is a Mattermost Server specific or rather something else (like database in discussion now).
Sure @ahmaddanial I will try this again. Full you mean try upgrading directly from 5.25 to 5.32? Or just finish the whole upgrade path on existing instance which is on 5.26??
Hey @ahmaddanial I restored the backup successfully again and got a working 5.25.0
This time I followed the instructions here: Upgrade Mattermost Team Edition
But this time as mentioned in the article, I directly tried mattermost 5.32.1. This also breaks mattermost and I get mattermost could not be started. Also, there is nothing in mattermost.log file. I was getting some issues in nginx(related to new domain resolution) which I think I have resolved. So nginx starts, but mattermost still does not start. Please advise.
Clearly something is missing in the upgrade documentation because it continues to fail. If there is nothing in the mattermost.log file, we do not have any information to start troubleshooting the issue from Mattermost Server side.
Can you please confirm if your logging in Mattermost is set to the following, specifically the FileLevel set to DEBUG so more information is logged to the mattermost.log?
Hi @ahmaddanial I am not seeing any logs on mattermost as the log file is empty. So I dont know if the database issue is resolved. Can the dev /engineering team advise on how to debug this? Thanks!