Internal server errorunix:/run/php/php7.3-fpm.sock failed

Nextcloud version (eg, 20.0.5): :22.1.1
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): nginx/1.15.8
PHP version (eg, 7.4): 7.3

The issue you are facing:
Internal Server Error on Website
[crit] 28540#28540: *45 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream,

Is this the first time you’ve seen this error? (Y/N): Y

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocv2oswsqp5e',
  'passwordsalt' => 'RDBp67FIOBgf8ZNL9Dr+zaxgFO/+z9',
  'secret' => 'r3JTrM9FQfv1tblxI/KtTBer6k6YQ/JJ4PHXG2R6jUOe1vZA',
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => '**********',
  ),
  'datadirectory' => '/var/nc_data',
  'dbtype' => 'mysql',
  'version' => '22.1.1.2',
  'overwrite.cli.url' => '**********',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '**********',
  'installed' => true,
  'activity_expire_days' => 14,
  'default_phone_region' => 'DE',
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' =>
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'cron_log' => true,
  'enable_previews' => true,
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'filesystem_check_changes' => 0,
  'filelocking.enabled' => 'true',
  'htaccess.RewriteBase' => '/',
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => false,
  'logfile' => '/var/nc_data/nextcloud.log',
  'loglevel' => 2,
  'logtimezone' => 'Europe/Berlin',
  'log_rotate_size' => 104857600,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwriteprotocol' => 'https',
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'redis' =>
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'quota_include_external_storage' => false,
  'share_folder' => '/Shares',
  'skeletondirectory' => '',
  'theme' => '',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'updater.secret' => '$2y$10$2orwthZyQaGzej2C0pA9UuYkQrwut2tpo75nllnZO3f.lvSvxXzwO',
);```

The output of your Apache/nginx/system log in `/var/log/____`:

2021/09/28 10:55:05 [crit] 28540#28540: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""
2021/09/28 10:55:05 [crit] 28540#28540: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET /favicon.ico HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""
2021/09/28 10:55:05 [crit] 28540#28540: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""
2021/09/28 10:55:05 [crit] 28540#28540: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET /favicon.ico HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""
2021/09/28 10:55:05 [crit] 28540#28540: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""
2021/09/28 10:55:05 [crit] 28540#28540: *1 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET /favicon.ico HTTP/2.0”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""
2021/09/28 10:55:15 [crit] 28540#28540: *43 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET /status.php HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""
2021/09/28 10:55:32 [crit] 28540#28540: *45 connect() to unix:/run/php/php7.3-fpm.sock failed (2: No such file or directory) while connecting to upstream, client: *********, server: , request: “GET /status.php HTTP/1.1”, upstream: “fastcgi://unix:/run/php/php7.3-fpm.sock:”, host: ""

Hi @timmekk

Did you upgrade your system from Debian 10 to 11?

I’m not really familiar with nginx and can not give you an exact answer what to do. But the error message suggests that nginx is trying to use php-fpm in version 7.3, which was the default version in Debian 10. But Debian 11 ships with version 7.4. and your PHP packages were most likley upgraded to the new version, when you did the upgrade from 10 to 11.

I suggest you check your nginx and php configs, and make sure everything is configured correctly to use PHP 7.4.

I think @bb77 is right.

You can find here an installation guide for Nextcloud on Ubuntu 20.04 LTS (PHP 7.4) and nginx. Perhaps you can use some parts also for Debian Bullseye, nginx and PHP 7.4.

Please post:

dpkg -l |grep php

I will try that. Yes I updated to Debian 11.

should be exactly the same. At least the php related stuff.

@timmekk

If you have documentation about your initial installation or still have access to the tutorial you used. You should basically be able to do exact configuration steps as you did then. Just change the commands and paths you used from 7.3 to 7.4.

1 Like