Migration errors after upgrade from jessie to stretch

My YunoHost server

Hardware: Other ARM board – Odroid C1
YunoHost version: 3.8.5.5
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I upgraded from Jessie to Stretch using apt (very late, I know), then did a yunohost tools update and upgrade and now I get the following output when running yunohost tools migration migrate:

Info: Running migration 0003_migrate_to_stretch...
Error: Migration 0003_migrate_to_stretch did not complete, aborting. Error: The current Debian distribution is not Jessie!
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20200731-135454-tools_migrations_migrate_forward --share' to get help
Error: Run these migrations: '0003_migrate_to_stretch', before migration 0004_php5_to_php7_pools.
Error: Run these migrations: '0003_migrate_to_stretch', before migration 0005_postgresql_9p4_to_9p6.
Warning: To run the migration 0015_migrate_to_buster, your must accept the following disclaimer:
---
N.B.: This migration has been tested by the community over the last few months but has only been declared stable recently. If your server hosts critical services and if you are not too confident with debugging possible issues, we recommend you to wait a little bit more while we gather more feedback and polish things up. If on the other hand you are relatively confident with debugging small issues that may arise, you are encouraged to run this migration ;)! You can read about remaining known issues and feedback from the community here: https://forum.yunohost.org/t/12195

Please note that this migration is a delicate operation. The YunoHost team did its best to review and test it, but the migration might still break parts of the system or its apps.

Therefore, it is recommended to:
    - Perform a backup of any critical data or app. More info on https://yunohost.org/backup;
    - Be patient after launching the migration: Depending on your Internet connection and hardware, it might take up to a few hours for everything to upgrade.
---
If you accept to run the migration, please re-run the command with the option '--accept-disclaimer'.

How should I proceed from here? I would like to upgrade to Buster, too…

First, for some reason yunohost thinks you still have to run the stretch->buster migration, probably because you upgraded manually with apt

So let’s skip it with :

yunohost tools migrations migrate --skip 0003_migrate_to_stretch

Then let’s re-run the migrations with

yunohost tools migrations migrate

Supposedly it should run the migrations 0004_php5_to_php7_pools and 0005_postgresql_9p4_to_9p6

Then only after you are sure every other pending migration is ran, you can read the disclaimer for the buster migration (c.f. your previous copypasted log) and run (as suggested by the log) :

yunohost tools migrations migrate --accept-disclaimer

Note that you can also do this from the webadmin in a more user-friendly way

Great, thanks for the command to skip a migration, @Aleks!

Now all migrations – except the one for Buster – ran through.

However, I noticed my apps are not upgraded yet. But running yunohost upgrade --apps I get this output:

Info: The following apps will be upgraded: phpmyadmin, baikal, kanboard, wallabag2, agendav, jirafeau, hextris, nextcloud, transmission, my_webapp, rainloop, opensondage, shellinabox, ttrss, dokuwiki, wordpress, zerobin
Info: Now upgrading phpmyadmin...
Info: [....................] > Loading installation settings...
Info: [+...................] > Ensuring downward compatibility...
Info: [#+++++..............] > Backing up the app before upgrading (may take a while)...
Info: [######++............] > Upgrading source files...
Info: [########+...........] > Upgrading nginx web server configuration...
Warning: File /etc/nginx/conf.d/odroid.p3k.org.d/phpmyadmin.conf has been manually modified since the installation or last upgrade. So it has been duplicated in /home/yunohost.conf/backup//etc/nginx/conf.d/odroid.p3k.org.d/phpmyadmin.conf.backup.20200731.165721
Warning: --- /home/yunohost.conf/backup//etc/nginx/conf.d/odroid.p3k.org.d/phpmyadmin.conf.backup.20200731.165721	2020-07-31 16:54:41.604183853 +0200
Warning: +++ /etc/nginx/conf.d/odroid.p3k.org.d/phpmyadmin.conf	2020-07-31 16:57:41.415609125 +0200
Warning: @@ -1,7 +1,10 @@
Warning: -location /phpmyadmin {
Warning: + rewrite ^/phpmyadmin$ /phpmyadmin/ permanent;
Warning: +location /phpmyadmin/ {
Warning: 
Warning: +  # Path to source
Warning:    alias /var/www/phpmyadmin/ ;
Warning: 
Warning: +  # Force usage of https
Warning:    if ($scheme = http) {
Warning:      rewrite ^ https://$server_name$request_uri? permanent;
Warning:    }
Warning: @@ -13,7 +16,7 @@
Warning:    try_files $uri $uri/ index.php;
Warning:    location ~ [^/]\.php(/|$) {
Warning:      fastcgi_split_path_info ^(.+?\.php)(/.*)$;
Warning: -    fastcgi_pass unix:/run/php/php7.0-fpm-phpmyadmin.sock;
Warning: +    fastcgi_pass unix:/var/run/php/php7.0-fpm-phpmyadmin.sock;
Warning:      fastcgi_index index.php;
Warning:      include fastcgi_params;
Warning:      fastcgi_param   REMOTE_USER     $remote_user;
Info: [#########...........] > Making sure dedicated system user exists...
Info: [#########+..........] > Upgrading php-fpm configuration...
Info: [##########+.........] > Upgrading database...
Info: [###########.........] > Reconfiguring phpmyadmin...
Info: [###########+++++++..] > Upgrading dependencies with Composer...
Warning: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Warning: [Error] Upgrade failed.
Warning: Job for php7.0-fpm.service failed because the control process exited with error code.
Warning: See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
Warning: [Error] Jul 31 16:33:50 systemd[1]: Reloaded The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:36:12 systemd[1]: Reloading The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:36:12 systemd[1]: Reloaded The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:54:32 systemd[1]: Stopping The PHP 7.0 FastCGI Process Manager...
Warning: Jul 31 16:54:32 systemd[1]: Stopped The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:54:32 systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Warning: Jul 31 16:54:33 systemd[1]: Started The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:58:09 systemd[1]: Reloading The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:58:09 systemd[1]: Reloaded The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:58:09 systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Warning: Jul 31 16:58:09 systemd[1]: php7.0-fpm.service: Unit entered failed state.
Warning: Jul 31 16:58:09 systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
Warning: Jul 31 16:59:44 systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Warning: Jul 31 16:59:45 php-fpm7.0[18201]: [31-Jul-2020 16:59:45] ERROR: [pool phpmyadmin] the chdir path '/var/www/phpmyadmin' does not exist or is not a directory
Warning: Jul 31 16:59:45 php-fpm7.0[18201]: [31-Jul-2020 16:59:45] ERROR: failed to post process the configuration
Warning: Jul 31 16:59:45 php-fpm7.0[18201]: [31-Jul-2020 16:59:45] ERROR: FPM initialization failed
Warning: Jul 31 16:59:45 systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Warning: Jul 31 16:59:45 systemd[1]: Failed to start The PHP 7.0 FastCGI Process Manager.
Warning: Jul 31 16:59:45 systemd[1]: php7.0-fpm.service: Unit entered failed state.
Warning: Jul 31 16:59:45 systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
Warning: 
Warning: phpmyadmin has not been properly removed
Warning: This action seems to have broken these important services: php7.0-fpm
Warning: 115843 php7.0-fpm.service is not active, cannot reload.
Warning: 115896 Could not restore phpmyadmin
Warning: Traceback (most recent call last):
Warning:   File "/usr/lib/moulinette/yunohost/backup.py", line 1407, in _restore_app
Warning:     env=env_dict)[0]
Warning:   File "/usr/lib/moulinette/yunohost/hook.py", line 347, in hook_exec
Warning:     raise YunohostError('hook_exec_failed', path=path)
Warning: YunohostError: Could not run script: /tmp/restore7JCTQv/restore
Warning: 116013 Here's an extract of the logs before the crash. It might help debugging the error:
Warning: 131092 Job for php7.0-fpm.service failed because the control process exited with error code.
Warning: 131096 See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
Warning: 131111 [Error] Jul 31 16:58:09 systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Warning: 131114 Jul 31 16:58:09 systemd[1]: php7.0-fpm.service: Unit entered failed state.
Warning: 131117 Jul 31 16:58:09 systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
Warning: 131121 Jul 31 16:59:44 systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Warning: 131124 Jul 31 16:59:45 php-fpm7.0[18201]: [31-Jul-2020 16:59:45] ERROR: [pool phpmyadmin] the chdir path '/var/www/phpmyadmin' does not exist or is not a directory
Warning: 131128 Jul 31 16:59:45 php-fpm7.0[18201]: [31-Jul-2020 16:59:45] ERROR: failed to post process the configuration
Warning: 131131 Jul 31 16:59:45 php-fpm7.0[18201]: [31-Jul-2020 16:59:45] ERROR: FPM initialization failed
Warning: 131134 Jul 31 16:59:45 systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Warning: 131137 Jul 31 16:59:45 systemd[1]: Failed to start The PHP 7.0 FastCGI Process Manager.
Warning: 131140 Jul 31 16:59:45 systemd[1]: php7.0-fpm.service: Unit entered failed state.
Warning: 131142 Jul 31 16:59:45 systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
Warning: 131145 Jul 31 17:01:45 systemd[1]: php7.0-fpm.service: Unit cannot be reloaded because it is inactive.
Warning: 131148 Jul 31 17:02:00 systemd[1]: Starting The PHP 7.0 FastCGI Process Manager...
Warning: 131150 Jul 31 17:02:00 php-fpm7.0[18744]: [31-Jul-2020 17:02:00] ERROR: [pool phpmyadmin] the chdir path '/var/www/phpmyadmin' does not exist or is not a directory
Warning: 131153 Jul 31 17:02:00 php-fpm7.0[18744]: [31-Jul-2020 17:02:00] ERROR: failed to post process the configuration
Warning: 131156 Jul 31 17:02:00 php-fpm7.0[18744]: [31-Jul-2020 17:02:00] ERROR: FPM initialization failed
Warning: 131158 Jul 31 17:02:00 systemd[1]: php7.0-fpm.service: Main process exited, code=exited, status=78/n/a
Warning: 131161 Jul 31 17:02:00 systemd[1]: Failed to start The PHP 7.0 FastCGI Process Manager.
Warning: 131164 Jul 31 17:02:00 systemd[1]: php7.0-fpm.service: Unit entered failed state.
Warning: 131167 Jul 31 17:02:00 systemd[1]: php7.0-fpm.service: Failed with result 'exit-code'.
Warning: 131171
Warning: 131451 phpmyadmin has not been properly removed
Warning: 133500 Nothing was restored
Warning: The app was restored to the way it was before the failed upgrade.
Error: Could not upgrade phpmyadmin: An error occurred inside the app upgrade script
Info: The operation 'Upgrade the 'phpmyadmin' app' could not be completed. Please share the full log of this operation using the command 'yunohost log display 20200731-145503-app_upgrade-phpmyadmin --share' to get help
Warning: Here's an extract of the logs before the crash. It might help debugging the error:
Info: DEBUG - + COMPOSER_HOME=/var/www/phpmyadmin/.composer
Info: DEBUG - + php7.0 -- --quiet --install-dir=/var/www/phpmyadmin
Info: DEBUG - + ynh_composer_exec --phpversion=7.0 --workdir=/var/www/phpmyadmin '--commands=install --no-dev'
Info: INFO - [###########+++++++..] > Upgrading dependencies with Composer...
Info: DEBUG - + declare -Ar args_array
Info: DEBUG - + workdir=/var/www/phpmyadmin
Info: DEBUG - + phpversion=7.0
Info: DEBUG - + COMPOSER_HOME=/var/www/phpmyadmin/.composer
Info: DEBUG - + php7.0 /var/www/phpmyadmin/composer.phar install --no-dev -d /var/www/phpmyadmin --quiet --no-interaction
Info: WARNING - Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run `composer update` or `composer update <package name>`.
Info: DEBUG - + ynh_exec_warn_less ynh_composer_exec '--commands="update' '--no-dev"'
Info: DEBUG - + eval ynh_composer_exec '--commands="update' '--no-dev"'
Info: DEBUG - ++ ynh_composer_exec '--commands=update --no-dev'
Info: DEBUG - ++ declare -Ar args_array
Info: DEBUG - ++ workdir=/var/www/phpmyadmin
Info: DEBUG - ++ phpversion=7.0
Info: DEBUG - ++ COMPOSER_HOME=/var/www/phpmyadmin/.composer
Info: DEBUG - ++ php7.0 /var/www/phpmyadmin/composer.phar update --no-dev -d /var/www/phpmyadmin --quiet --no-interaction
Info: DEBUG - Your requirements could not be resolved to an installable set of packages.
Info: DEBUG - Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
Info: DEBUG - + ynh_exit_properly
Error: Could not upgrade phpmyadmin: This action seems to have broken these important services: php7.0-fpm
Error: The app 'phpmyadmin' failed to upgrade, and as a consequence the following apps' upgrades have been cancelled: phpmyadmin, baikal, kanboard, wallabag2, agendav, jirafeau, hextris, nextcloud, transmission, my_webapp, rainloop, opensondage, shellinabox, ttrss, dokuwiki, wordpress, zerobin
Error: None

What is the best way to continue from here? Running the migration to Buster, anyway?

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