Nextcloud dead after update

nextcloud

(Rolf Bakker) #1

NethServer Version: NethServer release 7.6.1810 (final)
Module: Nextcloud

Hi all,
yesterday, I updated my NS using yum update:

May 09 21:42:08 Installed: rh-php72-runtime-1-2.el7.x86_64
May 09 21:42:09 Installed: perl-Carp-Clan-6.04-10.el7.noarch
May 09 21:42:11 Updated: glibc-2.17-260.el7_6.5.x86_64
May 09 21:42:18 Updated: glibc-common-2.17-260.el7_6.5.x86_64
May 09 21:42:19 Installed: rh-php72-php-json-7.2.10-3.el7.x86_64
May 09 21:42:19 Installed: rh-php72-php-zip-7.2.10-3.el7.x86_64
May 09 21:42:19 Installed: rh-php72-php-common-7.2.10-3.el7.x86_64
May 09 21:42:20 Installed: rh-php72-php-cli-7.2.10-3.el7.x86_64
May 09 21:42:26 Installed: rh-php72-php-fpm-7.2.10-3.el7.x86_64
May 09 21:42:26 Installed: rh-php72-php-pdo-7.2.10-3.el7.x86_64
May 09 21:42:27 Installed: rh-php72-php-mysqlnd-7.2.10-3.el7.x86_64
May 09 21:42:27 Installed: rh-php72-php-xml-7.2.10-3.el7.x86_64
May 09 21:42:27 Installed: sclo-php72-php-smbclient-1.0.0-1.el7.x86_64
May 09 21:42:27 Installed: rh-php72-php-ldap-7.2.10-3.el7.x86_64
May 09 21:42:28 Installed: rh-php72-php-mbstring-7.2.10-3.el7.x86_64
May 09 21:42:28 Installed: rh-php72-php-process-7.2.10-3.el7.x86_64
May 09 21:42:29 Installed: 1:rh-php72-php-pear-1.10.5-1.el7.noarch
May 09 21:42:30 Installed: rh-php72-1-2.el7.x86_64
May 09 21:42:30 Installed: nethserver-rh-php72-php-fpm-1.0.0-1.ns7.noarch
May 09 21:42:31 Installed: rh-php72-php-pecl-apcu-5.1.12-1.el7.x86_64
May 09 21:42:31 Installed: rh-php72-php-gd-7.2.10-3.el7.x86_64
May 09 21:42:31 Installed: rh-php72-php-opcache-7.2.10-3.el7.x86_64
May 09 21:42:32 Installed: rh-php72-php-intl-7.2.10-3.el7.x86_64
May 09 21:42:32 Installed: sclo-php72-php-pecl-imagick-3.4.3-3.el7.x86_64
May 09 21:43:04 Updated: nextcloud-16.0.0-1.el7.noarch
May 09 21:43:04 Installed: libmarkdown-2.2.4-1.el7.x86_64
May 09 21:43:05 Installed: discount-2.2.4-1.el7.x86_64
May 09 21:43:05 Installed: perl-Bit-Vector-7.3-3.el7.x86_64
May 09 21:43:06 Installed: perl-Date-Calc-6.3-14.el7.noarch
May 09 21:43:18 Updated: glibc-headers-2.17-260.el7_6.5.x86_64
May 09 21:43:32 Updated: nethserver-mail-smarthost-2.6.0-1.ns7.noarch
May 09 21:43:33 Updated: nethserver-cockpit-lib-0.6.0-1.ns7.noarch
May 09 21:43:33 Installed: perl-NTLM-1.09-5.el7.noarch
May 09 21:43:33 Installed: swaks-20170101.0-1.el7.noarch
May 09 21:43:34 Updated: nethserver-mail-common-2.6.0-1.ns7.noarch
May 09 21:43:35 Updated: nethserver-mail-filter-2.6.0-1.ns7.noarch
May 09 21:43:36 Updated: nethserver-mail-server-2.6.0-1.ns7.noarch
May 09 21:43:38 Updated: nethserver-mail-getmail-2.6.0-1.ns7.noarch
May 09 21:43:38 Updated: nethserver-mail-disclaimer-2.6.0-1.ns7.noarch
May 09 21:43:39 Updated: glibc-devel-2.17-260.el7_6.5.x86_64
May 09 21:43:39 Updated: nethserver-nextcloud-1.5.0-1.ns7.noarch
May 09 21:43:41 Updated: ghostscript-9.07-31.el7_6.11.x86_64
May 09 21:43:42 Updated: nethserver-backup-data-1.5.3-1.ns7.noarch

From that moment, Nextcloud doesn’t work anymore.
In the Webtop gui, when selecting the cloud icon > nextcloud, an error popup with a red cross opens. No text in it.
My (windows) desktop client says disconnected, my mobile app says “server in maintenance mode”.
I’ve rebooted my server > no succes
I’ve issued

sudo -u apache /opt/rh/rh-php72/root/usr/bin/php /usr/share/nextcloud/occ maintenance:mode --off

no succes.
When doing so, a yellow (warning?) appears:

The current PHP memory limit is below the recommended value of 512MB.

I’ve upped the limit in /etc/php.ini, then restarted httpd > no succes.

Can someone please help?


(Marc) #2
sudo -u apache scl enable rh-php72 -- php -dmemory_limit=512M /usr/share/nextcloud/occ maintenance:mode --off

If still cannot access, try with the upgrade command to see if any error is shown:

sudo -u apache scl enable rh-php72 -- php -dmemory_limit=512M /usr/share/nextcloud/occ upgrade

We try to collect some info on the wiki: https://wiki.nethserver.org/doku.php?id=howto:nextcloud

Tweak the php version as needed.


(Rolf Bakker) #3

Thanks for replying.

root@helium:php.d> $ sudo -u apache scl enable rh-php72 – php -dmemory_limit=512M /usr/share/nextcloud/occ maintenance:mode --off

Maintenance mode already disabled

root@helium:php.d> $ sudo -u apache scl enable rh-php72 – php -dmemory_limit=512M /usr/share/nextcloud/occ upgrade

Nextcloud is already latest version
root@helium:php.d> $

After both commands tried to connect > no succes. Is a restart of httpd needed?
And how can I find out what version of php NextCloud is using?


(Dan) #4

That really is about the least useful possible problem report. You expect it to do something. It does something. All we know is that the something you expected it to do, and the something it did do, weren’t the same–and that doesn’t get us very far toward determining what’s going on. What do you see when you try to browse to your Nextcloud page?

I believe it’s using 7.1.


(Marc) #5

On NethServer, the latest update (Nextcloud 16) is using 7.2:

  • Nextcloud 16 - NethServer/dev#5753
  • Switch from PHP 7.1 to PHP 7.2

(Dan) #6

Ah, I thought nc16 was still in testing on neth (but then I’m always behind, on the subscription repos).


(Rolf Bakker) #7

the output of the commands are in my previous post.
“No succes” meant to express that nextcloud still is not working.
What I see was described in my first post. In Webtop it looks like:

Nextcloud is version 16 indeed:

root@helium:php.d> $ rpm -qa|grep -i next
nextcloud-16.0.0-1.el7.noarch
nethserver-nextcloud-1.5.0-1.ns7.noarch


(Rolf Bakker) #8

In /usr/share/nextcloud/config/config.php I see:

‘dbhost’ => ‘localhost:3306’,
‘dbport’ => ‘’,

Is that how it should be? I would think it should be

‘dbhost’ => ‘localhost’,
‘dbport’ => ‘3306’,

Or doesn’t that matter? Can someone check a working instance?
(just looking around for suspicious things…)


(Marc) #9

When accessing nextcloud url from a browser what do you get? A nextcloud error message, a blank page or anything else?


(Rolf Bakker) #10

It says:

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

The command to switch off maintenance mode was given earlier…


(Dan) #11

On my installation (which is 15.0.7, not 16.0), dbhost is localhost, and dbport is empty. I’m pretty sure you’re right that the port number shouldn’t be included in the host field.


(Rolf Bakker) #12

should a service be restarted after changing this?


(Dan) #13

That shouldn’t be necessary, though it wouldn’t hurt.


(Rolf Bakker) #14

I’ve tried both
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘3306’,

and (as per sample config in that dir)
‘dbhost’ => ‘localhost:3306’,
(so, no line with dbport)

and (as per your suggestion)
‘dbhost’ => ‘localhost’,
(so, no (line with) dbport)

db password is OK (checked via phpmyadmin)


(Dan) #15

Try it with

'dbhost' => 'localhost',
'dbport' => '',

(Rolf Bakker) #16

and what service to restart? httpd?


(Dan) #17

If you wanted to restart something, that would be it, but it shouldn’t be necessary.


(Rolf Bakker) #18

unfortunately, still the same: 503, service unavailable.
Should removing and reinstalling Nextcloud via the NS-admin-interface help?
(I only use nextcloud for file-syncing, no other apps)

BTW: I appreciate your help!


(Dan) #19

I doubt it. I think you’re going to need to do some digging in the log files–probably start with /var/lib/nethserver/nextcloud/nextcloud.log.


(Rolf Bakker) #20

nextcloud.log is empty. It is dated this morning (update was yesterday evening, so timestamp is weird?)
in nextcloud.log-20190510 (dated at the time of upgrade) I see as last lines:

:"\OC\Updater::maintenanceActive: Maintenance mode is kept active",“userAgent”:"–",“version”:“16.0.0.9”}
{“reqId”:“v2NmGxwIKuW7RGGOMYTn”,“level”:1,“time”:“2019-05-09T19:44:53+00:00”,“remoteAddr”:"",“user”:"–",“app”:“updater”,“method”:"",“url”:"–",“message”
:"\OC\Updater::resetLogLevel: Reset log level to Warning(2)",“userAgent”:"–",“version”:“16.0.0.9”}

So “Maintenance mode is kept active”. But after issuing the command to set maintenance mode off, it still seems active.
Is there a command to check what the current mode is?