lighttpd/1.4.53. Ich habe Probleme mit PHP-Fpm. Ich erhalte 500 und 503 http Server Fehler.
Code: Alles auswählen
ERROR: Another FPM instance seems to already listen on /run/php/php7.3-fpm.sock
ERROR: FPM initialization failed
/etc/php/7.3/fpm/pool.d/www.conf:36:listen = /run/php/php7.3-fpm.sock
Code: Alles auswählen
pv10:~floogy# service lighttpd restart
pv10:~floogy# service lighttpd status
* lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-06-11 02:46:50 CEST; 1s ago
Process: 23151 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 23156 (lighttpd)
Tasks: 5 (limit: 2359)
Memory: 16.9M
CGroup: /system.slice/lighttpd.service
|-23156 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
|-23174 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
|-23175 php-fpm: pool www
|-23176 php-fpm: pool www
`-23185 /usr/sbin/php-fpm7.3
pv10:~floogy# ls /run/php/php7.3-fpm.
php7.3-fpm.pid php7.3-fpm.sock
pv10:~floogy# ls -l /run/php/php7.3-fpm.sock
srw-rw---- 1 www-data www-data 0 Jun 11 02:46 /run/php/php7.3-fpm.sock
pv10:~floogy# fuser /run/php/php7.3-fpm.sock
/run/php/php7.3-fpm.sock: 23174 23175 23176
pv10:~floogy# ps axuf | egrep '23174|23175|23176'
root 663 0.0 0.1 7352 2132 pts/0 S+ 05:42 0:00 \_ grep -E 23174|23175|23176
www-data 23174 0.0 0.4 217476 8628 ? Ss 02:46 0:00 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
www-data 23175 0.0 0.3 217476 6828 ? S 02:46 0:00 \_ php-fpm: pool www
www-data 23176 0.0 0.3 217476 6828 ? S 02:46 0:00 \_ php-fpm: pool www
pv10:~floogy# service lighttpd status
* lighttpd.service - Lighttpd Daemon
Loaded: loaded (/lib/systemd/system/lighttpd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-06-11 02:46:50 CEST; 2h 56min ago
Process: 23151 ExecStartPre=/usr/sbin/lighttpd -tt -f /etc/lighttpd/lighttpd.conf (code=exited, status=0/SUCCESS)
Main PID: 23156 (lighttpd)
Tasks: 4 (limit: 2359)
Memory: 30.5M
CGroup: /system.slice/lighttpd.service
|-23156 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
|-23174 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
|-23175 php-fpm: pool www
`-23176 php-fpm: pool www
Jun 11 05:43:22 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:22] ERROR: Another FPM instance seems to already listen on /run/php/php7.3-fpm.sock
Jun 11 05:43:22 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:22] ERROR: FPM initialization failed
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] ERROR: Another FPM instance seems to already listen on /run/php/php7.3-fpm.sock
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] ERROR: FPM initialization failed
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] ERROR: Another FPM instance seems to already listen on /run/php/php7.3-fpm.sock
Jun 11 05:43:24 pv10.floogy.selfhost.eu lighttpd[23156]: [11-Jun-2020 05:43:24] ERROR: FPM initialization failed
pv10:~floogy# rgrep -n php7.3-fpm /etc
/etc/php/7.3/fpm/pool.d/www.conf:36:listen = /run/php/php7.3-fpm.sock
/etc/php/7.3/fpm/php-fpm.conf:17:pid = /run/php/php7.3-fpm.pid
/etc/php/7.3/fpm/php-fpm.conf:24:error_log = /var/log/php7.3-fpm.log
[...]
/etc/init.d/php7.3-fpm:3:# Provides: php7.3-fpm
/etc/init.d/php7.3-fpm:8:# Short-Description: starts php7.3-fpm
/etc/init.d/php7.3-fpm:21:PIDFILE=${CONF_PIDFILE:-/run/php/php7.3-fpm.pid}
/etc/init.d/php7.3-fpm:101: TMPFILES=/usr/lib/tmpfiles.d/php7.3-fpm.conf
/etc/init/php7.3-fpm.conf:1:# php7.3-fpm - The PHP FastCGI Process Manager
Code: Alles auswählen
pv10:~floogy# egrep -v '^;|^ *$' /etc/php/7.3/fpm/php.ini | grep cgi
cgi.fix_pathinfo=1
pv10:~floogy# egrep -v '^;|^ *$' /etc/php/7.3/fpm/pool.d/www.conf
[www]
user = www-data
group = www-data
listen = /run/php/php7.3-fpm.sock
listen.owner = www-data
listen.group = www-data
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pv10:~floogy# egrep -v '^;|^ *$' /etc/php/7.3/fpm/php-fpm.conf
[global]
pid = /run/php/php7.3-fpm.pid
error_log = /var/log/php7.3-fpm.log
include=/etc/php/7.3/fpm/pool.d/*.conf
pv10:~floogy# egrep -v '#|^ *$' /etc/lighttpd/lighttpd.conf
server.modules = (
"mod_access",
"mod_alias",
"mod_accesslog",
"mod_compress",
"mod_rewrite",
"mod_redirect",
"mod_evhost",
"mod_webdav",
"mod_auth",
"mod_simple_vhost",
"mod_status",
"mod_flv_streaming",
)
server.document-root = "/var/www/"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
"index.lighttpd.html" )
mimetype.use-xattr = "enable"
accesslog.filename = "/var/log/lighttpd/access.log"
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
server.pid-file = "/var/run/lighttpd.pid"
dir-listing.encoding = "utf-8"
server.dir-listing = "disable"
server.username = "www-data"
server.groupname = "www-data"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")
include_shell "/usr/share/lighttpd/create-mime.conf.pl"
include "/etc/lighttpd/conf-enabled/*.conf"
$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += (
"/doc/" => "/usr/share/doc/",
"/images/" => "/usr/share/images/"
)
$HTTP["url"] =~ "^/doc/|^/images/" {
dir-listing.activate = "enable"
}
}
$HTTP["host"] =~ "(^|\.)myserve\.de$" {
server.document-root = "/var/www/www.myserve.de/www/"
}
$HTTP["remoteip"] =~ "127.0.0.1" {
status.status-url = "/server-status"
status.config-url = "/server-config"
}
$HTTP["host"] !~ "(\.myserve\.de|www\.myserve\.eu$|g2\.myserve\.eu$)$" {
simple-vhost.server-root = "/home/www"
simple-vhost.document-root = "/www/"
simple-vhost.default-host = "www.myserve.de"
}
$HTTP["url"] =~ "^/subdomains" {
url.access-deny = ("")
}
var.servername = "myserve.de"
var.logdir = "/home/floogy/www/logs"
$HTTP["host"] == "www.myserve.de" {
server.document-root = "/home/www/www.myserve.de/www"
accesslog.filename = "|/usr/sbin/cronolog " + var.logdir + "/%Y/%m/www." + servername + ".access.log"
}
[...]
top/ps zeigt lighttpd mit www-daten
Es liegt wohl an einer Fehlkonfiguration, weil sich in lighttpd und/oder php-fpm etwas in der Konfiguration von jessie bis zu buster geändert hat.
Ich habe wirklich keine Ahnung, welche zweite Instanz bereits auf /run/php/php7.3-fpm.sock lauscht.
Es gibt nur Thread-Instanzen von php-fpm selbst, die vom fpm-Master geerbt wurden
Code: Alles auswählen
tail /var/log/lighttpd/error.log
2020-06-11 16:57:31: (gw_backend.c.476) unlink /var/run/lighttpd/php7.3-fpm.sock-0 after connect failed: Connection refused
2020-06-11 16:57:31: (gw_backend.c.328) child exited: 70 unix:/var/run/lighttpd/php7.3-fpm.sock-0
ls -ld /var/run/lighttpd/ *
srwxr-xr-x 1 www-data www-data 0 11. Juni 15:57 /var/run/lighttpd/php.socket
# ps axuf | grep -A4 httpd
root 925 0.0 0.0 7352 1924 pts/0 S+ 15:58 0:00 \_ grep -A4 httpd
root 705 0.0 0.1 7116 3252 tty1 Ss Jun10 0:00 /bin/login -p --
root 2025 0.0 0.1 8516 3668 tty1 S+ Jun10 0:01 \_ -bash
root 928 0.0 0.6 22484 12760 ? Ss Jun10 0:03 /usr/bin/perl -wT /usr/sbin/munin-node
root 1990 0.0 0.4 21260 8968 ? Ss Jun10 0:00 /lib/systemd/systemd --user
--
www-data 23156 0.0 0.3 48916 8060 ? Ss 02:46 0:28 /usr/sbin/lighttpd -D -f /etc/lighttpd/lighttpd.conf
www-data 23174 0.0 0.4 217476 8576 ? Ss 02:46 0:01 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
www-data 23175 0.0 0.3 217476 6828 ? S 02:46 0:00 \_ php-fpm: pool www
www-data 23176 0.0 0.3 217476 6828 ? S 02:46 0:00 \_ php-fpm: pool www
lighttpd/conf-enabled
Code: Alles auswählen
pv10:~floogy# egrep -v '^#|^ *$' /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
fastcgi.server += ( ".php" =>
((
# "bin-path" => "/usr/bin/php-cgi",
"bin-path" => "/usr/sbin/php-fpm7.3",
"socket" => "/var/run/lighttpd/php.socket",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
pv10:~floogy# egrep -v '^#|^ *$' /etc/lighttpd/conf-enabled/10-fastcgi.conf
server.modules += ( "mod_fastcgi" )
pv10:~floogy# egrep -v '^#|^ *$' /etc/lighttpd/conf-enabled/10-cgi.conf
server.modules += ( "mod_cgi" )
$HTTP["url"] =~ "^/cgi-bin/" {
cgi.assign = ( "" => "" )
alias.url += ( "/cgi-bin/" => "/usr/lib/cgi-bin/" )
}
Ich habe "socket" => "/var/run/lighttpd/php.socket" gegen "socket" => "/var/run/lighttpd/php7.3-fpm.sock" /etc/lighttpd/conf-enabled/15-fastcgi-php.conf/15-fastcgi-php.conf ausgetauscht, aber ohne Wirkung.
Ich versuche mich hieran zu orientieren. https://www.howtoforge.de/anleitung/wie ... stalliert/ Die Schwierigkeit besteht wohl in der Migration der alten Konfiguration ... Ich scheine da etwas zu übersehen.