Bug 27784 - Nextcloud 21 unable to be installed with Mariadb
Summary: Nextcloud 21 unable to be installed with Mariadb
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Nicolas Lécureuil
QA Contact:
URL:
Whiteboard:
Keywords: IN_RELEASENOTES8
: 27989 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-08 20:13 CET by Brian Rockwell
Modified: 2021-02-26 23:15 CET (History)
4 users (show)

See Also:
Source RPM: nextcloud-21.0.0-0.20201206.1.dev.gite41e2fe.mga8.src.rpm
CVE:
Status comment: Introduce NC21 in backports when ready


Attachments
journal - fresh mga8 install with DB server option, installed nextcloud (396.49 KB, text/plain)
2020-12-08 20:15 CET, Brian Rockwell
Details

Description Brian Rockwell 2020-12-08 20:13:59 CET
Description of problem:  Nextcloud fails during initial configuration when using mariadb


Version-Release number of selected component (if applicable): 21


How reproducible:  set up Mariadb, install Nextcloud


Steps to Reproduce:
1. run mariadb hardening
2. go to nextcloud screen 127.0.0.1/nextcloud
3. configure user, use root for database user and enter your new password

System will churn for awhile and then return the message:

The server was unable to complete your request.

It may also come back with another message

----

was able to install with postgresql without issue.  Mariadb seems to have an issue in this case.  I'll attach journal.
Comment 1 Brian Rockwell 2020-12-08 20:15:26 CET
Created attachment 12064 [details]
journal - fresh mga8 install with DB server option, installed nextcloud

Please note I choose the DB server option, but this fails when I install Mariadb separately and then nextcloud.
Morgan Leijström 2020-12-08 22:08:03 CET

CC: (none) => fri, joequant

Comment 2 Aurelien Oudelet 2020-12-09 17:52:23 CET
Hum,
Under Cauldron:

$ urpmq -i nextcloud

Name        : nextcloud
Version     : 20.0.1
Release     : 2.mga8
Group       : Networking/WWW
Size        : 332180071                    Architecture: noarch
Source RPM  : nextcloud-20.0.1-2.mga8.src.rpm
URL         : http://nextcloud.com
Summary     : Open personal cloud
Description :
A personal cloud server which runs on you personal server
and enables accessing your data from everywhere and sharing
with other people.

Name        : nextcloud
Version     : 21.0.0
Release     : 0.20201206.1.dev.gite41e2fe.mga8
Group       : Networking/WWW
Size        : 241053462                    Architecture: noarch
Source RPM  : nextcloud-21.0.0-0.20201206.1.dev.gite41e2fe.mga8.src.rpm
URL         : http://nextcloud.com
Summary     : Open personal cloud
Description :
A personal cloud server which runs on you personal server
and enables accessing your data from everywhere and sharing
with other people.

2 packages, same name, different version.
One should be renamed.

Meanwhile, assigning to maintainers, added commiters.

Keywords: (none) => 8beta2
Status comment: (none) => Cauldron installed from Beta2 iso.
Source RPM: mageia-8-beta2-x86_64 and mageia-8-beta2-i586 => nextcloud-21.0.0-0.20201206.1.dev.gite41e2fe.mga8.src.rpm
Assignee: bugsquad => mageia

Comment 3 Joseph Wang 2020-12-10 05:34:44 CET
The problem with cauldron should be an operational issue, since the repo looks like that there is only one version.

Also nextcloud is a bit of a mess since version 20 does not work with php8, and I' using a nighty build that barely works and is missing standard apps.  The plan is to hope that nextcloud 21 stabilizes before release.  They are scheduled to release 21 in February.

If it's still a mess near release, then we can pull nextcloud21 and release in mageia 8.1

Will send the issue upstream.
Comment 4 Joseph Wang 2020-12-10 05:50:32 CET
Reported upstream at 

https://github.com/nextcloud/server/issues/24627

Would appreciate it if the OP could fill out the bug report upstream with more diagnostic information
Comment 5 christian barranco 2020-12-30 15:40:27 CET
I just tested NC21 beta3 with Mageia8 beta2, using PostgreSQL instead of MariaDB and, it works!
Instead of pulling NC21 from Mageia 8.0, would it be a better option to propose it with PostgreSQL instead?

CC: (none) => chb0

Comment 6 Morgan Leijström 2020-12-30 16:12:38 CET
There has to be an upgrade path from Mageia 7 with Nextcloud using MariaDB.
Comment 7 Morgan Leijström 2020-12-31 02:42:16 CET
*** Bug 27989 has been marked as a duplicate of this bug. ***
Comment 8 Morgan Leijström 2020-12-31 03:01:24 CET
For starters, we can package Nextcloud 20 for Mageia 7.

MariaDB is the proposed database for Nextcloud so most users use MariaDB.

If NC20 is problematic on Mageia 8, pull Nextcloud from Mageia 8 and introduce in backports later...

Users can stay on Mageia 7 until Nextcloud 21 stabilises.


It usually takes a couple point releases to stabilise...  Depending on taste.  Where I hire a shared hosting they stopped and still hold upgrading more users to version *20*.  Too much customers complaining i suppose - i was one of them, myriads of errors in log, lost deleted files, ...
Comment 9 Brian Rockwell 2020-12-31 03:59:27 CET
Seems like NC 21 is still a beta product.  At this point it would make sense to fall back to NC 20, which I had tested before in MGA8.  Their latest is NC 20.0.3 I believe.
Comment 10 christian barranco 2020-12-31 09:32:14 CET
(In reply to Brian Rockwell from comment #9)
> Seems like NC 21 is still a beta product.  At this point it would make sense
> to fall back to NC 20, which I had tested before in MGA8.  Their latest is
> NC 20.0.3 I believe.

I have tested the latest stable NC20 (20.0.4) with MGA7 and it works fine (MariaDB and PostgreSQL). I have tested it with NGINX and PHP-FPM provided in MGA7.

I have tested it with MGA8 beta2 and it doesn't work. First thing is there is a PHP-checkversion test done by NC informing PHP 8 is not supported and terminating the installation wizard.
Then, I removed the PHP-checkversion test and I was able to reach the installation wizard. However, I got stuck on a blank page after clicking on the button to complete the installation. This test was done using MariaDB.
I haven't tried with PostgreSQL. Despite PostgreSQL is officially supported by NC and is, performance wise, as good as MariaDB, I would not spend time to do this test if your personal preference is strong on MariaDB. If you want me to try it out, just let me know though.

Let me know whether there is anything I can help you with.

Happy New Year :)
Comment 11 Joseph Wang 2021-01-03 04:37:47 CET
I would have preferred to fall back to NC20, but NC20 is not supported for PHP8.

I think the best thing you can do is to work with the nextcloud developers and get something working on Mageia.  Nextcloud is a bit of a mess because NC20 doesn't work with PHP8 and NC21 is not working yet.

Right now what I've done is to package an install script with the mageia RPM.  If you can get the install script working or have a set up instructions that will get NC21 working, I'll put that into the install script.
Comment 12 christian barranco 2021-01-03 08:51:19 CET
There is now a NC21 beta4 just released. I will give it a try and will keep you posted.
Comment 13 Morgan Leijström 2021-01-03 12:16:34 CET
Helping to get NC21 in shape for mga8 is good.

NC20 will not be able to run on mga8.

NC20 will be needed on mga7 as an upgrade step, so why not push NC20.0.4 on mga7 now, and we will be up to date?
Comment 14 christian barranco 2021-01-03 22:19:39 CET
No luck with NC21 beta4. I am using an NGINX server but I don't think using Apache would change the outcome as it seems to be an issue between MariaDB and PHP8.

I have been able to reach the installation wizard page at localhost/nextcloud
and I still get the same error, reported at the top of this same page :
"Error while trying to initialise the database: There is no active transaction"
Comment 15 Brian Rockwell 2021-01-04 22:11:34 CET
Any chance you could drop that version out on the MGA8 repo?  The one out there now is totally broken, will not install successfully.
Comment 16 Nicolas Lécureuil 2021-01-04 22:22:23 CET
what about removing it and reintroduce when tested by QA during mageia 8 lifetime ?
Comment 17 Joseph Wang 2021-01-05 07:23:44 CET
No objection from me.  I'll keep working on NC21 and if it gets into something approaching usable we can add it either near release or afterwards.

We need to make a note in the release notes as to why NC isn't in Mageia 8.

Do you want me to do the obsolete or can someone else do it.
Comment 18 christian barranco 2021-01-05 07:38:51 CET
To me, we have 2 options :
1. No NC package in MGA8 at launch, as PHP 8 is in the depot. Users might install a NC21 RC (at least) on their own, using PostgreSQL if MariaDB is still an issue. NC manual proposes a procedure to convert MariaDB database to a PostgreSQL one, if required. NC21 is then released in MGA8 depot when ready (most probably in March to allow time to get a more stable version). 
2. PHP 7.4 is released with MGA8 and NC20.0.4 can also be proposed as a package as today. 

I can propose a wiki page for 1., at least for a Nginx server.
In any case, moving from MGA7 to MGA8, using a depot upgrade without any command line work done by the user might be quite tricky and risky to migrate a NC server, even only for a personal use.
Comment 19 Brian Rockwell 2021-01-05 14:25:46 CET
Probably a good idea to remove it and explain it is currently not functional.  

If you use the install of NC21 from the current 1214 repo for Postgres on a fully updated MGA8 machine it does not work either.

https://bugs.mageia.org/show_bug.cgi?id=27871
Comment 20 christian barranco 2021-01-05 15:28:30 CET
(In reply to Brian Rockwell from comment #19)
> If you use the install of NC21 from the current 1214 repo for Postgres on a
> fully updated MGA8 machine it does not work either.
> 
FYI
After reporting https://bugs.mageia.org/show_bug.cgi?id=27989 
I tried to install NC21beta3 (from nextcloud pre-release page) with a fully updated MGA8beta running Nginx and PHP-FPM packages, using PostgreSQL instead of MariaDB and it DOES work.
Comment 21 Brian Rockwell 2021-01-05 15:49:10 CET
try it with Apache instead of Nginx.  Apache is pulled in by default if a user picks Nextcloud.
Comment 22 christian barranco 2021-01-05 16:19:36 CET
(In reply to Brian Rockwell from comment #21)
> try it with Apache instead of Nginx.  Apache is pulled in by default if a
> user picks Nextcloud.

Indeed and it is why in the option 1 I proposed (#18), I chose Nginx.
Up to you now to decide.
Comment 23 Brian Rockwell 2021-01-05 16:27:56 CET
Well, I would say if we prefer Nginx over Apache than the default bundle pulled in by choosing Nextcloud should be Nginx and the appropriate packags.

I just know as a plain user, I use the defaults with an assumption that by choosing them it will just work. I have no major attachment to Apache or Nginx.  I've used both and they both work, though in my professional role I see Apache mostly.

Do I care which one?  No.

Do I care that the defaults work?  Yes.
Comment 24 christian barranco 2021-01-08 18:42:57 CET
Hi,
just tried with newly released beta5 of NC21.
No luck; still doesn't work with MariaDB, PHP8 and Nginx.
Comment 25 christian barranco 2021-01-09 10:10:23 CET
I reported the issue on NC forum yesterday.
It looks like it is a bug generated by a PHP8 feature improvement. 
Fix is coming. Not sure yet though it will land on beta6.
Brian Rockwell 2021-01-09 15:50:30 CET

Priority: Normal => release_blocker

Comment 26 Morgan Leijström 2021-01-09 17:28:17 CET
I strongly suggest to remove Nextcloud from Mageia 8 release media.

Version 20 cant run on Mageia 8, 21 cant use MariaDB - and even if it could, it would be too early for general use for months yet - first "stable" releases tend to have lots of quirks...

If at all, we can have Nextcloud 21 - even early versions - in *backport* (even at release time) where we use to have Nextcloud updates anyway, and users can opt to use it with PostgreSQL if they like.

I think i have written before i would like Nextcloud to *never* be in release, for various compatibility issues users may have.

---

Separately, we can discuss if we at all should have a package for Nextcloud, or a wiki page with good description and maybe an annotated script presented there.
Comment 27 Morgan Leijström 2021-01-09 20:20:50 CET
Update for Mageia 7:
Bug 28049 - Backport update Nextcloud to 20.0.latest

Wiki page open for contributions...
https://wiki.mageia.org/en/Nextcloud

User experience of maintaining self installed, and fedora packaged
https://ml.mageia.org/l/arc/dev/2021-01/msg00170.html
Comment 28 christian barranco 2021-01-10 15:30:16 CET
Hi
FYI, as an alternative to the official package, I have planned to write a detailed wiki on Nextcloud installation from Nextcloud web site, with Nginx, php-fpm, PostgreSQL & MariaDB, as soon as Mageia 8 will be released and my server will be migrated to MGA8
Actually, the wiki is almost ready based my tests of MGA8 beta2 in a VM. 
It should be then officially released with 1 or 2 weeks after MGA8 is released. 
If you think I should have this wiki released at the same time MGA8 is released, just let me know.
Comment 29 Morgan Leijström 2021-01-10 15:36:03 CET
Great!

You know you can have it under your user name in mageia wiki, so it is not "official" and give a link to it so other can have a look?
( Example: my work in progress https://wiki.mageia.org/en/User:Morgano/Persistent_live_systems )

And when ready you can copy the content to a new page with final name (URL).

Please put link to it at https://wiki.mageia.org/en/Nextcloud   :)
Comment 30 christian barranco 2021-01-10 15:46:57 CET
I have not spent enough time yet on wiki setup but I will now. 
So far, I have a libreoffice file. Will keep you posted through [doc-discuss]
Link to NC forum discussion : 
https://help.nextcloud.com/t/nc21-beta-and-php8/103682/2
Comment 31 christian barranco 2021-01-14 14:09:28 CET
Hi
Great news : today was released NC21 beta6. I just tested it with MGA8 (RC stage I think as I have kept my Beta up to date) and the installation wizard step was successfully passed!
Comment 32 christian barranco 2021-01-14 14:15:00 CET
Test done, of course, with MariaDB
Comment 33 Nicolas Lécureuil 2021-01-14 15:18:27 CET
Please test in cauldron, I just uploaded the version 21.0.0 beta6
Comment 34 christian barranco 2021-01-16 21:29:34 CET
Hi
I am trying to test this package but I lack information on what to do next.
I mean, I know what to do if I was doing a manual install from scratch. But I was hoping this package would be enough to complete the installation in GUI for any kind of user.
Apparently, what it does instead:
*Install a LAMP
*Download PHP module for Nextcloud
*Download Nextcloud but it puts a small in /etc/nextcloud (what for?) and most of the Nextcloud files in /usr/share/nextcloud
*Then, it initiates folder in /var/lib/nextcloud, to store the data, I assume.

And then, what's next? Please, guide me as I have not found anything to help on the wiki nor during the installation. Or what have I missed?
Comment 35 christian barranco 2021-01-16 22:02:40 CET
ok. I think I understand better now.

What I just did:
 #systemctl restart mysqld.service
 #mysql_secure_installation
 #mysql -uroot -p

 The MariaDB database is then created

The vHost for Nextcloud is already define by your rpm as /etc/httpd/conf/webapps.d/nextcloud.conf 

 #systemctl restart httpd.service

If I go to http://localhost , I get :
 It works!

Then, I got to http://localhost/nextcloud and I get an error from NC:
Composer autoloader not found, unable to continue. Check the folder "3rdparty". Running "git submodule update --init" will initialize the git submodule that handles the subfolder "3rdparty".

It is either a path issue or an issue in apache nextcloud.conf

I will keep looking at that
Comment 36 christian barranco 2021-01-16 22:22:40 CET
ok. I got it to work.

/usr/share/nextcloud/3rdparty was empty. I populated it with the content coming from the beta6 on nextcloud.com

php-xmreader module is missing. I installed with MCC

With these 2 fixes, the nextcloud installation wizard step is passed.

Enjoy! :)
Comment 37 christian barranco 2021-01-16 22:28:04 CET
(In reply to christian barranco from comment #36)
> ok. I got it to work.
> 
> /usr/share/nextcloud/3rdparty was empty. I populated it with the content
> coming from the beta6 on nextcloud.com
> 
> php-xmreader module is missing. I installed with MCC
> 
> With these 2 fixes, the nextcloud installation wizard step is passed.
> 
> Enjoy! :)

As tarball to complete the 3rdparty missing part, I used https://download.nextcloud.com/server/prereleases/nextcloud-21.0.0beta6.zip
Comment 38 christian barranco 2021-01-16 22:29:04 CET
(In reply to christian barranco from comment #37)
> (In reply to christian barranco from comment #36)
> > ok. I got it to work.
> > 
> > /usr/share/nextcloud/3rdparty was empty. I populated it with the content
> > coming from the beta6 on nextcloud.com
> > 
> > php-xmreader module is missing. I installed with MCC
> > 
> > With these 2 fixes, the nextcloud installation wizard step is passed.
> > 
> > Enjoy! :)
> 
> As tarball to complete the 3rdparty missing part, I used
> https://download.nextcloud.com/server/prereleases/nextcloud-21.0.0beta6.zip

Sorry,... spelling mistake. Missing module is php-xmlreader
Comment 39 Brian Rockwell 2021-01-16 22:54:11 CET
I was able to get it to work as well after extracting and copying the 3rdparty folder data into /usr/share/nextcloud/3rdparty.

Will you be fixing the Mageia package to include that content?
Comment 40 christian barranco 2021-01-16 23:22:12 CET
Nicolas is aware and fixing it
Comment 41 Morgan Leijström 2021-01-22 09:34:13 CET
I see Nextcloud 20.0.4 is sitting in mga7 backports testing.
Is it OK and can be moved to backports?
I find no separate bug for it...?
Comment 42 Nicolas Lécureuil 2021-01-22 09:48:22 CET
https://bugs.mageia.org/show_bug.cgi?id=28049
Comment 43 Morgan Leijström 2021-01-22 09:58:45 CET
Doh!  My own bug... I forgot to include backport in search.  Thanks :)
Comment 44 Dave Hodgins 2021-01-28 21:53:59 CET
I was under the impression nextcloud was being dropped from Mageia 8, due
to the problems it generates with updates and maitenance. How can this be a
blocker?

CC: (none) => davidwhodgins

Comment 45 Dave Hodgins 2021-01-28 22:00:24 CET
Nextcloud is not on any iso images, and if the package is kept, can be
fixed post release. Dropping the priority.

Priority: release_blocker => Normal

Comment 46 Nicolas Lécureuil 2021-01-28 22:07:29 CET
yes we decided to drop it and make sure we have a wiki page explaining how to download, install.
Comment 47 Nicolas Lécureuil 2021-01-28 22:10:02 CET
this is now removed from core.

I will add back on backports as soon as we release mageia 8.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 48 Morgan Leijström 2021-01-29 00:03:10 CET
Great :)

Updated:
https://wiki.mageia.org/en/Nextcloud#Current_state
https://wiki.mageia.org/en/Mageia_8_Release_Notes#Nextcloud

Status comment: Cauldron installed from Beta2 iso. => Introduce NC21 in backports when ready
Keywords: 8beta2 => IN_RELEASENOTES8

Comment 49 christian barranco 2021-02-26 18:05:38 CET
Hi

NC21 is officially released but doesn't support PHP8 yet. 
Actually, I am struggling to get it to work with PHP8.0.2 and NGINX on MGA8.
It works though on MGA7 and PHP7.3

I don't see nextcloud anymore in MGA8 repo. Is there a way to push it to test it with the standart MGA installation?

Thanks
Comment 50 Nicolas Lécureuil 2021-02-26 18:43:05 CET
i plan to push it in backport_testing tomorow.
Comment 51 Nicolas Lécureuil 2021-02-26 23:15:33 CET
i will open a new bugreport later but 21.0.0 just pushed on backports_testing.

Note You need to log in before you can comment on or make changes to this bug.