Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud 13 - New Instalation 500 Internal Server Error #8406

Closed
arivar opened this issue Feb 16, 2018 · 5 comments
Closed

Nextcloud 13 - New Instalation 500 Internal Server Error #8406

arivar opened this issue Feb 16, 2018 · 5 comments

Comments

@arivar
Copy link

arivar commented Feb 16, 2018

Steps to reproduce

I've installed Nextcloud 13 with the following procedure:

apt-get install apache2 mariadb-server -y
systemctl start apache2
systemctl enable apache2
systemctl start mysql
systemctl enable mysql
apt-get install php7.1-xml php7.1 php7.1-cgi php7.1-cli php7.1-gd php7.1-curl php7.1-zip php7.1-mysql php7.1-mbstring wget unzip -y
mysql_secure_installation

created a database named "nextclouddb" and a user 'nextcloud'@'localhost'.
Downloaded and unpacked nextcloud 13 then:

chown -R www-data:www-data /var/www/html/nextcloud/

Installed Nextcloud:

sudo -u www-data php7.1 occ maintenance:install --database mysql --database-name nextclouddb --database-user nextcloud --admin-user admin

configured config.php and then:

sudo -u www-data php /var/www/html/nextcloud/occ maintenance:update:htaccess
sudo systemctl restart apache2

Expected behaviour

When I connect from my browser to http://127.0.0.1/nextcloud or http://localhost/nextcloud I should see the nextcloud start page.

Actual behaviour

Here is the error on the browser:

  • @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_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printExceptionErrorPage($ex); } catch (\OC\HintException $ex) { OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); try { OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); } catch (Exception $ex2) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); \OC::$server->getLogger()->logException($ex2, array('app' => 'index')); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } } catch (\OC\User\LoginException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage()); } catch (Exception $ex) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } catch (Error $ex) { try { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); } catch (Error $e) { $claimedProtocol = strtoupper($_SERVER['SERVER_PROTOCOL']); $validProtocols = [ 'HTTP/1.0', 'HTTP/1.1', 'HTTP/2', ]; $protocol = 'HTTP/1.1'; if(in_array($claimedProtocol, $validProtocols, true)) { $protocol = $claimedProtocol; } header($protocol . ' 500 Internal Server Error'); 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 $e; } OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); }

Server configuration

Here is my config.php:

<?php

$CONFIG = array (

'passwordsalt' => 'XXXXXXXXXXXXXX',

'secret' => 'XXXXXXXXXXXXXXXXXXXXX',

'trusted_domains' =>

array (

0 => 'localhost',

1 => '127.0.0.1',

),

'datadirectory' => '/var/www/html/nextcloud/data',

'overwrite.cli.url' => 'http://127.0.0.1/',

'dbtype' => 'mysql',

'version' => '13.0.0.14',

'dbname' => 'nextclouddb',

'dbhost' => '127.0.0.1',

'dbport' => '',

'dbtableprefix' => 'oc_',

'dbuser' => 'nextcloud',

'dbpassword' => 'password',

'installed' => true,

'instanceid' => 'XXXXXXXXX',

);

Operating system:

Ubuntu 16.04

Web server:
Apache 2

Database:

MariaDB

PHP version:

7.1

Nextcloud version: (see Nextcloud admin page)

13

Updated from an older Nextcloud/ownCloud or fresh install:

Fresh

@stratege1401
Copy link

stratege1401 commented Feb 17, 2018

For me, it is a dependency broken or absent.

do you have php-mbstring package installed ?? This one is mandadory for some php output with apache 2.4.x

I am using debian 9.3 witch is very similar to Ubuntu.
My install process use différents steps: ( starting from a minimalist install, only minimal package and openssl ) ... i will give you my all process, witch might be different from your ... because it is not only a nextcloud server ...
trying to cut throught the lvm and mdadm ... but all the other command are supposed to install:

  • apache
  • php
  • mysql mariadb
  • phpmyadmim
  • smartools
  • munin
  • some little tools i use ...
  • and some dependency for other soft i use

( ran in multiples errors when not respecting those steps )

apt-get install apache2 php php-pear curl php-gd net-tools vim nano ccze libgd-tools gpm php-cgi php-json php-zip zip unzip libnghttp2-dev apache2-suexec-custom debian-keyring gcc binutils patch libgd-dev gcc-6-locales gcc-multilib make autoconf automake libtool flex bison

apt-get install mariadb-server

apt-get install phpmyadmin php-mbstring php-gettext php7.0-fpm

apt-get install munin munin-node munin-plugins-extra smartmontools mon libdbd-csv-perl liblog-dispatch-filerotate-perl libxml-dom-perl libmojolicious-perl libdbi-test-perl libjson-perl libxml-sax-perl libcrypt-des-perl lm-sensors libapache2-mod-fcgid ethtool libdbd-pg-perl read-edid i2c-tools mon-contrib liblwp-useragent-determined-perl libnet-irc-perl libxml-simple-perl

apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python

after all configuration and specific setup i used the setup-nextcloud.php for web install ... but using the apt-get shouldn't be so different in the process

@mcat-ee
Copy link

mcat-ee commented Feb 18, 2018

I'm also receiving a 500 error and my installation was left in maintenance mode after the upgrade.

Manually deactivating maintenance mode (via the CLI) still results in 500 HTTP status codes.

@stratege1401
Copy link

I'm also receiving a 500 error and my installation was left in maintenance mode after the upgrade.
Manually deactivating maintenance mode (via the CLI) still results in 500 HTTP status codes.

You want help, at least fill up the information form for your system !!!
what linux, what php, what db ....

My christal ball has no more battery

@mcat-ee
Copy link

mcat-ee commented Feb 20, 2018

Steps to reproduce
Update via the web installer.

The update appeared to complete successfully, but the page redirected to a 500 status error and remained in maintenance mode.

Server configuration

<?php
$CONFIG = array (
  'passwordsalt' => '######',
  'secret' => '************',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '*********',
  ),
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => 'http://localhost',
  'dbtype' => 'mysql',
  'version' => '12.0.4.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  0 => '************',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '**********',
  'dbpassword' => '********',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'instanceid' => 'ociyv3cyh8ul',
  'updater.release.channel' => 'stable',
  'updater.secret' => '***************',
  'maintenance' => true,
  'theme' => '',
);

Operating system:
Centos 6.9

Web server:
Nginx

Database:
MySQL

PHP version:
7.1

Nextcloud version: (see Nextcloud admin page)
13

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 12

@tflidd
Copy link
Contributor

tflidd commented Mar 31, 2018

Error 500 is an internal server error, you need to check your server logfiles for more information about this error. It does not make sense that everybody with this error puts a post here, the reason for this error can be very different (missing php modules, file permission settings, crashed php-process, bugs in nextcloud code, ...).

If the php-code is shown in the browser, the php-module is not installed properly.

I don't want to go into more details. For install and support questions, please take a look into our forum help.nextcloud.com. This bug tracker should be used for specific problems related to the code. If you are not sure, the forum is always a good starting point....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants