Internal Server Error with no log traces on Rocky 8

Hi All,

Installed latest NC from tarball on Rocky 8, fully updated, using php-7.4

I get the “Internal Server Error” page, and nothing is recorded on any log file related to the error.

On page refresh, the logs show the following:

tail -f /var/log/audit/audit.log /var/log/httpd/* /var/log/php-fpm/* /var/log/my-phpfpm.*


==> /var/log/my-phpfpm.pp <==
��|���|�SE Linux Module my-phpfpm1.0@filesetattobject_r@@@@	@var_log_t@httpd_t@@@@@@@@@@@@@@@@@@@@@@@@@@filobject_r	var_log_thttpd_t
==> /var/log/my-phpfpm.te <==
module my-phpfpm 1.0;

require {
	type httpd_t;
	type var_log_t;
	class file setattr;
}

#============= httpd_t ==============
allow httpd_t var_log_t:file setattr;




==> /var/log/audit/audit.log <==
type=SERVICE_START msg=audit(1664551208.844:1682): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=timedatex comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'UID="root" AUID="unset"

==> /var/log/php-fpm/www-error.log <==
[30-Sep-2022 15:20:09 UTC] PHP Warning:  Use of undefined constant PASSWORD_ARGON2_DEFAULT_THREADS - assumed 'PASSWORD_ARGON2_DEFAULT_THREADS' (this will throw an Error in a future version of PHP) in /mnt/services/www/html/nextcloud/config/config.php on line 1763
[30-Sep-2022 15:20:09 UTC] PHP Warning:  Use of undefined constant PASSWORD_ARGON2_DEFAULT_MEMORY_COST - assumed 'PASSWORD_ARGON2_DEFAULT_MEMORY_COST' (this will throw an Error in a future version of PHP) in /mnt/services/www/html/nextcloud/config/config.php on line 1770
[30-Sep-2022 15:20:09 UTC] PHP Warning:  Use of undefined constant PASSWORD_ARGON2_DEFAULT_TIME_COST - assumed 'PASSWORD_ARGON2_DEFAULT_TIME_COST' (this will throw an Error in a future version of PHP) in /mnt/services/www/html/nextcloud/config/config.php on line 1777

==> /var/log/httpd/ssl_access_log <==
10.46.236.46 - - [30/Sep/2022:18:20:09 +0300] "GET /nextcloud/ HTTP/1.1" 500 2476

==> /var/log/httpd/ssl_request_log <==
[30/Sep/2022:18:20:09 +0300] 10.46.236.46 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nextcloud/ HTTP/1.1" 2476

==> /var/log/httpd/ssl_access_log <==
10.46.236.46 - - [30/Sep/2022:18:20:09 +0300] "GET /nextcloud/core/css/guest.css?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 200 21612

==> /var/log/httpd/ssl_request_log <==
[30/Sep/2022:18:20:09 +0300] 10.46.236.46 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nextcloud/core/css/guest.css?v=ba222ded25d957b900c03bef914333cd HTTP/1.1" 21612

==> /var/log/httpd/ssl_access_log <==
10.46.236.46 - - [30/Sep/2022:18:20:09 +0300] "GET /nextcloud/core/img/favicon.ico HTTP/1.1" 200 3262

==> /var/log/httpd/ssl_request_log <==
[30/Sep/2022:18:20:09 +0300] 10.46.236.46 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nextcloud/core/img/favicon.ico HTTP/1.1" 3262

I have grepped for the Request ID in all the system grep -R and nothing was returned.

No /var/log/nextcloud.log is created.

My config file is this:

https://paste.debian.net/1255558/

I have:

Rocky Linux release 8.6 (Green Obsidian)
4.18.0-372.26.1.el8_6.x86_64
[root@tweety nextcloud]# rpm -qa|grep php
php-pecl-msgpack-2.1.2-1.el8.remi.7.4.x86_64
php-pecl-memcached-3.2.0-1.el8.remi.7.4.x86_64
php-pecl-zip-1.21.1-1.el8.remi.7.4.x86_64
php-json-7.4.32-1.el8.remi.x86_64
php-cli-7.4.32-1.el8.remi.x86_64
gd3php-2.3.3-8.el8.remi.x86_64
php-phpiredis-1.0.1-1.el8.remi.7.4.x86_64
php-xml-7.4.32-1.el8.remi.x86_64
php-pdo-7.4.32-1.el8.remi.x86_64
php-pecl-imagick-im6-3.7.0-1.el8.remi.7.4.x86_64
php-intl-7.4.32-1.el8.remi.x86_64
php-gd-7.4.32-1.el8.remi.x86_64
php74-runtime-1.0-3.el8.remi.x86_64
php-pecl-redis5-5.3.7-1.el8.remi.7.4.x86_64
php74-php-json-7.4.32-1.el8.remi.x86_64
php-pecl-igbinary-3.2.7-1.el8.remi.7.4.x86_64
php-mysqlnd-7.4.32-1.el8.remi.x86_64
php-mbstring-7.4.32-1.el8.remi.x86_64
php74-php-sodium-7.4.32-1.el8.remi.x86_64
oniguruma5php-6.9.8-1.el8.remi.x86_64
php74-php-common-7.4.32-1.el8.remi.x86_64
php-process-7.4.32-1.el8.remi.x86_64
php-common-7.4.32-1.el8.remi.x86_64
php74-php-pecl-imagick-im6-3.7.0-1.el8.remi.x86_64
php-fpm-7.4.32-1.el8.remi.x86_64


[root@tweety nextcloud]# ls -l
total 128
drwxr-xr-x. 43 apache apache  4096 Sep  8 13:35 3rdparty
drwxr-xr-x. 48 apache apache  4096 Sep  8 13:33 apps
drwxr-xr-x.  2 apache apache     6 Sep 29 15:44 apps-custom
-rw-r--r--.  1 apache apache 19327 Sep  8 13:32 AUTHORS
drwxr-xr-x.  2 apache apache    85 Sep 30 12:51 config
-rw-r--r--.  1 apache apache  4095 Sep  8 13:32 console.php
-rw-r--r--.  1 apache apache 34520 Sep  8 13:32 COPYING
drwxr-xr-x. 22 apache apache  4096 Sep  8 13:35 core
-rw-r--r--.  1 apache apache  6260 Sep  8 13:32 cron.php
drwxr-xr-x.  2 apache apache    47 Sep 30 12:52 data
drwxr-xr-x.  2 apache apache  8192 Sep  8 13:32 dist
-rw-r--r--.  1 apache apache   156 Sep  8 13:32 index.html
-rw-r--r--.  1 apache apache  3456 Sep  8 13:32 index.php
drwxr-xr-x.  6 apache apache   125 Sep  8 13:32 lib
-rw-r--r--.  1 apache apache   283 Sep  8 13:32 occ
drwxr-xr-x.  2 apache apache    23 Sep  8 13:32 ocm-provider
drwxr-xr-x.  2 apache apache    55 Sep  8 13:32 ocs
drwxr-xr-x.  2 apache apache    23 Sep  8 13:32 ocs-provider
-rw-r--r--.  1 apache apache  3139 Sep  8 13:32 public.php
-rw-r--r--.  1 apache apache  5340 Sep  8 13:32 remote.php
drwxr-xr-x.  4 apache apache   133 Sep  8 13:32 resources
-rw-r--r--.  1 apache apache    26 Sep  8 13:32 robots.txt
-rw-r--r--.  1 apache apache  2452 Sep  8 13:32 status.php
drwxr-xr-x.  3 apache apache    35 Sep  8 13:32 themes
drwxr-xr-x.  2 apache apache     6 Sep 30 12:00 tmp
drwxr-xr-x.  2 apache apache    43 Sep  8 13:33 updater
-rw-r--r--.  1 apache apache   382 Sep  8 13:35 version.php



[root@tweety nextcloud]# ls -la config/
total 144
drwxr-xr-x.  2 apache apache    85 Sep 30 12:51 .
drwxr-xr-x. 17 apache apache  4096 Sep 30 12:51 ..
-rw-r--r--.  1 apache apache     0 Sep  8 13:32 CAN_INSTALL
-rw-r--r--.  1 apache apache 69107 Sep 30 12:51 config.php
-rw-r--r--.  1 apache apache 68815 Sep  8 13:32 config.sample.php
-rw-r--r--.  1 apache apache   495 Sep  8 13:32 .htaccess




[root@tweety nextcloud]# cat config/.htaccess 
# Section for Apache 2.4 to 2.6
<IfModule mod_authz_core.c>
  Require all denied
</IfModule>
<IfModule mod_access_compat.c>
  Order Allow,Deny
  Deny from all
  Satisfy All
</IfModule>

# Section for Apache 2.2
<IfModule !mod_authz_core.c>
  <IfModule !mod_access_compat.c>
    <IfModule mod_authz_host.c>
      Order Allow,Deny
      Deny from all
    </IfModule>
    Satisfy All
  </IfModule>
</IfModule>

# Section for Apache 2.2 to 2.6
<IfModule mod_autoindex.c>
  IndexIgnore *
</IfModule>


[root@tweety nextcloud]# cat /etc/httpd/conf.d/nextcloud.conf 
Alias "/nextcloud" "/mnt/services/www/html/nextcloud"
 
<Directory /mnt/services/www/html/nextcloud>
  #Satisfy any
  Require all granted
  AllowOverride All
  Options FollowSymLinks MultiViews

 <IfModule mod_dav.c>
  Dav off
 </IfModule>
 
# SetEnv HOME /mnt/services/www/html/nextcloud
# SetEnv HTTP_HOME /mnt/services/www/html/nextcloud
 
</Directory>


How can I help you to help me?

Thank you for Your time,
BR
Theo

You don’t have an error.log for your apache?
Because here in the access.log, you can see the error code as well but no more information:

10.46.236.46 - - [30/Sep/2022:18:20:09 +0300] "GET /nextcloud/ HTTP/1.1" 500 2476

Thank you for your answer.

Nothing is logged in /var/log/httpd/error.log.

:frowning:

Apparently, the problem was the way I tried to setup.

Based on a suggestion from “Kelsar” user in the chat channel (thank you if you are in here), the root cause for my problem was copying config.php.example to config.php and customizing that new file, instead of just running the wizzard.

Removing that config.php file fixed the whole thing and the installer is available.

Cheers
Theo

The same issue in rockylinux 9. atfter disable the selinux, it can write log files. here is my log

{“reqId”:“Y0OWTomyxyW0a0qKh0teyAAAAIA”,“level”:2,“time”:“2022-10-10T03:49:35+00:00”,“remoteAddr”:“127.0.0.1”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/nextcloud/”,“message”:“Host localhost was not connected to because it violates local access rules”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“”,“data”:}
{“reqId”:“Y0OWTomyxyW0a0qKh0teyAAAAIA”,“level”:2,“time”:“2022-10-10T03:49:35+00:00”,“remoteAddr”:“127.0.0.1”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/nextcloud/”,“message”:“Host localhost was not connected to because it violates local access rules”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“”,“data”:}
{“reqId”:“Y0OWTomyxyW0a0qKh0teyAAAAIA”,“level”:3,“time”:“2022-10-10T03:49:35+00:00”,“remoteAddr”:“127.0.0.1”,“user”:“–”,“app”:“index”,“method”:“GET”,“url”:“/nextcloud/”,“message”:“Call to a member function getToken() on null”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“”,“exception”:{“Exception”:“Error”,“Message”:“Call to a member function getToken() on null”,“Code”:0,“Trace”:[{“file”:“/var/www/html/nextcloud/lib/private/User/Session.php”,“line”:839,“function”:“loginWithToken”,“class”:“OC\User\Session”,“type”:“->”,“args”:[“*** sensitive parameters replaced “]},{“file”:”/var/www/html/nextcloud/lib/base.php",“line”:1057,“function”:“tryTokenLogin”,“class”:“OC\User\Session”,“type”:“->”},{“file”:“/var/www/html/nextcloud/lib/base.php”,“line”:1004,“function”:“handleLogin”,“class”:“OC”,“type”:“::”},{“file”:“/var/www/html/nextcloud/index.php”,“line”:36,“function”:“handleRequest”,“class”:“OC”,“type”:“::”}],“File”:“/var/www/html/nextcloud/lib/private/User/Session.php”,“Line”:640,“CustomMessage”:“–”}}
{“reqId”:“Y0OWgtBR3C7FRCrHYbLHfQAAAIA”,“level”:2,“time”:“2022-10-10T03:50:27+00:00”,“remoteAddr”:“127.0.0.1”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/nextcloud/”,“message”:“Host localhost was not connected to because it violates local access rules”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“”,“data”:[]}
{“reqId”:“Y0OWgtBR3C7FRCrHYbLHfQAAAIA”,“level”:2,“time”:“2022-10-10T03:50:27+00:00”,“remoteAddr”:“127.0.0.1”,“user”:“–”,“app”:“no app in context”,“method”:“GET”,“url”:“/nextcloud/”,“message”:“Host localhost was not connected to because it violates local access rules”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“”,“data”:[]}
{“reqId”:“Y0OWgtBR3C7FRCrHYbLHfQAAAIA”,“level”:3,“time”:“2022-10-10T03:50:27+00:00”,“remoteAddr”:“127.0.0.1”,“user”:“–”,“app”:“index”,“method”:“GET”,“url”:“/nextcloud/”,“message”:“Call to a member function getToken() on null”,“userAgent”:“Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0”,“version”:“”,“exception”:{“Exception”:“Error”,“Message”:“Call to a member function getToken() on null”,“Code”:0,“Trace”:[{“file”:“/var/www/html/nextcloud/lib/private/User/Session.php”,“line”:839,“function”:“loginWithToken”,“class”:“OC\User\Session”,“type”:“->”,“args”:["
sensitive parameters replaced ***”]},{“file”:“/var/www/html/nextcloud/lib/base.php”,“line”:1057,“function”:“tryTokenLogin”,“class”:“OC\User\Session”,“type”:“->”},{“file”:“/var/www/html/nextcloud/lib/base.php”,“line”:1004,“function”:“handleLogin”,“class”:“OC”,“type”:“::”},{“file”:“/var/www/html/nextcloud/index.php”,“line”:36,“function”:“handleRequest”,“class”:“OC”,“type”:“::”}],“File”:“/var/www/html/nextcloud/lib/private/User/Session.php”,“Line”:640,“CustomMessage”:“–”}}

php version

[root@host ~]# php -v
PHP 8.0.13 (cli) (built: Nov 16 2021 18:07:21) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.13, Copyright (c), by Zend Technologies
    with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans