[Docker] Update CS 10

Tech support for Enterprise Version
Post Reply
kiar
Posts: 49
Joined: Tue Oct 04, 2016 7:31 am

[Docker] Update CS 10

Post by kiar » Sun Aug 04, 2019 9:53 am

Hello,

I tried may times to update to CommunityServer 10 ( docker version, entreprise on debian, update through ControlPanel ), but after the update I get the famous Runtime Error :

Code: Select all

Runtime Error
A runtime error has occurred
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed (for security reasons).

Details: To enable the details of this specific error message to be viewable, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration> .....
In the docker container from CS, I found in /Var/log/monoserve.log :

Code: Select all

Mono: Assembly Loader probing location: '/var/www/onlyoffice/WebStudio/bin/ASC.Web.Studio.dll'.
Mono: Image addref ASC.Web.Studio[0x7f22d4007480] (asmctx LOADFROM) -> /var/www/onlyoffice/WebStudio/bin/ASC.Web.Studio.dll[0x7f22d4007aa0]: 2
Mono: Assembly Loader loaded assembly from location: '/var/www/onlyoffice/WebStudio/bin/ASC.Web.Studio.dll'.
Mono: Config attempting to parse: '/tmp/onlyoffice-temp-aspnet-0/733c99ce/assembly/shadow/0dec2923/8a215789_87cd7eaa_00000001/ASC.Web.Studio.dll.config'.
Mono: Config attempting to parse: '/etc/mono/assemblies/ASC.Web.Studio/ASC.Web.Studio.config'.
Mono: Unloading image /var/www/onlyoffice/WebStudio/bin/ASC.Web.Studio.dll [0x7f22d4007aa0].
many times for many modules ( Calendar, Talk, ... ).

So, I have to rollback a backup to get OnlyOffice works again.

Am I the only one experiencing this issue ?
What am I doing wrong for the update ?

Cheers

Maxim
Posts: 2017
Joined: Tue Oct 11, 2016 2:34 pm

Re: [Docker] Update CS 10

Post by Maxim » Sun Aug 04, 2019 2:28 pm

Hello kiar!
Try to update via script.

Code: Select all

bash enterprise-install.sh -u true

kiar
Posts: 49
Joined: Tue Oct 04, 2016 7:31 am

Re: [Docker] Update CS 10

Post by kiar » Wed Aug 07, 2019 3:38 pm

Hello Maxim and thanks for your help !

The script ends up with :

Code: Select all

creating onlyoffice_mailserver database dump file
onlyoffice-mail-server could not create onlyoffice_mailserver database dump file
We don't use the mailserver ( disabled in Parameters --> Modules and tools ), but the docker container is still running :

Code: Select all

# docker ps
CONTAINER ID        IMAGE                                                COMMAND                  CREATED             STATUS              PORTS                                                                                                                               NAMES
cd17cc712139        onlyoffice4enterprise/documentserver-ee:5.3.4.3      "/bin/sh -c /app/o..."   5 minutes ago       Up 5 minutes        80/tcp, 443/tcp                                                                                                                     onlyoffice-document-server
c66d8a750ef3        mysql:5.5                                            "docker-entrypoint..."   8 minutes ago       Up 8 minutes        3306/tcp                                                                                                                            onlyoffice-mysql-server
4669c2e6be5c        onlyoffice4enterprise/communityserver-ee:9.6.5.771   "/usr/bin/dumb-ini..."   3 months ago        Up 17 minutes       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 3306/tcp, 5280/tcp, 9865-9866/tcp, 9871/tcp, 9882/tcp, 0.0.0.0:5222->5222/tcp, 9888/tcp   onlyoffice-community-server
3c0912ee6dd8        onlyoffice/mailserver:1.6.35                         "/bin/sh -c 'expor..."   3 months ago        Up 17 minutes       0.0.0.0:25->25/tcp, 0.0.0.0:143->143/tcp, 3306/tcp, 0.0.0.0:587->587/tcp, 8081/tcp                                                  onlyoffice-mail-server
2f34e6c1c61c        onlyoffice4enterprise/controlpanel-ee:2.6.0.171      "/usr/bin/dumb-ini..."   10 months ago       Up 17 minutes       80/tcp, 443/tcp, 9833-9834/tcp                                                                                                      onlyoffice-control-panel
The mail entries for the users are read from our ldap tree.

Any idea to go further ?

Maxim
Posts: 2017
Joined: Tue Oct 11, 2016 2:34 pm

Re: [Docker] Update CS 10

Post by Maxim » Thu Aug 08, 2019 8:04 pm

Hello kiar!
If you do not use mailserver Is it possible to delete mailserver?

Code: Select all

docker stop onlyoffice-mail-server

Code: Select all

docker rm onlyoffice-mail-server
and repeat upgrading using script.

kiar
Posts: 49
Joined: Tue Oct 04, 2016 7:31 am

Re: [Docker] Update CS 10

Post by kiar » Sun Aug 11, 2019 9:21 pm

Hello Maxim!

Thank you for your help, it's really appreciated.

Deleting the mail container permit to bring the update to the end on my test server. But after restarting the services, I got following errors :

1) Calendar not showing up with error : Unknown column 'cal.caldav_guid' in 'field list'
It seems that the mysql scheme has not been updated : https://github.com/ONLYOFFICE/Community ... issues/162 ?
After the update, I got a new mysql container :

Before the update :

Code: Select all

# docker ps
CONTAINER ID        IMAGE                                               
4669c2e6be5c        onlyoffice4enterprise/communityserver-ee:9.6.5.771   
f4eb88c62cf0        onlyoffice4enterprise/documentserver-ee:5.2.8.24     
3c0912ee6dd8        onlyoffice/mailserver:1.6.35                         
2f34e6c1c61c        onlyoffice4enterprise/controlpanel-ee:2.6.0.171     
After the update :

Code: Select all

CONTAINER ID        IMAGE                                                 
7a53da1fb315        onlyoffice4enterprise/communityserver-ee:10.0.1.897  
324ced5cd57e        onlyoffice4enterprise/controlpanel-ee:2.7.0.266
eef73cc32bf5        onlyoffice4enterprise/documentserver-ee:5.3.4.3    
03567e1ab1e4        mysql:5.5
2) In the control panel, the backup page shows an error ( could not retrieve data, or something similar ).

Do you have an idea how to solve this ?

Thank you !

Carl
Posts: 163
Joined: Thu Apr 12, 2018 10:00 am

Re: [Docker] Update CS 10

Post by Carl » Wed Aug 14, 2019 12:07 pm

Hello,

After installing the update with the script you get MySQL version 5.5 in a separate container. You need to manually upgrade it to the version 5.7. Follow these steps:

1. In the directory /var/lib/mysql/ (inside MySQL container) run the command mysqldump -u root -pmy-secret-pw --databases onlyoffice > db_backup.dump to create a database dump.

2. Stop the MySQL container.

3. Rename it docker rename onlyoffice-mysql-server onlyoffice-mysql-server_OLD

4. Check if these files exist at the indicated path
/app/onlyoffice/mysql/conf.d/onlyoffice.cnf
/app/onlyoffice/mysql/initdb/setup.sql

5. In the directory /app/onlyoffice/mysql/ copy the folder data to data_OLD with the command cp -rp data data_OLD. Remove the data folder.

6. Deploy new MySQL container

Code: Select all

sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mysql-server \
 -v /app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d \
 -v /app/onlyoffice/mysql/data:/var/lib/mysql \
 -v /app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d \
 -e MYSQL_ROOT_PASSWORD=my-secret-pw \cd 
 -e MYSQL_DATABASE=onlyoffice \
 mysql:5.7.26
7. Restore the dump inside the new MySQL container mysql -u root -pmy-secret-pw < db_backup.dump

kiar
Posts: 49
Joined: Tue Oct 04, 2016 7:31 am

Re: [Docker] Update CS 10

Post by kiar » Wed Aug 14, 2019 8:21 pm

Hello Carl!

Thank you for your help.
Carl wrote:
Wed Aug 14, 2019 12:07 pm
1. In the directory /var/lib/mysql/ (inside MySQL container) run the command mysqldump -u root -pmy-secret-pw --databases onlyoffice > db_backup.dump to create a database dump.
The old mysql container was the community server, I had to start the service mysql in the container, and then stop it after the backup.
And the directory /var/lib/mysql was not an extern volume anymore, so I moved the backup manually into the new mysql 5.7.26 container ( step 7 for restore ).
6. Deploy new MySQL container

Code: Select all

sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mysql-server \
 -v /app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d \
 -v /app/onlyoffice/mysql/data:/var/lib/mysql \
 -v /app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d \
 -e MYSQL_ROOT_PASSWORD=my-secret-pw \cd 
 -e MYSQL_DATABASE=onlyoffice \
 mysql:5.7.26
I think you mean (without cd) :

Code: Select all

sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mysql-server -p 3306:3306 \
 -v /app/onlyoffice/mysql/conf.d:/etc/mysql/conf.d \
 -v /app/onlyoffice/mysql/data:/var/lib/mysql \
 -v /app/onlyoffice/mysql/initdb:/docker-entrypoint-initdb.d \
 -v /app/onlyoffice/mysql/logs:/var/log/mysql \
 -e MYSQL_ROOT_PASSWORD=my-secret-pw \ 
 -e MYSQL_DATABASE=onlyoffice \
 mysql:5.7.26
7. Restore the dump inside the new MySQL container mysql -u root -pmy-secret-pw < db_backup.dump
As I said in step 1, I had to move the backup manually from the container community --> mysql.

I went through all steps without problem, but after restarting the container, I get the install wizard.
It's not a problem, because i'm testing the update on a test server, but do you know how to come further ?

Thanks !

Post Reply