After apt-get upgrade, now getting 502 on PHP requests

1. Caddy version (caddy version):

v2.5.1 h1:bAWwslD1jNeCzDa+jDCNwb8M3UJ2tPa8UZFFzPVmGKs=

2. How I run Caddy:

systemctl start caddy

a. System environment:

Debian GNU/Linux 11 (bullseye)

b. Command:

systemctl start caddy

c. Service/unit/compose file:

Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.

d. My complete Caddyfile or JSON config:

https://

{

tls {
    on_demand
}

encode zstd gzip
file_server {
		index index.html
	}

root * /home/jimcook/bombyhead/app
php_fastcgi unix//run/php/php8.0-fpm.sock
log {
     output file /home/jimcook/bombyhead/logs/caddy.log
     format json
}

}

3. The problem I’m having:

The system has been running for months and working well. I issued upgraded the system using apt-get update; apt-get upgrade command. Now I am getting 502 errors when trying to run PHP programs. Here is the output of the apt-get upgrade. I found it odd that it included Caddy since I thought I was running the latest version:

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
The following packages will be upgraded:
caddy libapache2-mod-php8.0 libxml2 php8.0 php8.0-cli php8.0-common php8.0-curl php8.0-fpm php8.0-gd php8.0-mbstring php8.0-opcache php8.0-readline tzdata
13 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.2 MB of archives.
After this operation, 4,291 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 Index of /debian bullseye-updates/main amd64 tzdata all 2021a-1+deb11u4 [285 kB]
Get:2 https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version/main amd64 caddy amd64 2.5.1 [14.2 MB]
Get:3 Index of /php/ bullseye/main amd64 php8.0-readline amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [12.4 kB]
Get:4 Index of /php/ bullseye/main amd64 php8.0-opcache amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [464 kB]
Get:5 Index of /php/ bullseye/main amd64 php8.0-mbstring amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [396 kB]
Get:6 Index of /php/ bullseye/main amd64 php8.0-gd amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [27.6 kB]
Get:7 Index of /php/ bullseye/main amd64 libxml2 amd64 2.9.14+dfsg-0+0~20220524.12+debian11~1.gbpc5dc45 [705 kB]
Get:8 Index of /php/ bullseye/main amd64 php8.0-fpm amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [1,480 kB]
Get:9 Index of /php/ bullseye/main amd64 php8.0-curl amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [33.0 kB]
Get:10 Index of /php/ bullseye/main amd64 libapache2-mod-php8.0 amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [1,414 kB]
Get:11 Index of /php/ bullseye/main amd64 php8.0-cli amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [1,470 kB]
Get:12 Index of /php/ bullseye/main amd64 php8.0-common amd64 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [662 kB]
Get:13 Index of /php/ bullseye/main amd64 php8.0 all 1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0 [32.4 kB]
Fetched 21.2 MB in 3s (7,134 kB/s)
Reading changelogs… Done
Preconfiguring packages …
(Reading database … 40471 files and directories currently installed.)
Preparing to unpack …/00-tzdata_2021a-1+deb11u4_all.deb …
Unpacking tzdata (2021a-1+deb11u4) over (2021a-1+deb11u3) …
Preparing to unpack …/01-caddy_2.5.1_amd64.deb …
Unpacking caddy (2.5.1) over (2.4.6) …
Preparing to unpack …/02-php8.0-readline_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-readline (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/03-php8.0-opcache_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-opcache (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/04-php8.0-mbstring_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-mbstring (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/05-php8.0-gd_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-gd (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/06-libxml2_2.9.14+dfsg-0+0~20220524.12+debian11~1.gbpc5dc45_amd64.deb …
Unpacking libxml2:amd64 (2.9.14+dfsg-0+0~20220524.12+debian11~1.gbpc5dc45) over (2.9.13+dfsg-0+0~20220410.11+debian11~1.gbp692312) …
Preparing to unpack …/07-php8.0-fpm_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-fpm (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/08-php8.0-curl_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-curl (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/09-libapache2-mod-php8.0_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking libapache2-mod-php8.0 (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/10-php8.0-cli_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-cli (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/11-php8.0-common_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_amd64.deb …
Unpacking php8.0-common (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Preparing to unpack …/12-php8.0_1%3a8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0_all.deb …
Unpacking php8.0 (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) over (8.0.17-1+0~20220320.31+debian11~1.gbp34e045) …
Setting up tzdata (2021a-1+deb11u4) …

Current default time zone: ‘America/New_York’
Local time is now: Wed Jun 15 13:18:33 EDT 2022.
Universal Time is now: Wed Jun 15 17:18:33 UTC 2022.
Run ‘dpkg-reconfigure tzdata’ if you wish to change it.

Setting up php8.0-common (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up caddy (2.5.1) …
Setting up libxml2:amd64 (2.9.14+dfsg-0+0~20220524.12+debian11~1.gbpc5dc45) …
Setting up php8.0-mbstring (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up php8.0-gd (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up php8.0-curl (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up php8.0-readline (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up php8.0-opcache (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up php8.0-cli (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up libapache2-mod-php8.0 (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Warning: Could not load Apache 2.4 maintainer script helper.
Setting up php8.0 (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Setting up php8.0-fpm (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Processing triggers for man-db (2.9.4-2) …
Processing triggers for libc-bin (2.31-13+deb11u3) …
Processing triggers for php8.0-cli (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Processing triggers for libapache2-mod-php8.0 (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …
Warning: Could not load Apache 2.4 maintainer script helper.
Processing triggers for php8.0-fpm (1:8.0.20-1+0~20220614.37+debian11~1.gbp11fdd0) …

4. Error messages and/or full log output:

5. What I already tried:

I deleted the socks files in /run/php/. I restarted php-fpm, caddy, and even rebooted the server.

Tried to backup the php upgrade, but I can’t find version 17. So I am stuck.

6. Links to relevant resources:

I tried installing 7.4 of php, and I am getting the same error with 7.4.

Changed php 8.0 configuration from listening on a socket to a port and changed Caddyfile as well and things are working. Not sure how sockets got messed up.

I would guess a permissions issue when the upgrade occurred.

This topic was automatically closed after 30 days. New replies are no longer allowed.