Internal Server Error - but nothing in the logs

Evening all.

I’m using a combination of

with the instructions from

to show me how to set up the mysql server to set up my new nextcloud on a Pi4. I also used another page which showed me how to move the data from my old owncloud to the new nextcloud setup and import the data using:

sudo -u www-data php console.php files:scan --all

However, this did not run clean, giving an error on one of the users. I have run it again and got the same problem. The output is below.

My problem now is that I whenever I try to go to the login page I get the “Internal Server Error” message appear. It says to look at the server logs but they do not contain anything useful. Is there a non-standard log file I should be looking at?

I don’t know whether or not this is related to the failing scan or down to other config changes I’ve made, such as editing the php and apache files as per the instructions on the first URL above. I had only got as far as allowing httpaccess override, and had not yet looked at setting up SSL

Anyone got any ideas how I can find out what the problem is and fix it?

root@owncloud:/var/www/html/nextcloud# sudo -u www-data php console.php files:scan --all
Starting scan for user 1 out of 3 (admin)
Starting scan for user 2 out of 3 (gary)
Exception during scan: “files/a44321ade399bda15667daffef7c46bc” is locked
#0 /var/www/html/nextcloud/lib/private/Files/Storage/Common.php(715): OC\Lock\DBLockingProvider->acquireLock(‘files/a44321ade…’, 2)
#1 /var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php(593): OC\Files\Storage\Common->acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))
#2 /var/www/html/nextcloud/lib/private/Files/Cache/Scanner.php(331): OC\Files\Storage\Wrapper\Wrapper->acquireLock(‘scanner::’, 2, Object(OC\Lock\DBLockingProvider))
#3 /var/www/html/nextcloud/lib/private/Files/Utils/Scanner.php(245): OC\Files\Cache\Scanner->scan(’’, true, 3)
#4 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(145): OC\Files\Utils\Scanner->scan(’/gary’, true, NULL)
#5 /var/www/html/nextcloud/apps/files/lib/Command/Scan.php(201): OCA\Files\Command\Scan->scanFiles(‘gary’, ‘/gary’, Object(Symfony\Component\Console\Output\ConsoleOutput), false, true, false)
#6 /var/www/html/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/nextcloud/core/Command/Base.php(166): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(901): OC\Core\Command\Base->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(262): Symfony\Component\Console\Application->doRunCommand(Object(OCA\Files\Command\Scan), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 /var/www/html/nextcloud/3rdparty/symfony/console/Application.php(145): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 /var/www/html/nextcloud/console.php(97): OC\Console\Application->run()
#13 {main}
Starting scan for user 3 out of 3 (margaret)

I was unable to fix the problem, so I wiped the box - even removing apache2, mariadb etc. then started again.
This time, rather than using the version specified in the web page (16.0.3) I downloaded latest.tar.bz2.
The install went great and I now have a working nextcloud instance. However, When I try to restore the file contents as before I get the error below. How do I now restore the files to the database?

root@nextcloud:~# cd /var/www/nextcloud/
root@nextcloud:/var/www/nextcloud# sudo -u www-data php console.php files:scan --all
Nextcloud is not installed - only a limited number of commands are available

There are no commands defined in the “files” namespace.

PHP Warning: fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 85
{“reqId”:“tacvK4x56VhiaNG1dXh7”,“level”:3,“time”:“2019-11-11T11:16:15+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“fileperms(): stat failed for /var/www/nextcloud/data/nextcloud.log at /var/www/nextcloud/lib/private/Log/File.php#85”,“userAgent”:"–",“version”:""}
{“reqId”:“tacvK4x56VhiaNG1dXh7”,“level”:3,“time”:“2019-11-11T11:16:15+00:00”,“remoteAddr”:"",“user”:"–",“app”:“PHP”,“method”:"",“url”:"–",“message”:“You are using a fallback implementation of the intl extension. Installing the native one is highly recommended instead. at /var/www/nextcloud/3rdparty/patchwork/utf8/src/Patchwork/Utf8/Bootup/intl.php#18”,“userAgent”:"–",“version”:""}

Usually you have to use the “occ” command instead of “console.php” to do a file scan. Additionally you should install the php intl extension/module to get rid of the given message.

Hi J-ed

Thanks for this. I’ve installed the PHP modiule, and tried running the occ command. However, when I do, I get the error message below. I’ve tried Googling this but all the hits refer to installation issues. I currently have a running nextcloud setup.

Anyone got any ideas?

root@nextcloud:/var/www/nextcloud# sudo -u www-data php occ
Nextcloud is not installed - only a limited number of commands are available
Nextcloud 17.0.1

command [options] [arguments]

-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
–ansi Force ANSI output
–no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
–no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
check check dependencies of the server environment
help Displays help for a command
list Lists commands
status show some status information
app:check-code check code to be compliant
integrity:check-app Check integrity of an app using a signature.
integrity:check-core Check integrity of core code using a signature.
integrity:sign-app Signs an app using a private key.
integrity:sign-core Sign core using a private key.
l10n:createjs Create javascript translation files for a given app
maintenance:install install Nextcloud