Fresh nextcloud install failed

Having issues with your DietPi installation, or, found a bug? Post it here.
User avatar
snoodler
Posts: 24
Joined: Sun Dec 01, 2019 1:30 pm

Fresh nextcloud install failed

Post by snoodler »

Was having some owner permissions with nextcloud so I decided to re install it with dietpi-software but now it is broken:

this is the error when i try to go to 192.168.2.4/nextcloud

* @author Joas Schilling * @author Jörn Friedrich Dreyer * @author Lukas Reschke * @author Morris Jobke * @author Robin Appelman * @author Sergio Bertolín * @author Thomas Müller * @author Vincent Petry * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ require_once __DIR__ . '/lib/versioncheck.php'; try { require_once __DIR__ . '/lib/base.php'; OC::handleRequest(); } catch(\OC\ServiceUnavailableException $ex) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); //show the user a detailed error page OC_Template::printExceptionErrorPage($ex, 503); } catch (\OC\HintException $ex) { try { OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), 503); } catch (Exception $ex2) { try { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); \OC::$server->getLogger()->logException($ex2, array('app' => 'index')); } catch (Throwable $e) { // no way to log it properly - but to avoid a white page of death we try harder and ignore this one here } //show the user a detailed error page OC_Template::printExceptionErrorPage($ex, 500); } } catch (\OC\User\LoginException $ex) { OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage(), 403); } catch (Exception $ex) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); //show the user a detailed error page OC_Template::printExceptionErrorPage($ex, 500); } catch (Error $ex) { try { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); } catch (Error $e) { http_response_code(500); header('Content-Type: text/plain; charset=utf-8'); print("Internal Server Error\n\n"); print("The server encountered an internal error and was unable to complete your request.\n"); print("Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.\n"); print("More details can be found in the webserver log.\n"); throw $ex; } OC_Template::printExceptionErrorPage($ex, 500); }
Last edited by snoodler on Wed Jan 22, 2020 9:08 pm, edited 1 time in total.
User avatar
MichaIng
Site Admin
Posts: 2294
Joined: Sat Nov 18, 2017 6:21 pm

Re: Fresh nextcloud instll failed

Post by MichaIng »

@snoodler
Many thanks for your report.

This is not an error you see but the raw PHP file which is not parsed obviously. Hence the PHP handler is down. You use Lighttpd as webserver, I guess?

Please run the following and paste output:

Code: Select all

journalctl -u php7.3-fpm
systemctl restart php7.3-fpm
cat /var/log/php7.3-fpm.log*
User avatar
snoodler
Posts: 24
Joined: Sun Dec 01, 2019 1:30 pm

Re: Fresh nextcloud instll failed

Post by snoodler »

root@DietPi:~# journalctl -u php7.3-fpm
-- Logs begin at Wed 2020-01-22 14:28:15 GMT, end at Wed 2020-01-22 18:28:29 GMT. --
Jan 22 14:28:40 DietPi systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
Jan 22 14:28:41 DietPi systemd[1]: Started The PHP 7.3 FastCGI Process Manager.
root@DietPi:~# systemctl restart php7.3-fpm
root@DietPi:~# cat /var/log/php7.3-fpm.log*
[22-Jan-2020 18:29:20] NOTICE: Terminating ...
[22-Jan-2020 18:29:20] NOTICE: exiting, bye-bye!
[22-Jan-2020 18:29:20] NOTICE: fpm is running, pid 25893
[22-Jan-2020 18:29:20] NOTICE: ready to handle connections
[22-Jan-2020 18:29:20] NOTICE: systemd monitor interval set to 10000ms
User avatar
MichaIng
Site Admin
Posts: 2294
Joined: Sat Nov 18, 2017 6:21 pm

Re: Fresh nextcloud instll failed

Post by MichaIng »

Interesting, PHP seems to run as expected. To verify again:

Code: Select all

systemctl status php7.3-fpm
In this case probably Lighttpd is not correctly configured to use php7.3-fpm, please paste the output of:

Code: Select all

cat /etc/lighttpd/conf-available/15-fastcgi-php.conf
User avatar
snoodler
Posts: 24
Joined: Sun Dec 01, 2019 1:30 pm

Re: Fresh nextcloud instll failed

Post by snoodler »

this is what i have for webservers:

https://imgur.com/a/qnyg2wQ

root@DietPi:~# cat /etc/lighttpd/conf-available/15-fastcgi-php.conf
cat: /etc/lighttpd/conf-available/15-fastcgi-php.conf: No such file or directory
root@DietPi:~#
User avatar
MichaIng
Site Admin
Posts: 2294
Joined: Sat Nov 18, 2017 6:21 pm

Re: Fresh nextcloud install failed

Post by MichaIng »

@snoodler
Ah okay, Apache2. Did you install+configure php7.3-fpm manually? Since on default install Apache2 uses its default internal PHP handler (mod-php), hence php7.3-fpm is not required.

So you could clean up things and assure the Apache2 PHP module being active:

Code: Select all

apt install libapache2-mod-php7.3
apt purge php7.3-fpm
a2enmod mpm_prefork php7.3
systemctl restart apache2
User avatar
snoodler
Posts: 24
Joined: Sun Dec 01, 2019 1:30 pm

Re: Fresh nextcloud install failed

Post by snoodler »

Did not get fixed.

I did install apache with dietpi-software

here is what I did:

root@DietPi:~# sudo apt install libapache2-mod-php7.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
libapache2-mod-php7.3 is already the newest version (7.3.11-1~deb10u1).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
root@DietPi:~# sudo apt purge php7.3-fpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
php7.3-fpm*
0 upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
After this operation, 3,458 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 86014 files and directories currently installed.)
Removing php7.3-fpm (7.3.11-1~deb10u1) ...
apache2_invoke php7.3-fpm prerm: No action required
(Reading database ... 85999 files and directories currently installed.)
Purging configuration files for php7.3-fpm (7.3.11-1~deb10u1) ...
apache2_invoke php7.3-fpm postrm: No action required
dpkg: warning: while removing php7.3-fpm, directory '/etc/php/7.3/fpm/conf.d' not empty so not removed
Processing triggers for systemd (241-7~deb10u2+rpi1) ...
root@DietPi:~# sudo a2enmod mpm_prefork php7.3
Considering conflict mpm_event for mpm_prefork:
ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
Considering conflict mpm_worker for mpm_prefork:
ERROR: Module php7.3 does not exist!
root@DietPi:~# systemctl restart apache2
root@DietPi:~#
User avatar
WarHawk
Posts: 610
Joined: Thu Jul 20, 2017 8:55 am

Re: Fresh nextcloud install failed

Post by WarHawk »

Googled "Considering conflict mpm_worker for mpm_prefork:"

Found this:
https://stackoverflow.com/questions/462 ... -to-worker
https://serverfault.com/questions/68227 ... untu-14-04

It seems it needs one module or another to be enabled or disabled...the links show you how to do that

This shows to install the PHP 7.3 there are other things that need to be installed
https://askubuntu.com/questions/1148129 ... in-apache2
User avatar
MichaIng
Site Admin
Posts: 2294
Joined: Sat Nov 18, 2017 6:21 pm

Re: Fresh nextcloud install failed

Post by MichaIng »

It seems like there has been an attempt to enable mpm_event with php-fpm.

Do the following:

Code: Select all

a2dismod mpm_event
# If it prints an error that other modules depend on mpm_event, disable them the same way first
a2enmod mpm_prefork
a2enmod php7.3
# If it still shows php7.3 module missing, try to reinstall the module
apt install --reinstall libapache2-mod-php7.3
a2enmod php7.3
systemctl restart apache2
User avatar
snoodler
Posts: 24
Joined: Sun Dec 01, 2019 1:30 pm

Re: Fresh nextcloud install failed

Post by snoodler »

got an error back while installing:

root@DietPi:~# a2dismod mpm_event
Module mpm_event disabled.
To activate the new configuration, you need to run:
systemctl restart apache2
root@DietPi:~# a2enmod mpm_prefork
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Enabling module mpm_prefork.
To activate the new configuration, you need to run:
systemctl restart apache2
root@DietPi:~# a2enmod php7.3
ERROR: Module php7.3 does not exist!
root@DietPi:~# apt install --reinstall libapache2-mod-php7.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 13 not upgraded.
Need to get 1,082 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ftp.agdsn.de/pub/mirrors/raspbian/raspbian buster/main armhf libapache2-mod-php7.3 armhf 7.3.11-1~deb10u1 [1,082 kB]
Fetched 1,082 kB in 13s (81.1 kB/s)
(Reading database ... 85991 files and directories currently installed.)
Preparing to unpack .../libapache2-mod-php7.3_7.3.11-1~deb10u1_armhf.deb ...
Unpacking libapache2-mod-php7.3 (7.3.11-1~deb10u1) over (7.3.11-1~deb10u1) ...
Setting up libapache2-mod-php7.3 (7.3.11-1~deb10u1) ...
dpkg: error processing package libapache2-mod-php7.3 (--configure):
installed libapache2-mod-php7.3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
libapache2-mod-php7.3
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DietPi:~# a2enmod php7.3
ERROR: Module php7.3 does not exist!
root@DietPi:~#
Post Reply