Cannot upgrade packages + PHP 7.3 service not starting

:uk:/:us: Message template (english)

My YunoHost server

Hardware: VPS bought online (2GB ram, 2CUP cores)

YunoHost version:
I have access to my server : Through SSH
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
If yes, please explain:

Description of my issue

As a premise, I noticed this problem because of the following, but I don’t think it’s directly related:

The server stopped communicating with the rest of the world, mail accounts not reachable, calendar, nextcloud, and all websites were offline. I rebooted the machine and after a while I was able to connect.

After I managed to connect to SSH again I tried an updated, as I supposed it was some sort of attack on my server the cause of the issues, so I wanted to make sure I had the latest version of yunohost.
So i ran the commands for the update:

# Fetch available updates
yunohost tools update

# Upgrade all system packages
yunohost tools upgrade --system

And the process ended up with the message:
Error: Could not upgrade all the packages

In the log I can see in particular this part to contain the source of my problems:

2021-03-03 16:43:16,123: INFO - + ● php7.3-fpm.service - The PHP 7.3 FastCGI Process Manager
2021-03-03 16:43:16,123: WARNING - Job for php7.3-fpm.service failed because the control process exited with error code.
2021-03-03 16:43:16,124: INFO - +    Loaded: loaded (/lib/systemd/system/php7.3-fpm.service; enabled; vendor preset: enabled)
2021-03-03 16:43:16,124: WARNING - See "systemctl status php7.3-fpm.service" and "journalctl -xe" for details.
2021-03-03 16:43:16,124: INFO - +    Active: failed (Result: exit-code) since Wed 2021-03-03 16:43:16 UTC; 12ms ago
2021-03-03 16:43:16,125: WARNING - invoke-rc.d: initscript php7.3-fpm, action "restart" failed.
2021-03-03 16:43:16,125: INFO - +      Docs: man:php-fpm7.3(8)
2021-03-03 16:43:16,126: WARNING - dpkg: error processing package php7.3-fpm (--configure):
2021-03-03 16:43:16,126: INFO - +   Process: 21856 ExecStart=/usr/sbin/php-fpm7.3 --nodaemonize --fpm-config /etc/php/7.3/fpm/php-fpm.conf (code=exited, status=78)
2021-03-03 16:43:16,126: WARNING -  installed php7.3-fpm package post-installation script subprocess returned error exit status 1
2021-03-03 16:43:16,126: INFO - +   Process: 21857 ExecStopPost=/usr/lib/php/php-fpm-socket-helper remove /run/php/php-fpm.sock /etc/php/7.3/fpm/pool.d/www.conf 73 (code=exited, status=0/SUCCESS)
2021-03-03 16:43:16,128: INFO - +  Main PID: 21856 (code=exited, status=78)
2021-03-03 16:43:16,128: INFO - + 
2021-03-03 16:43:16,129: INFO - + Mar 03 16:43:15 YNH-S1S systemd[1]: Starting The PHP 7.3 FastCGI Process Manager...
2021-03-03 16:43:16,129: INFO - + Mar 03 16:43:16 YNH-S1S php-fpm7.3[21856]: [03-Mar-2021 16:43:16] ERROR: unable to bind listening socket for address '/var/run/php/php7.3-fpm-drupal.sock': No such file or directory (2)
2021-03-03 16:43:16,130: INFO - + Mar 03 16:43:16 YNH-S1S php-fpm7.3[21856]: [03-Mar-2021 16:43:16] ERROR: FPM initialization failed
2021-03-03 16:43:16,130: INFO - + Mar 03 16:43:16 YNH-S1S systemd[1]: php7.3-fpm.service: Main process exited, code=exited, status=78/CONFIG
2021-03-03 16:43:16,130: INFO - + Mar 03 16:43:16 YNH-S1S systemd[1]: php7.3-fpm.service: Failed with result 'exit-code'.
2021-03-03 16:43:16,130: INFO - + Mar 03 16:43:16 YNH-S1S systemd[1]: Failed to start The PHP 7.3 FastCGI Process Manager.
2021-03-03 16:43:16,231: WARNING - Errors were encountered while processing:
2021-03-03 16:43:16,231: WARNING -  php7.3-fpm
2021-03-03 16:43:16,637: WARNING - E: Sub-process /usr/bin/dpkg returned an error code (1)
2021-03-03 16:43:17,057: WARNING - Could not upgrade packages: grub-common, grub-efi-amd64-bin, grub-efi-amd64-signed, grub-efi-amd64, grub2-common, libpcre3, libzstd1, php-pear, php5.6-common, php7.0-bcmath, php7.0-cli, php7.0-common, php7.0-curl, php7.0-fpm, php7.0-gd, php7.0-intl, php7.0-json, php7.0-ldap, php7.0-mbstring, php7.0-mcrypt, php7.0-mysql, php7.0-opcache, php7.0-readline, php7.0-xml, php7.0-zip, php7.1-common, php7.3-bz2, php7.3-cli, php7.3-curl, php7.3-readline, php7.3-redis, php7.3-smbclient, php7.3-ssh2, php7.3, php7.4-cli, php7.4-common, php7.4-curl, php7.4-fpm, php7.4-gd, php7.4-intl, php7.4-json, php7.4-ldap, php7.4-mbstring, php7.4-mysql, php7.4-opcache, php7.4-readline, php7.4-xml, php8.0-cli, php8.0-common, php8.0-curl, php8.0-fpm, php8.0-gd, php8.0-intl, php8.0-ldap, php8.0-mbstring, php8.0-mysql, php8.0-opcache, php8.0-readline, php8.0-xml, php8.0-zip

Full log here:

I forgot another important detail php-fpm7.3 service wasn’t able to restart.

I also tried to uninstall the drupal app i have and got errors:

Uuuuuh wokay, so let’s start by running :

ls -ld /var/run/php

I’m assuming this gonna say this folder doesnt exists ?

Thanks for yor replay.

Yeah, it doesn’t.
Also, I’ve upgraded to this version through the migration process. And it worked, all was working fine till today, when I tried the above.

Edit, adding the output of the command:

admin@YNH-XXX ~ $ ls -ld /var/run/php
ls: cannot access '/var/run/php': No such file or directory
admin@YNH-XXX ~ $

I’m trying to figure out the problem. Please forgive me for anything foolish you may see here, but I’m not an expert.

The files that are pointing to the non-existent folder /var/run/php/ are located in the folder /etc/php/fpm/pool.d/, all the ‘.conf’ files.

That makes me think that either that folder is now located somewhere else, or they were removed somehow.
What I’m going to do is to restore on another machine the backup image I made before the migration to YNH4. I will come back here with the results.

And here I am, with an update, I just learned how to search by file name using wildcards.
The result:

sudo find / -name '*.sock'

I hoped the folder with the .sock files was just somewhere else, but that’s not the case.
Reading around, seems like those files are created dynamically, but I’m not sure.

I created the php folder under /run, tried to restart the php fpm 7.3 service and it actually worked!

I almost forgot, I have to see if now the update shell command works…

1 Like

Package update worked with no errors.

can I say ‘good job!’ to myself?


Good job :+1:

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.