Project

General

Profile

[NoResponse] 500 Internal Server Error

Added by Ireng 4 months ago

I installed Nextcloud 12 and after entering username and password I am hiiting the Login buttoan and always receive an 500 - Internal Server Error !

lighttpd 1.4.45, DEBIAN 9, php7.0

My lighttpd.conf shows like this :

# required server modules
  server.modules = (
    "mod_auth",
    "mod_access",
    "mod_alias",
    "mod_compress",
    "mod_redirect",
    "mod_rewrite",
    "mod_fastcgi",
    "mod_simple_vhost",
    "mod_webdav",
        "mod_status",
        "mod_setenv",
)

server.document-root="/var/www/servers" 
server.upload-dirs=("/var/www//uploads")
server.error-log="/var/log/lighttpd/error.log" 
server.pid-file    ="/var/run/lighttpd.pid" 
server.username="www-data" 
server.groupname="www-data" 
server.port= 80
index-files.names= ("index.php", "index.html","default.htm","index.lighttpd.html")

mimetype.use-xattr = "enable" 

mimetype.assign   = ( ".png"  => "image/png",
                      ".gif"  => "image/gif",
                      ".jpg"  => "image/jpeg",
                      ".jpeg" => "image/jpeg",
                      ".svg"  => "image/svg+xml",
                      ".svgz" => "image/svg+xml",
                      ".html" => "text/html",
              ".css"  => "text/css",
              ".js"   => "text/javascript",
                      ".txt"  => "text/plain",
)

url.access-deny    =("~", ".inc",".htaccess", ".htpasswd", "password.txt", "username.txt", "login.txt" )

static-file.exclude-extensions = (".php", ".pl", ".fcgi")

#dir-listing.encoding    = "utf-8" 
#server.dir-listing    = "false" 
#dir-listing.activate    = "false" 
#dir-listing.show-header = "false" 
#dir-listing.set-footer  = "false" 

# $HTTP["url"] =~ "^/($|/)" { 
#    dir-listing.activate = "disable" 
#}

fastcgi.server = ( ".php" => ((
#    "bin-path" => "/usr/sbin/php-fpm7.0",
     "bin-path" => "/usr/bin/php-cgi7.0",
#    "bin-path" => "/usr/bin/php7.0",
     "socket" => "/tmp/php.socket",
     "allow-x-send-file" => "enable",
     "bin-environment" => (
     "MOD_X_SENDFILE2_ENABLED" => "1",
   ),
)))

#
# Configuration directives for NextCloud  Installation
#

# directive with reassigned nextcloud-folder
$HTTP["url"]=~ "^/nextcloud($|/)" {
     dir-listing.acivate = "disable" 
}

# directive with reassigned nextcloud data folder
$HTTP["url"] =~ "^/nextcloud/data/" {
      url.access-deny =("")
}

# Add  'HTTP Strict Transport Security' header (HSTS) to SSL - sites
$HTTP["scheme"] == "https" {
    setenv.add-response-header  = ( "Strict-Transport-Security" => "max-age=15768000" )
}
#
# Configuration directives for Davdroid  Installation
#
# URl Redirector für DAVDroid Adressen
url.redirect = (
       "^/.well-known/carddav" => "/nextcloud/remote.php/dav",
       "^/.well-known/caldav" => "/nextcloud/remote.php/dav",
)

#
# Configuration directives for SSL  Installation
#

$SERVER["socket"] == ":443" {
   ssl.engine = "enable" 
   ssl.pemfile = "/etc/lighttpd/server.pem" 
}

# Zugriff von remote auf Status-Meldungen
$HTTP["remoteip"] == "192.168.175.0/24" {
        status.status-url     =  "/server-status" 
        status.statistics-url =  "/server-stats" 
        status.config-url     =  "/server-config" 
}
#Location für Virtuelle-Server (Multi-Server Konfiguration)
include_shell "/var/www/config_servers" 

#Directory Listing
# include_shell "/var/www/scripte/dir-generator.php" 

#file upload
server.max-request-size = 2048000
server.network-backend = "writev" 

error.log:

2017-07-05 15:14:35: (log.c.217) server started 
2017-07-05 15:38:42: (server.c.1828) server stopped by UID = 0 PID = 1

which is far outdated. No current entry is available!

Any idea to resolve the situation ??

Regards, Ireng


Replies (21)

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

Find the PID of the currently running lighttpd process, then restart it and check it actually was restarted by looking for the PID again - it needs to be a new one.

As you are probably running systemd you should take a look at systemctl status lighttpd.service and journalctl -u lighttpd.service too.

RE: 500 Internal Server Error - Added by Ireng 4 months ago

systemctl status lighttpd.service
● lighttpd.service - Lighttpd Daemon
   Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2017-07-14 16:39:56 CEST; 1h 45min ago
  Process: 6168 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 6173 (lighttpd)
    Tasks: 9 (limit: 4915)
   CGroup: /system.slice/lighttpd.service
           ├─ 6173 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
           ├─ 6188 /usr/bin/php-cgi7.0
           ├─ 6196 /usr/bin/php-cgi7.0
           ├─ 6197 /usr/bin/php-cgi7.0
           ├─ 6198 /usr/bin/php-cgi7.0
           ├─ 6199 /usr/bin/php-cgi7.0
           ├─ 6200 /usr/bin/php-cgi7.0
           ├─ 6201 /usr/bin/php-cgi7.0
           └─22050 /usr/bin/php-cgi7.0

Jul 14 18:24:17 srv01 lighttpd[6173]: 7f0ec158f000-7f0ec1590000 r--p 00023000 103:01 1839557                   /lib/x86_64-linux-gnu/ld-2.24.so
Jul 14 18:24:17 srv01 lighttpd[6173]: 7f0ec1590000-7f0ec1591000 rw-p 00024000 103:01 1839557                   /lib/x86_64-linux-gnu/ld-2.24.so
Jul 14 18:24:17 srv01 lighttpd[6173]: 7f0ec1591000-7f0ec1592000 rw-p 00000000 00:00 0
Jul 14 18:24:17 srv01 lighttpd[6173]: 7ffee6612000-7ffee6633000 rw-p 00000000 00:00 0                          [stack]
Jul 14 18:24:17 srv01 lighttpd[6173]: 7ffee6663000-7ffee6665000 r--p 00000000 00:00 0                          [vvar]
Jul 14 18:24:17 srv01 lighttpd[6173]: 7ffee6665000-7ffee6667000 r-xp 00000000 00:00 0                          [vdso]
Jul 14 18:24:17 srv01 lighttpd[6173]: ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Jul 14 18:24:17 srv01 lighttpd[6173]: Magick: abort due to signal 6 (SIGABRT) "Abort"...
Jul 14 18:24:17 srv01 lighttpd[6173]: 2017-07-14 18:24:17: (mod_fastcgi.c.2424) unexpected end-of-file (perhaps the fastcgi process died): pid: 6201 socket: unix:/tmp/php.socket-3
Jul 14 18:24:17 srv01 lighttpd[6173]: 2017-07-14 18:24:17: (mod_fastcgi.c.3175) response not received, request sent: 1572 on socket: unix:/tmp/php.socket-3 for /nextcloud/index.php?, cl
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"Tp8DW9ArYuCGBwYFQCyk","level":3,"time":"2017-07-14T14:24:20+00:00","remoteAddr" 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"Tp8DW9ArYuCGBwYFQCyk","level":3,"time":"2017-07-14T14:24:20+00:00","remoteAddr" 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"Tp8DW9ArYuCGBwYFQCyk","level":3,"time":"2017-07-14T14:24:20+00:00","remoteAddr" 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"Tp8DW9ArYuCGBwYFQCyk","level":3,"time":"2017-07-14T14:24:20+00:00","remoteAddr" 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"Tp8DW9ArYuCGBwYFQCyk","level":3,"time":"2017-07-14T14:24:20+00:00","remoteAddr" 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"Tp8DW9ArYuCGBwYFQCyk","level":3,"time":"2017-07-14T14:24:20+00:00","remoteAddr" 
Jul 14 16:24:20 srv01 lighttpd[3863]: 2017-07-14 16:24:20: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"Tp8DW9ArYuCGBwYFQCyk","level":3,"time":"2017-07-14T14:24:20+00:00","remoteAddr" 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"XUv0VKV3luf1BNbZkw4R","level":3,"time":"2017-07-14T14:24:22+00:00","remoteAddr" 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"XUv0VKV3luf1BNbZkw4R","level":3,"time":"2017-07-14T14:24:22+00:00","remoteAddr" 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"XUv0VKV3luf1BNbZkw4R","level":3,"time":"2017-07-14T14:24:22+00:00","remoteAddr" 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"XUv0VKV3luf1BNbZkw4R","level":3,"time":"2017-07-14T14:24:22+00:00","remoteAddr" 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"XUv0VKV3luf1BNbZkw4R","level":3,"time":"2017-07-14T14:24:22+00:00","remoteAddr" 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"XUv0VKV3luf1BNbZkw4R","level":3,"time":"2017-07-14T14:24:22+00:00","remoteAddr" 
Jul 14 16:24:22 srv01 lighttpd[3863]: 2017-07-14 16:24:22: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"XUv0VKV3luf1BNbZkw4R","level":3,"time":"2017-07-14T14:24:22+00:00","remoteAddr" 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"7yhpnV6kITMbMRC4iPCW","level":3,"time":"2017-07-14T14:24:23+00:00","remoteAddr" 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"7yhpnV6kITMbMRC4iPCW","level":3,"time":"2017-07-14T14:24:23+00:00","remoteAddr" 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"7yhpnV6kITMbMRC4iPCW","level":3,"time":"2017-07-14T14:24:23+00:00","remoteAddr" 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"7yhpnV6kITMbMRC4iPCW","level":3,"time":"2017-07-14T14:24:23+00:00","remoteAddr" 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"7yhpnV6kITMbMRC4iPCW","level":3,"time":"2017-07-14T14:24:23+00:00","remoteAddr" 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"7yhpnV6kITMbMRC4iPCW","level":3,"time":"2017-07-14T14:24:23+00:00","remoteAddr" 
Jul 14 16:24:23 srv01 lighttpd[3863]: 2017-07-14 16:24:23: (mod_fastcgi.c.2543) FastCGI-stderr: {"reqId":"7yhpnV6kITMbMRC4iPCW","level":3,"time":"2017-07-14T14:24:23+00:00","remoteAddr" 
Jul 14 16:34:10 srv01 lighttpd[3863]: *** Error in `/usr/bin/php-cgi7.0': corrupted double-linked list: 0x0000563f61688300 ***
Jul 14 16:34:10 srv01 lighttpd[3863]: ======= Backtrace: =========
Jul 14 16:34:10 srv01 lighttpd[3863]: /lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7f2010217bcb]
Jul 14 16:34:10 srv01 lighttpd[3863]: /lib/x86_64-linux-gnu/libc.so.6(+0x76f96)[0x7f201021df96]
Jul 14 16:34:10 srv01 lighttpd[3863]: /lib/x86_64-linux-gnu/libc.so.6(+0x77338)[0x7f201021e338]
Jul 14 16:34:10 srv01 lighttpd[3863]: /lib/x86_64-linux-gnu/libc.so.6(+0x78dca)[0x7f201021fdca]
Jul 14 16:34:10 srv01 lighttpd[3863]: /lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f2010221f34]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.3(AcquireString+0x2f)[0x7f20024a1f5f]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.3(+0x13a66b)[0x7f200242266b]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.3(+0x13ae88)[0x7f2002422e88]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.3(OpenModules+0x71)[0x7f2002423cb1]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.3(GetMagickInfo+0x1b0)[0x7f200241e610]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/x86_64-linux-gnu/libMagickCore-6.Q16.so.3(GetMagickList+0x68)[0x7f200241ed68]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/x86_64-linux-gnu/libMagickWand-6.Q16.so.3(MagickQueryFormats+0x20)[0x7f2002861b90]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/lib/php/20151012/imagick.so(zm_info_imagick+0x3d)[0x7f2002b232cd]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(+0x1b5503)[0x563f5f160503]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(zend_hash_apply+0x7a)[0x563f5f2177ba]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(php_print_info+0x8aa)[0x563f5f160f6a]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(zif_phpinfo+0x47)[0x563f5f161577]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(+0x2e030d)[0x563f5f28b30d]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(execute_ex+0x1b)[0x563f5f2464fb]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(zend_execute+0x1a7)[0x563f5f29ae87]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(zend_execute_scripts+0xd3)[0x563f5f205993]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(php_execute_script+0x2d0)[0x563f5f1a4860]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(main+0x1eb4)[0x563f5f0859d4]
Jul 14 16:34:10 srv01 lighttpd[3863]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f20101c72b1]
Jul 14 16:34:10 srv01 lighttpd[3863]: /usr/bin/php-cgi7.0(_start+0x2a)[0x563f5f08623a]
Jul 14 16:34:10 srv01 lighttpd[3863]: ======= Memory map: ========
Jul 14 16:34:10 srv01 lighttpd[3863]: 563f5efab000-563f5f348000 r-xp 00000000 103:01 1456873                   /usr/bin/php-cgi7.0
Jul 14 16:34:10 srv01 lighttpd[3863]: 563f5f547000-563f5f5c0000 r--p 0039c000 103:01 1456873                   /usr/bin/php-cgi7.0
lines 202-247

cat nextcloud.log === > empty !

Additionla information:

strace -p 17176 lighttpd -o strace.output
strace: Process 17176 attached
[pid 17176] wait4(17204,  <unfinished ...>
[pid 17883] execve("/usr/sbin/lighttpd", ["lighttpd", "-o", "strace.output"], [/* 19 vars */] <unfinished ...>
[pid 17176] <... wait4 resumed> 0x7ffc6d58bff4, WNOHANG, NULL) = 0
[pid 17176] wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
[pid 17176] wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
[pid 17176] wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
[pid 17176] epoll_wait(6,  <unfinished ...>
[pid 17883] <... execve resumed> )      = 0
[pid 17883] brk(NULL)                   = 0x55d1f77d7000
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc645714000
[pid 17883] access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=43534, ...}) = 0
[pid 17883] mmap(NULL, 43534, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc645709000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\25\0\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=468920, ...}) = 0
[pid 17883] mmap(NULL, 2564360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc645281000
[pid 17883] mprotect(0x7fc6452f3000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc6454f2000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x71000) = 0x7fc6454f2000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\r\0\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=14640, ...}) = 0
[pid 17883] mmap(NULL, 2109680, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc64507d000
[pid 17883] mprotect(0x7fc645080000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc64527f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7fc64527f000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/lib/x86_64-linux-gnu/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\23\0\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=18832, ...}) = 0
[pid 17883] mmap(NULL, 2113904, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc644e78000
[pid 17883] mprotect(0x7fc644e7c000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc64507b000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7fc64507b000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/usr/lib/x86_64-linux-gnu/libssl.so.1.1", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\211\1\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=442920, ...}) = 0
[pid 17883] mmap(NULL, 2538392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc644c0c000
[pid 17883] mprotect(0x7fc644c6e000, 2097152, PROT_NONE) = 0
[pid 17883] mmap(0x7fc644e6e000, 40960, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x62000) = 0x7fc644e6e000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/usr/lib/x86_64-linux-gnu/libcrypto.so.1.1", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\340\7\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=2686672, ...}) = 0
[pid 17883] mmap(NULL, 4795968, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc644779000
[pid 17883] mprotect(0x7fc6449de000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc644bdd000, 180224, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x264000) = 0x7fc644bdd000
[pid 17883] mmap(0x7fc644c09000, 11840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc644c09000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/usr/lib/x86_64-linux-gnu/libfam.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0&\0\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=35520, ...}) = 0
[pid 17883] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc645707000
[pid 17883] mmap(NULL, 2131336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc644570000
[pid 17883] mprotect(0x7fc644578000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc644777000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7fc644777000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\3\2\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0755, st_size=1689360, ...}) = 0
[pid 17883] mmap(NULL, 3795360, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc6441d1000
[pid 17883] mprotect(0x7fc644366000, 2097152, PROT_NONE) = 0
[pid 17883] mmap(0x7fc644566000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x195000) = 0x7fc644566000
[pid 17883] mmap(0x7fc64456c000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc64456c000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0Pa\0\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0755, st_size=135440, ...}) = 0
[pid 17883] mmap(NULL, 2212936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc643fb4000
[pid 17883] mprotect(0x7fc643fcc000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc6441cb000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7fc6441cb000
[pid 17883] mmap(0x7fc6441cd000, 13384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc6441cd000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/usr/lib/x86_64-linux-gnu/libstdc++.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\267\10\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=1566168, ...}) = 0
[pid 17883] mmap(NULL, 3674720, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc643c32000
[pid 17883] mprotect(0x7fc643da4000, 2097152, PROT_NONE) = 0
[pid 17883] mmap(0x7fc643fa4000, 49152, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x172000) = 0x7fc643fa4000
[pid 17883] mmap(0x7fc643fb0000, 12896, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fc643fb0000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/lib/x86_64-linux-gnu/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200V\0\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=1063328, ...}) = 0
[pid 17883] mmap(NULL, 3158248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc64392e000
[pid 17883] mprotect(0x7fc643a31000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc643c30000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x102000) = 0x7fc643c30000
[pid 17883] close(3)                    = 0
[pid 17883] access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
[pid 17883] open("/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
[pid 17883] read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220*\0\0\0\0\0\0"..., 832) = 832
[pid 17883] fstat(3, {st_mode=S_IFREG|0644, st_size=92584, ...}) = 0
[pid 17883] mmap(NULL, 2188336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc643717000
[pid 17883] mprotect(0x7fc64372d000, 2093056, PROT_NONE) = 0
[pid 17883] mmap(0x7fc64392c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7fc64392c000
[pid 17883] close(3)                    = 0
[pid 17883] mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc645705000
[pid 17883] mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc645702000
[pid 17883] arch_prctl(ARCH_SET_FS, 0x7fc645702740) = 0
[pid 17883] mprotect(0x7fc644566000, 16384, PROT_READ) = 0
[pid 17883] mprotect(0x7fc64392c000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x7fc643c30000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x7fc643fa4000, 40960, PROT_READ) = 0
[pid 17883] mprotect(0x7fc6441cb000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x7fc644777000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x7fc64527f000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x7fc644bdd000, 122880, PROT_READ) = 0
[pid 17883] mprotect(0x7fc644e6e000, 16384, PROT_READ) = 0
[pid 17883] mprotect(0x7fc64507b000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x7fc6454f2000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x55d1f6f44000, 4096, PROT_READ) = 0
[pid 17883] mprotect(0x7fc645717000, 4096, PROT_READ) = 0
[pid 17883] munmap(0x7fc645709000, 43534) = 0
[pid 17883] set_tid_address(0x7fc645702a10) = 17883
[pid 17883] set_robust_list(0x7fc645702a20, 24) = 0
[pid 17883] rt_sigaction(SIGRTMIN, {sa_handler=0x7fc643fb9bd0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fc643fc50c0}, NULL, 8) = 0
[pid 17883] rt_sigaction(SIGRT_1, {sa_handler=0x7fc643fb9c60, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fc643fc50c0}, NULL, 8) = 0
[pid 17883] rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
[pid 17883] getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
[pid 17883] brk(NULL)                   = 0x55d1f77d7000
[pid 17883] brk(0x55d1f7809000)         = 0x55d1f7809000
[pid 17883] futex(0x7fc643fb103c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 17883] futex(0x7fc643fb1048, FUTEX_WAKE_PRIVATE, 2147483647) = 0
[pid 17883] getuid()                    = 0
[pid 17883] write(2, "lighttpd: invalid option -- 'o'\n", 32lighttpd: invalid option -- 'o'
) = 32
[pid 17883] write(1, "lighttpd/1.4.45 (ssl) (Jan 14 20"..., 644lighttpd/1.4.45 (ssl) (Jan 14 2017 21:07:19) - a light and fast webserver
usage:
 -f <name>  filename of the config-file
 -m <name>  module directory (default: /usr/lib/lighttpd)
 -i <secs>  graceful shutdown after <secs> of inactivity
 -1         process single (one) request on stdin socket, then exit
 -p         print the parsed config-file in internal form, and exit
 -t         test config-file syntax, then exit
 -tt        test config-file syntax, load and init modules, then exit
 -D         don't go to background (default: go to background)
 -v         show version
 -V         show compile-time features
 -h         show this help

) = 644
[pid 17883] exit_group(-1)              = ?
[pid 17883] +++ exited with 255 +++
<... epoll_wait resumed> [], 1025, 1000) = 0
wait4(17204, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
epoll_wait(6, [], 1025, 1000)           = 0
wait4(17204, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
epoll_wait(6, [], 1025, 1000)           = 0
wait4(17204, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
epoll_wait(6, [], 1025, 1000)           = 0
wait4(17204, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
epoll_wait(6, [], 1025, 1000)           = 0
wait4(17204, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
epoll_wait(6, [], 1025, 1000)           = 0
wait4(17204, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
epoll_wait(6, [], 1025, 1000)           = 0
wait4(17204, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17202, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17200, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
wait4(17198, 0x7ffc6d58bff4, WNOHANG, NULL) = 0
epoll_wait(6, ^Cstrace: Process 17176 detached
 <detached ...>

Thats some messages from the commands fired. Sorry, i am unable to interpret! Please help!

regards, ireng

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

It seems permission with nextcloud are a problem, e.g:

PHP Warning:  fileperms(): stat failed for /var/www/servers/nextcloud/data/nextcloud.log

As you spawn php from lighttpd this means php is probably running as www-data (same as lighttpd itself), so the www-data user needs write permissions accordingly.

As an alternative you could run php as a different user by spawning it through php-fpm, spawn-fcgi or systemd; in that case remove the "bin-path" option in the lighttpd fastcgi config, and just point it to the socket php is running at (again: www-data will need permissions to access this socket).

PHP crashing in libMagickCore is certainly not a good sign either; you might want to report that (unless someone else already did of course).

The strace output is not useful; you shouldn't specify a binary name when you want to trace a running process, but if you do the strace options (-o strace.output) must come before the binary (because it spawns the binary with all options after it, and traces process too).
The part from the strace output regarding the already running lighttpd shows only idle time - there is no request coming in.

You also might want to check the response headers of the requests resulting in "500 - Internal Server Error" - it looks like PHP is the origin of these.

Regarding the lighttpd error log: please note that there are no per-vhost error logs, only a global one; and it looks like you point it to syslog or stderr in some of the included config files, which is why the log ends up in journalctl (nothing wrong with that though, but /var/log/lighttpd/error.log will stay untouched).

RE: 500 Internal Server Error - Added by Ireng 4 months ago

stbuehler, many thanks for your comprehensive answer. i will test all your suggestions one by one!

-rw-r--r-- 1 www-data www-data      0 Jul 14 16:34 nextcloud.log

is the current stae and I changed it to

-rw-rw-r-- 1 www-data www-data      0 Jul 14 16:34 nextcloud.log

However, this did not change the error message
Same holds true for

-rw-rw-rw- 1 www-data www-data      0 Jul 14 16:34 nextcloud.log

regards, Ireng

RE: 500 Internal Server Error - Added by Ireng 4 months ago

As suggested, running it only with the socket:

results in the error message: 530 - Service not available

with

srwxr-xr-x 1 www-data www-data 0 Jul 13 15:38 php.socket

regards, ireng

RE: 500 Internal Server Error - Added by Ireng 4 months ago

Additional info for the php process(es)

root      6823  0.0  0.6 498492 50008 ?        Ss   Jul13   0:06 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
www-data  6824  0.0  0.1 498492 11064 ?        S    Jul13   0:00  \_ php-fpm: pool www
www-data  6825  0.0  0.1 498492 11064 ?        S    Jul13   0:00  \_ php-fpm: pool www

regrds, ireng

RE: 500 Internal Server Error - Added by Ireng 4 months ago

running lighttpd with

     "bin-path" => "/usr/bin/php-cgi7.0",

and

rw-rw-r- 1 www-data www-data 0 Jul 14 16:34 nextcloud.log#

resulted in a new error message:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

at: https://192.168.175.27/nextcloud/index.php/login  page! before it stopped already at: https://192.168.175.27/nextcloud/index.php

and the nextcloud .log reads:

{"reqId":"lWAsKrsLVHeg6kmWNk85","level":3,"time":"2017-07-16T10:50:01+00:00","remoteAddr":"192.168.175.60","user":"--","app":"index","method":"GET","url":"\/nextcloud\/index.php\/login","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(217): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(117): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(155): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(112): OC\\\\Files\\\\Node\\\\Folder->newFolder('core')\\n#4 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSCombiner.php(83): OC\\\\Files\\\\AppData\\\\AppData->newFolder('core')\\n#5 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(105): OC\\\\Template\\\\JSCombiner->process('\\\/var\\\/www\\\/server...', 'core\\\/js\\\/merged-...', 'core')\\n#6 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(68): OC\\\\Template\\\\JSResourceLocator->cacheAndAppendCombineJsonIfExist('\\\/var\\\/www\\\/server...', 'core\\\/js\\\/merged-...')\\n#7 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/ResourceLocator.php(75): OC\\\\Template\\\\JSResourceLocator->doFind('js\\\/merged-templ...')\\n#8 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(249): OC\\\\Template\\\\ResourceLocator->find(Array)\\n#9 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(132): OC\\\\TemplateLayout::findJavascriptFiles(Array)\\n#10 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/template.php(205): OC\\\\TemplateLayout->__construct('guest', 'core')\\n#11 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/public\\\/AppFramework\\\/Http\\\/TemplateResponse.php(157): OC_Template->fetchPage()\\n#12 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(113): OCP\\\\AppFramework\\\\Http\\\\TemplateResponse->render()\\n#13 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(114): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'showLoginForm')\\n#14 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OC\\\\\\\\Core\\\\\\\\Control...', 'showLoginForm', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#15 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#16 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#17 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/base.php(1000): OC\\\\Route\\\\Router->match('\\\/login')\\n#18 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/index.php(40): OC::handleRequest()\\n#19 {main}\",\"File\":\"\\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":97}","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"12.0.0.29"}
{"reqId":"lWAsKrsLVHeg6kmWNk85","level":3,"time":"2017-07-16T10:50:01+00:00","remoteAddr":"192.168.175.60","user":"--","app":"core","method":"GET","url":"\/nextcloud\/index.php\/login","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(217): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(117): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(155): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(112): OC\\\\Files\\\\Node\\\\Folder->newFolder('core')\\n#4 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSCombiner.php(83): OC\\\\Files\\\\AppData\\\\AppData->newFolder('core')\\n#5 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(105): OC\\\\Template\\\\JSCombiner->process('\\\/var\\\/www\\\/server...', 'core\\\/js\\\/merged-...', 'core')\\n#6 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(68): OC\\\\Template\\\\JSResourceLocator->cacheAndAppendCombineJsonIfExist('\\\/var\\\/www\\\/server...', 'core\\\/js\\\/merged-...')\\n#7 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/ResourceLocator.php(75): OC\\\\Template\\\\JSResourceLocator->doFind('js\\\/merged-templ...')\\n#8 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(249): OC\\\\Template\\\\ResourceLocator->find(Array)\\n#9 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(132): OC\\\\TemplateLayout::findJavascriptFiles(Array)\\n#10 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/template.php(205): OC\\\\TemplateLayout->__construct('guest', 'core')\\n#11 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/public\\\/AppFramework\\\/Http\\\/TemplateResponse.php(157): OC_Template->fetchPage()\\n#12 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(113): OCP\\\\AppFramework\\\\Http\\\\TemplateResponse->render()\\n#13 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(114): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OC\\\\Core\\\\Controller\\\\LoginController), 'showLoginForm')\\n#14 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandler.php(47): OC\\\\AppFramework\\\\App::main('OC\\\\\\\\Core\\\\\\\\Control...', 'showLoginForm', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#15 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#16 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#17 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/base.php(1000): OC\\\\Route\\\\Router->match('\\\/login')\\n#18 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/index.php(40): OC::handleRequest()\\n#19 {main}\",\"File\":\"\\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":97}","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"12.0.0.29"}
{"reqId":"lWAsKrsLVHeg6kmWNk85","level":3,"time":"2017-07-16T10:50:01+00:00","remoteAddr":"192.168.175.60","user":"--","app":"core","method":"GET","url":"\/nextcloud\/index.php\/login","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(217): OC\\\\Files\\\\Node\\\\Node->getFileInfo()\\n#1 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php(117): OC\\\\Files\\\\Node\\\\Node->getPermissions()\\n#2 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Folder.php(155): OC\\\\Files\\\\Node\\\\Node->checkPermissions(4)\\n#3 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/AppData\\\/AppData.php(112): OC\\\\Files\\\\Node\\\\Folder->newFolder('core')\\n#4 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSCombiner.php(83): OC\\\\Files\\\\AppData\\\\AppData->newFolder('core')\\n#5 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(105): OC\\\\Template\\\\JSCombiner->process('\\\/var\\\/www\\\/server...', 'core\\\/js\\\/merged-...', 'core')\\n#6 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/JSResourceLocator.php(68): OC\\\\Template\\\\JSResourceLocator->cacheAndAppendCombineJsonIfExist('\\\/var\\\/www\\\/server...', 'core\\\/js\\\/merged-...')\\n#7 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/ResourceLocator.php(75): OC\\\\Template\\\\JSResourceLocator->doFind('js\\\/merged-templ...')\\n#8 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(249): OC\\\\Template\\\\ResourceLocator->find(Array)\\n#9 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/TemplateLayout.php(132): OC\\\\TemplateLayout::findJavascriptFiles(Array)\\n#10 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/template.php(205): OC\\\\TemplateLayout->__construct('error', '')\\n#11 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Template\\\/Base.php(132): OC_Template->fetchPage()\\n#12 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/template.php(342): OC\\\\Template\\\\Base->printPage()\\n#13 \\\/var\\\/www\\\/servers\\\/nextcloud\\\/index.php(59): OC_Template::printExceptionErrorPage(Object(OCP\\\\Files\\\\NotFoundException))\\n#14 {main}\",\"File\":\"\\\/var\\\/www\\\/servers\\\/nextcloud\\\/lib\\\/private\\\/Files\\\/Node\\\/Node.php\",\"Line\":97}","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko\/20100101 Firefox\/54.0","version":"12.0.0.29"}

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

Ireng wrote:

stbuehler, many thanks for your comprehensive answer. i will test all your suggestions one by one!

> -rw-r--r-- 1 www-data www-data      0 Jul 14 16:34 nextcloud.log
> 

is the current stae and I changed it to

[...]

Permission problems can go up the directory tree (you need +x to enter a directory), but the file permissions look fine as they were before (as long as php is running as www-data).

Ireng wrote:

As suggested, running it only with the socket:

results in the error message: 530 - Service not available

Uhm, sounds like you gave it the wrong socket path.

Ireng wrote:

Additional info for the php process(es)

[...]

Well, the php process is still running as www-data. You'd need to configure a different pool with a different username (and socket!) to test running as the "nextcloud user".

Regarding the nextcloud.log errors: you probably need to ask the nextcloud guys.

RE: 500 Internal Server Error - Added by Ireng 4 months ago

The output from the socket path:

>ls -al /tmp | grep php
srwxr-xr-x  1 www-data www-data     0 Jul 13 15:38 php.socket
srwxr-xr-x  1 www-data www-data     0 Jul 16 12:45 php.socket-0
srwxr-xr-x  1 www-data www-data     0 Jul 16 12:45 php.socket-1
srwxr-xr-x  1 www-data www-data     0 Jul 16 12:45 php.socket-2
srwxr-xr-x  1 www-data www-data     0 Jul 16 12:45 php.socket-3

Permissions of nextcloud doirectory:

drwxrwxr-x 15 www-data www-data  4096 Jul 14 16:26 nextcloud

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

Just because the socket files still exist doesn't mean they're active; the ones with a -$n suffix were created by lighttpd ("max-procs" uses a different socket for each spawned backend).

Also NEVER put unix socket files into a world writable directory (i.e. /tmp or /var/tmp).

If you spawn the backend with lighttpd, you'll need a directory in /run or /var/run which is owned by www-data (usually /run/lighttpd/).

If spawned by something with root permissions (php-fpm, systemd, spawn-fcgi) you can put them directly into /run or /var/run.

RE: 500 Internal Server Error - Added by Ireng 4 months ago

Ok I just changed it to :

drwxr-x---  2 www-data    www-data      120 Jul 16 17:45 lighttpd

/run/lighttpd >ll
insgesamt 0
srwxr-xr-x 1 www-data www-data 0 Jul 16 17:38 php.socket-0
srwxr-xr-x 1 www-data www-data 0 Jul 16 17:38 php.socket-1
srwxr-xr-x 1 www-data www-data 0 Jul 16 17:38 php.socket-2
srwxr-xr-x 1 www-data www-data 0 Jul 16 17:38 php.socket-3

in Adiition:

drwxr-xr-x 2 www-data www-data 80 Jul 13 19:35 php

/run/php >ll
insgesamt 4
-rw-r--r-- 1 root     root     4 Jul 13 19:35 php7.0-fpm.pid
srw-rw---- 1 www-data www-data 0 Jul 13 19:35 php7.0-fpm.sock

Error message still prevails!

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

I'm not sure how much we can help with the nextcloud error messages without actually installing nextcloud ourselfs...

RE: 500 Internal Server Error - Added by Ireng 4 months ago

I turned already to the nextcloud guys..however sofar I did not receive any feedback yet!

Anyhow many thanks for your help and support!

The mess started, when I upgraded the server OS from jessie 8 to stretch 9 !!

reagrds, ireng

RE: 500 Internal Server Error - Added by Ireng 4 months ago

root      6823  0.0  0.6 498492 50008 ?        Ss   Jul13   0:11 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
www-data  6824  0.0  0.1 498492 11064 ?        S    Jul13   0:00  \_ php-fpm: pool www
www-data  6825  0.0  0.1 498492 11064 ?        S    Jul13   0:00  \_ php-fpm: pool www

However in lighttpd.conf (looka ta the beginning of this thread)

#    "bin-path" => "/usr/sbin/php-fpm7.0",
     "bin-path" => "/usr/bin/php-cgi7.0",
#    "bin-path" => "/usr/bin/php7.0",

isn't activated ! How come ??

reagrds., ireng

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

php-fpm is its own service, and is not spawned by lighttpd. If you don't want php-fpm anymore you probably should just uninstall it.

Assuming you're using systemd, try this command:

systemctl status

It should show for each process through which unit it was spawned.

RE: 500 Internal Server Error - Added by Ireng 4 months ago

Well, again thanks for yor valuable help and insight!

i am just thinking of reverting back to Jessie 8.8, at a time when everything was running up to expectations!

regards, ireng

RE: 500 Internal Server Error - Added by Ireng 4 months ago

I found out, that static html pages will be displayed nicely !

However, php scrips are still in trouble!

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

( no error messages in error.log it is empty!)

I'll try to fix it by adjusting the php.ini at /etc/php/7.0/cgi !

Does anybody have an idea for what i should look for ??

Hopefully I will succeed!

regards, ireng

RE: 500 Internal Server Error - Added by Ireng 4 months ago

the following script produces 500 Internal server error

<?php
echo "Die aktuelle PHP Version ist " .phpversion();
phpinfo();
?>

Why ???
reagrds, Ireng

installed php7.0 from DEBIAN 9

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

We went through a lot of configurations and log messages, so it would be helpful if you added these for this specific problem. strace output (e.g. strace -p $(pidof lighttpd)) while you make the request might be helpful too.

RE: 500 Internal Server Error - Added by Ireng 4 months ago

following the out put o strace, starting with reloading the page in question:
The error log does not show any entry1

accept4(6, {sa_family=AF_INET, sin_port=htons(40154), sin_addr=inet_addr("192.168.175.60")}, [112->16], SOCK_CLOEXEC|SOCK_NONBLOCK) = 8
read(8, "\26\3\1\2\0\1\0\1\374\3\3\310\336\246m\301D\355\32\336\233\267\2251:\24d\240\325}\367\7"..., 16709) = 517
getpid()                                = 1084
getpid()                                = 1084
write(8, "\26\3\3\0U\2\0\0Q\3\3\376\370\276~ \255\2077\342\0333\\H\357\6\276j\33\6\330L"..., 141) = 141
read(8, 0x56342529e6d3, 16709)          = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(7, EPOLL_CTL_ADD, 8, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}) = 0
accept4(6, 0x7fff007e61e0, [112], SOCK_CLOEXEC|SOCK_NONBLOCK) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(7, [{EPOLLIN, {u32=8, u64=8}}], 1025, 1000) = 1
read(8, "\24\3\3\0\1\1\26\3\3\0(\0\0\0\0\0\0\0\0\263s(\253\337\361_`T\204KW\316"..., 16709) = 51
read(8, 0x56342529e6d3, 16709)          = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(7, [{EPOLLIN, {u32=8, u64=8}}], 1025, 1000) = 1
read(8, "\27\3\3\22x\0\0\0\0\0\0\0\1\274\274\255\224\211\214\312f\300'zk\241\240YO,\270\342"..., 16709) = 4733
read(8, 0x56342529e6d3, 16709)          = -1 EAGAIN (Resource temporarily unavailable)
stat("/var/www/servers/nextcloud/index.php", {st_dev=makedev(259, 1), st_ino=790452, st_mode=S_IFREG|0660, st_nlink=1, st_uid=33, st_gid=33, st_blksize=4096, st_blocks=8, st_size=2471, st_atime=2017-07-21T09:09:12+0200.017722875, st_mtime=2017-07-14T10:45:46+0200.792319550, st_ctime=2017-07-16T19:21:10+0200.887865634}) = 0
open("/var/www/servers/nextcloud/index.php", O_RDONLY) = 9
close(9)                                = 0
getxattr("/var/www/servers/nextcloud/index.php", "user.Content-Type", 0x563425282ed0, 1087) = -1 ENODATA (No data available)
getxattr("/var/www/servers/nextcloud/index.php", "user.Content-Type", 0x563425282ed0, 1087) = -1 ENODATA (No data available)
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 9
connect(9, {sa_family=AF_UNIX, sun_path="/run/lighttpd/php.socket-3"}, 28) = 0
getsockname(8, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("192.168.175.27")}, [112->16]) = 0
epoll_ctl(7, EPOLL_CTL_ADD, 9, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=9, u64=9}}) = 0
writev(9, [{iov_base="\1\1\0\1\0\10\0\0\0\1\0\0\0\0\0\0\1\4\0\1\24t\0\0\16\1CONTEN"..., iov_len=5268}, {iov_base="\1\5\0\1\0\0\0\0", iov_len=8}], 2) = 5276
epoll_ctl(7, EPOLL_CTL_MOD, 8, {EPOLLERR|EPOLLHUP, {u32=8, u64=8}}) = 0
epoll_wait(7, [{EPOLLIN, {u32=9, u64=9}}], 1025, 1000) = 1
ioctl(9, FIONREAD, [808])               = 0
read(9, "\1\6\0\1\3\v\5\0Status: 302 Found\r\nExpir"..., 1087) = 808
epoll_ctl(7, EPOLL_CTL_DEL, 9, 0x7fff007e60d0) = 0
close(9)                                = 0
write(8, "\27\3\3\3\243\216\226#\336\206\346\317,G\262\214oK\347/\242\\W\7\313|b,\212\224\\\210"..., 936) = 936
read(8, 0x56342529e6d3, 16709)          = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(7, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}) = 0
epoll_wait(7, [{EPOLLIN, {u32=8, u64=8}}], 1025, 1000) = 1
read(8, "\27\3\3\22~\0\0\0\0\0\0\0\2\254Vl\f\322\272,\264\347\331\212\356\203\216y\36\1\361\r"..., 16709) = 4739
read(8, 0x56342529e6d3, 16709)          = -1 EAGAIN (Resource temporarily unavailable)
stat("/var/www/servers/nextcloud/index.php/login", 0x7fff007e6000) = -1 ENOTDIR (Not a directory)
stat("/var/www/servers/nextcloud/index.php/login", 0x7fff007e6070) = -1 ENOTDIR (Not a directory)
stat("/var/www/servers/nextcloud/index.php/login", 0x7fff007e6070) = -1 ENOTDIR (Not a directory)
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 9
connect(9, {sa_family=AF_UNIX, sun_path="/run/lighttpd/php.socket-3"}, 28) = 0
getsockname(8, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("192.168.175.27")}, [112->16]) = 0
epoll_ctl(7, EPOLL_CTL_ADD, 9, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=9, u64=9}}) = 0
writev(9, [{iov_base="\1\1\0\1\0\10\0\0\0\1\0\0\0\0\0\0\1\4\0\1\24\262\0\0\16\1CONTEN"..., iov_len=5330}, {iov_base="\1\5\0\1\0\0\0\0", iov_len=8}], 2) = 5338
epoll_ctl(7, EPOLL_CTL_MOD, 8, {EPOLLERR|EPOLLHUP, {u32=8, u64=8}}) = 0
epoll_wait(7, [{EPOLLIN, {u32=9, u64=9}}], 1025, 1000) = 1
ioctl(9, FIONREAD, [1056])              = 0
read(9, "\1\6\0\1\4\1\7\0Status: 500 Internal Ser"..., 1087) = 1056
epoll_ctl(7, EPOLL_CTL_DEL, 9, 0x7fff007e60d0) = 0
close(9)                                = 0
setsockopt(8, SOL_TCP, TCP_CORK, [1], 4) = 0
write(8, "\27\3\3\3z\216\226#\336\206\346\317-M\"\252SY9\5\331\316jI2m\253k\370q\225\247"..., 895) = 895
write(8, "\27\3\3\0019\216\226#\336\206\346\317.Yxd\237>\366\224\221\n\355\203\363\25\310\352D\20@\204"..., 318) = 318
setsockopt(8, SOL_TCP, TCP_CORK, [0], 4) = 0
read(8, 0x56342529e6d3, 16709)          = -1 EAGAIN (Resource temporarily unavailable)
epoll_ctl(7, EPOLL_CTL_MOD, 8, {EPOLLIN|EPOLLERR|EPOLLHUP, {u32=8, u64=8}}) = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
write(8, "\25\3\3\0\32\216\226#\336\206\346\317/\251\366\235\266A]\243\f\222\235\33y\375\23E\16h\341", 31) = 31
read(8, 0x5634252a2733, 16709)          = -1 EAGAIN (Resource temporarily unavailable)
shutdown(8, SHUT_WR)                    = 0
read(8, 0x7fff007e51f0, 4096)           = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(7, [{EPOLLIN|EPOLLHUP, {u32=8, u64=8}}], 1025, 1000) = 1
read(8, "", 4096)                       = 0
read(8, "", 4096)                       = 0
epoll_ctl(7, EPOLL_CTL_DEL, 8, 0x7fff007e61c0) = 0
close(8)                                = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7, [], 1025, 1000)           = 0
wait4(1091, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1089, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1087, 0x7fff007e6224, WNOHANG, NULL) = 0
wait4(1085, 0x7fff007e6224, WNOHANG, NULL) = 0
epoll_wait(7,  <detached ...>

in addition I do have some messages from mysqld:
maybe ist helps to narrow down the problem:

Server version: 10.1.23-MariaDB-9+deb9u1
key_buffer_size=16777216
read_buffer_size=131072
max_used_connections=0
max_threads=153
thread_count=0
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 352433 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x0 thread_stack 0x30000
/usr/sbin/mysqld(my_print_stacktrace+0x2e)[0x55e8e7f5f9ce]
/usr/sbin/mysqld(handle_fatal_signal+0x3bd)[0x55e8e7aa7d1d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7f38841d60c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7f3882ad0fcf]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7f3882ad23fa]
/usr/sbin/mysqld(+0x9c947c)[0x55e8e7ed747c]
/usr/sbin/mysqld(+0x8707e3)[0x55e8e7d7e7e3]
/usr/sbin/mysqld(+0x8ff85f)[0x55e8e7e0d85f]
/usr/sbin/mysqld(+0x815d4f)[0x55e8e7d23d4f]
/usr/sbin/mysqld(_Z24ha_initialize_handlertonP13st_plugin_int+0x66)[0x55e8e7aa9e06]
/usr/sbin/mysqld(+0x41fd68)[0x55e8e792dd68]
/usr/sbin/mysqld(_Z11plugin_initPiPPci+0x7da)[0x55e8e792f37a]
/usr/sbin/mysqld(+0x37a5a3)[0x55e8e78885a3]
/usr/sbin/mysqld(_Z11mysqld_mainiPPc+0x19cd)[0x55e8e788bd4d]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7f3882abe2b1]
/usr/sbin/mysqld(_start+0x2a)[0x55e8e788063a

Many, many thanks for your support & feedback!

regards, ireng

RE: 500 Internal Server Error - Added by stbuehler 4 months ago

There seems to be one connection (one accept4), but two requests. The first seems to be for /index.php and returns 302:

stat("/var/www/servers/nextcloud/index.php", [...]) = 0
[...]
read(9, "\1\6\0\1\3\v\5\0Status: 302 Found\r\nExpir"..., 1087) = 808

The second seems to be for /index.php/login and returns 500:

stat("/var/www/servers/nextcloud/index.php/login", 0x7fff007e6000) = -1 ENOTDIR (Not a directory)
[...]
read(9, "\1\6\0\1\4\1\7\0Status: 500 Internal Ser"..., 1087) = 1056

I'm not sure whether it handles PATH_INFO for the second request (i.e. split into /index.php for the script and /login for PATH_INFO); it might use cached stat information for that.

A crashing mysqld is always bad, but should only create issues in php if you actually try to connect. You claimed your simple example script already triggered a 500 (which doesn't use mysql), but it doesn't contain a redirect.

    (1-21/21)