Internal Server Error after backup restore [SOLVE]

Questions/problems on Docker
Post Reply
goodmuyis
Posts: 9
Joined: Fri May 03, 2019 10:55 am

Internal Server Error after backup restore [SOLVE]

Post by goodmuyis » Wed Oct 23, 2019 9:29 am

Am trying to migrate our Document Server to new VPS but I got Internal Server Error [Error 500] after restoring the database backup, I don't know if the problem is a compatibility issue. I first restored the content of the /app/onlyoffice/CommunityServer/data/Products/Files without problem but as soon as I restore database file I cannot access the web interface again.

The setup for both older and new server was done using Docker install script
https://helpcenter.onlyoffice.com/serve ... ation.aspx

OO version. on t he old server is Version 10.0.1.867
OO version on the new server is Version 10.0.4.959

I can only get the web interface as soon as I revert the database of the new installation

Kindly help on this
Last edited by goodmuyis on Tue Oct 29, 2019 10:42 am, edited 1 time in total.

Andrew
Posts: 101
Joined: Mon Apr 01, 2019 1:09 pm

Re: Internal Server Error after backup restore

Post by Andrew » Wed Oct 23, 2019 2:35 pm

Hello goodmuyis,

It is highly recommended to make any migrations using same versions of components. In your case I recommend you to update old Community Server to the recent version first, check if new server have same version and after it move data from old to new server. To be able to roll back all changes in case of any errors during update process it is recommended to make snapshot of the server.
Please make sure both old and new servers have MySQL database v5.7. Also please specify commands which you use to dump database on old server and restore it on new one.

goodmuyis
Posts: 9
Joined: Fri May 03, 2019 10:55 am

Re: Internal Server Error after backup restore

Post by goodmuyis » Wed Oct 23, 2019 7:21 pm

Andrew wrote:
Wed Oct 23, 2019 2:35 pm
Hello goodmuyis,

It is highly recommended to make any migrations using same versions of components. In your case I recommend you to update old Community Server to the recent version first, check if new server have same version and after it move data from old to new server. To be able to roll back all changes in case of any errors during update process it is recommended to make snapshot of the server.
Please make sure both old and new servers have MySQL database v5.7. Also please specify commands which you use to dump database on old server and restore it on new one.
Thanks for the response, I will work to update the older server to the newer version. Below is the command i used for the Database dump and restore

Database Dump
docker exec onlyoffice-mysql-server /usr/bin/mysqldump -u root --password=my-secret-pw onlyoffice > ~/oo_bck.sql

Restoration
cat /home/ubuntu/oo_bck.sql | sudo docker exec -i onlyoffice-mysql-server /usr/bin/mysql -u root --password=my-secret-pw onlyoffice

Andrew
Posts: 101
Joined: Mon Apr 01, 2019 1:09 pm

Re: Internal Server Error after backup restore

Post by Andrew » Thu Oct 24, 2019 6:49 am

goodmuyis,

It could be input stream issue with cat, please check tested working method for backup/restore:

Code: Select all

docker exec -it onlyoffice-mysql-server mysqldump -u root -pYOUR_PASSWORD onlyoffice > dump.sql
place the dump file in MySQL container and:

Code: Select all

mysql -u root -pYOUR_PASSWORD onlyoffice < dump.sql
MySQL database should be v5.7.26 on both servers. We used 5.5 version in older ONLYOFFICE versions, please check it also.

goodmuyis
Posts: 9
Joined: Fri May 03, 2019 10:55 am

Re: Internal Server Error after backup restore

Post by goodmuyis » Thu Oct 24, 2019 7:48 am

Andrew wrote:
Thu Oct 24, 2019 6:49 am
goodmuyis,

It could be input stream issue with cat, please check tested working method for backup/restore:

Code: Select all

docker exec -it onlyoffice-mysql-server mysqldump -u root -pYOUR_PASSWORD onlyoffice > dump.sql
place the dump file in MySQL container and:

Code: Select all

mysql -u root -pYOUR_PASSWORD onlyoffice < dump.sql
MySQL database should be v5.7.26 on both servers. We used 5.5 version in older ONLYOFFICE versions, please check it also.
Thanks for staying with me

When I run

Code: Select all

sudo docker ps -a
below are the details returned which I believed should contain the version of each software and I can see that Both CommunityServer and DocumentServer has a different version. I forgot to start that am on Ubuntu 14.04.6 which I guess is ok

Old Server
=> onlyoffice/communityserver:10.0.1.867
=> onlyoffice/documentserver:5.2.8.24
=> mysql:5.7.26

New Server
=>onlyoffice/communityserver:10.0.4.959
=>onlyoffice/documentserver:5.4.1.39
=>mysql:5.7.26

Is there any possible way I could use the install script to install an older version?

Thanks in advance.

Andrew
Posts: 101
Joined: Mon Apr 01, 2019 1:09 pm

Re: Internal Server Error after backup restore

Post by Andrew » Thu Oct 24, 2019 9:52 am

I am afraid there is no way to install exact 10.0.1.867 version and as I mentioned earlier it is better to update old portal to recent version, you can use:

Code: Select all

wget https://download.onlyoffice.com/install/opensource-install.sh
bash opensource-install.sh -u true -ims false
Choose 'Y' for docker installation and it should update your portal if all components and database are valid/undamaged.

goodmuyis
Posts: 9
Joined: Fri May 03, 2019 10:55 am

Re: Internal Server Error after backup restore

Post by goodmuyis » Thu Oct 24, 2019 8:25 pm

Ok I just tried both commands below and they work

Code: Select all

cat /home/ubuntu/oo_bck.sql | sudo docker exec -i onlyoffice-mysql-server /usr/bin/mysql -u root --password=my-secret-pw onlyoffice
AND

Code: Select all

sudo docker exec -it onlyoffice-mysql-server bash
mysql -u root -pYOUR_PASSWORD onlyoffice < dump.sql
On both cases, I run the sql SELECT * FROM `core_user`; and it shows all the user on the older version which confirms that the dumb file was imported.
Please can you give me a pointer to enable or view the server http errors maybe I could find something reasonable there

Andrew
Posts: 101
Joined: Mon Apr 01, 2019 1:09 pm

Re: Internal Server Error after backup restore

Post by Andrew » Fri Oct 25, 2019 7:36 am

Please find Community Server logs in /app/onlyoffice/CommunityServer/logs folder on host machine.

goodmuyis
Posts: 9
Joined: Fri May 03, 2019 10:55 am

Re: Internal Server Error after backup restore

Post by goodmuyis » Tue Oct 29, 2019 10:42 am

Thank you @Andrew I was able to resolve the issue. For now, I can say its is version compatibility. After updating the using the command below, reboot the vps, I back up mysql database, and import to the new server and everything works fine now.

Thank you so much

OnlyOffice DOcker Update [Y]

Code: Select all

wget https://download.onlyoffice.com/install/opensource-install.sh
bash opensource-install.sh -u true -ims false
MySQL Database Dump to file

Code: Select all

docker exec -it onlyoffice-mysql-server mysqldump -u root -pmy-secret-pw onlyoffice > OO_oct29_dump.sql
MySQL Import Database file

Code: Select all

cat /home/ubuntu/OO_oct29_dump.sql | sudo docker exec -i onlyoffice-mysql-server /usr/bin/mysql -u root --password=my-secret-pw onlyoffice
A point to note is that MySQL is adding extra line at the top of the dump file which is a prompt about using password in the command line. This break the restore operation
I have removed that manually using nano.

Post Reply