Hotsync onlyoffice error

Getting the following error everynight from hotsync.

Error: Package: nethserver-onlyoffice-0.0.1-5.ns7.noarch (mrmarkuz)
Requires: onlyoffice-documentserver
[ERROR] restore-config-reinstall failed!

I think I understand the error, onlyoffice is not installed on backup NS, and it is not an official package. Just want to know if there is a way to suppress the error, or better yet, is it safe to install onlyoffice on backup NS so it is better prepared for restore? I assume so, just want to be sure. Or is it better to wait until after the restore to install onlyoffice?

It should be enough to install the relevant repos:

Onlyoffice repo:

yum install http://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm
1 Like

Ok, thanks. I will know tomorrow if I still get the error, but I assume all will be good.
I will test, but will the slave restore now install onlyoffice, or will it still need to be manually installed?

The packages on master are installed on slave automatically.

1 Like

Still got the error this morning after installing the repo yesterday.

Error: Package: nethserver-onlyoffice-0.0.1-5.ns7.noarch (mrmarkuz)
Requires: onlyoffice-documentserver
[ERROR] restore-config-reinstall failed!

If I run ;

yum install http://download.onlyoffice.com/repo/centos/main/noarch/onlyoffice-repo.noarch.rpm

I get;

Examining /var/tmp/yum-root-fbuZ8b/onlyoffice-repo.noarch.rpm: onlyoffice-repo-1.0.0-9.noarch
/var/tmp/yum-root-fbuZ8b/onlyoffice-repo.noarch.rpm: does not update installed package.
Error: Nothing to do

Is mrmarkuz repo installed on the slave?

No, it wasn’t, that is it. Thanks.

Still get an error this morning, but different error.

Error: Package: nethserver-onlyoffice-0.0.1-5.ns7.noarch (mrmarkuz)
Requires: onlyoffice-documentserver
[ERROR] restore-config-reinstall failed!

I know it is suggested to not install anything on the slave NS box, but should I install onlyoffice-documentserver, or just make that part of the slave restore?

Are the repos enabled on the slave?

Please check if /etc/yum.repos.d/mrmarkuz.repo and /etc/yum.repos.d/onlyoffice-repo have an enabled=1 entry.

I’d do it after slave promotion.

Funny thing is, when I check onlyoffice-repo it is not installed, it is like it was deleted. You can see below where I ran the command and it reported Nothing to do. Anyway, I have installed again, and it shows as enabled=1, and hope it was a fluke and all is good from here. I’ll report back tomorrow.

Well, onlyoffice-repo is still there and enabled, so I did not get the error this morning!
But, I got a new error;

warning: /var/cache/yum/x86_64/7/mrmarkuz/packages/nethserver-nginx-0.0.1-1.ns7.noarch.rpm: Header V4 RSA/SHA1 Signature, key ID f144e5a3: NOKEY
warning: /var/cache/yum/x86_64/7/nodesource/packages/nodejs-8.15.1-1nodesource.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 34fa74dd: NOKEY
Importing GPG key 0xF144E5A3:
Userid : "Markus Neuberger <dev@markusneuberger.at>"
Fingerprint: b0ef d107 b433 ccf0 db12 c453 6a35 e5a2 f144 e5a3
From : https://mrmarkuz.goip.de/mirror/mrmarkuz/RPM-GPG-KEY


GPG key retrieval failed: [Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL"
[ERROR] restore-config-reinstall failed!

Looks like nodesource repo is missing on slave:

https://wiki.nethserver.org/doku.php?id=onlyoffice#install_nodejs_repo

Was testing this a little more, and there are further problems.
After installing the nodesource repo, it seemed to be ok, but at 1am the next evening, which I assume is when the update check is run on the slave, I began getting this error on every hotsync run.
I rolled back to clean install, installed the 3 repos, and the same thing happened again the next night at 1am.

PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /usr/share/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /usr/share/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySq in /usr/share/nextcloud/lib/private/DB/Connection.php on line 64
PHP Fatal error: Uncaught Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [2002] No such file or directory in /usr/share/nextcloud/lib/private/DB/Connection.php:64
Stack trace:
#0 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(429): OC\DB\Connection->connect()
#1 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(389): Doctrine\DBAL\Connection->getDatabasePlatformVersion()
#2 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(328): Doctrine\DBAL\Connection->detectDatabasePlatform()
#3 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): Doctrine\DBAL\Connection->getDatabasePlatform()
#4 /usr/share/nextcloud/lib/private/DB/Connection.php(151): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#5 /usr/share/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOMySq in /usr/share/nextcloud/lib/private/DB/Connection.php on line 64

Are the needed php modules/db drivers installed?

yum install php-mysql rh-php71-php-mysqlnd

Is the database running?

systemctl status mysqld -l

Please also check if the versions are correct, it should be MariaDB 5.5.60 and PHP 5.4.16

mysql -V

php -v

php-mysql is not installed, but this is a hotsync clone, does that not happen automatically? The instructions say fresh install, and install hotsync and nothing else.
Now I’ve manually had to install 3 repos, but I assumed that was because of unsupported onlyoffice.

systemctl status mysqld -l

mysqld.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; disabled; vendor preset: disabled)
   Active: inactive (dead)

mysql and php are the correct versions.

Hotsync is tagged as being a beta module for a while now. Is it production ready?

Did you try a test run and promote the slave? Maybe the errors can be ignored because they do not occur anymore when the slave is promoted.