Migration to Yunohost 11 failed

Hi everyone, i encountered a problem doing the migration to Yunohost 11.

My YunoHost server

Hardware: Old laptop or computer
YunoHost version: 11.0.9.9
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

I tried to do the migration via the web interface two days ago. It didnt showed any error messages, but after rebooting the server the web interface showed an error saying the yunohost-admin packaged does not match the yunohost version. To investigate, i opened a SSH connection and typed in

yunohost diagnosis show

with the following output:

reports: 
  0: 
    description: Base system
    id: basesystem
    items: 
      0: 
        details: Server model is MICRO-STAR INTERNATIONAL CO., LTD MS-B09611
        status: INFO
        summary: Server hardware architecture is bare-metal amd64
      1: 
        status: INFO
        summary: Server is running Linux kernel 5.10.0-17-amd64
      2: 
        status: INFO
        summary: Server is running Debian 11.4
      3: 
        details: 
          - yunohost version: 11.0.9.9 (stable)
          - yunohost-admin version: ? (stable)
          - moulinette version: 11.0.9 (stable)
          - ssowat version: 11.0.9 (stable)
        status: ERROR
        summary: You are running inconsistent versions of the YunoHost packages... most probably because of a failed or partial upgrade.

Then i tried to upgrade the yunohost-admin package by using apt update and apt upgrade, which yield the following error:

root@rebexter:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up yunohost (11.0.9.9) ...
Regenerating configuration, this might take a while...
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/15-nginx
Success! Configuration updated for 'dnsmasq'
Launching migrations...
Info: No migrations to run
Re-diagnosing server health...
Error: Found 1 significant issue(s) related to Base system!
Success! Everything looks OK for Internet connectivity!
/var/lib/dpkg/info/yunohost.postinst: line 5: 148486 Illegal instruction     yunohost diagnosis run --force
dpkg: error processing package yunohost (--configure):
 installed yunohost package post-installation script subprocess returned error exit status 132
Errors were encountered while processing:
 yunohost
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@rebexter:~# 

Im a bit at loss at what to try next, if you need any other logs i will provide them, if anyone has another suggestion i would be glad.

Thanks in advance and have a nice day!


Uuuuh wut x_x

Sounds like nginx is also in trouble so let’s check quickly if it’s happy or not with nginx -t

Regarding yunohost-admin, let’s check its version with dpkg --list | grep yunohost-admin

Thanks for the quick reply!

Checking nginx:

root@rebexter:~# nginx -t
nginx: [warn] could not build optimal proxy_headers_hash, you should increase either proxy_headers_hash_max_size: 512 or proxy_headers_hash_bucket_size: 64; ignoring proxy_headers_hash_bucket_size
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Regarding yunohost-admin, i just remembered that i tried to remove it (which also failed, but i dont have the error message anymore) after it failed to upgrade, therefore dpkg --list cant find it.

Should i try reinstalling or trying to remove it again?

Zblerg so yeah i think it’s a edge case the diagnosis was not designed to handle (yunohost-admin being uninstalled, since yunohost-admin is indeed not mandatory to have installed)

1 Like

Ok so this is the output i get when trying to install yunohost-admin again:

root@rebexter:~# apt install yunohost-admin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  yunohost-admin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/6,973 kB of archives.
After this operation, 14.9 MB of additional disk space will be used.
Setting up yunohost (11.0.9.9) ...
Regenerating configuration, this might take a while...
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/15-nginx
Success! Configuration updated for 'dnsmasq'
Launching migrations...
Info: No migrations to run
Re-diagnosing server health...
Error: Found 1 significant issue(s) related to Base system!
Success! Everything looks OK for Internet connectivity!
/var/lib/dpkg/info/yunohost.postinst: line 5: 159035 Illegal instruction     yunohost diagnosis run --force
dpkg: error processing package yunohost (--configure):
 installed yunohost package post-installation script subprocess returned error exit status 132
Errors were encountered while processing:
 yunohost
E: Sub-process /usr/bin/dpkg returned an error code (1)

and this is the output i get when trying to remove yunohost-admin:

root@rebexter:~# apt remove yunohost-admin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'yunohost-admin' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up yunohost (11.0.9.9) ...
Regenerating configuration, this might take a while...
Error: Could not run script: /usr/share/yunohost/hooks/conf_regen/15-nginx
Success! Configuration updated for 'dnsmasq'
Warning: slapcat: error writing output.
Launching migrations...
Info: No migrations to run
Re-diagnosing server health...
Error: Found 1 significant issue(s) related to Base system!
Success! Everything looks OK for Internet connectivity!
/var/lib/dpkg/info/yunohost.postinst: line 5: 160850 Illegal instruction     yunohost diagnosis run --force
dpkg: error processing package yunohost (--configure):
 installed yunohost package post-installation script subprocess returned error exit status 132
Errors were encountered while processing:
 yunohost
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@rebexter:~# 

Well this is kind of a dumb situation im in i guess…

Mokay so let’s dig in the issues …

About the nginx issue, let’s look at

yunohost tools regen-conf nginx --debug

(and share the result ideally on paste.yunohost.org), that should allow to pinpoint the nginx issue

And the debian postinst issue is a bit trickier

You should run nano /var/lib/dpkg/info/yunohost.postinst, you will see a file looking like this : yunohost/postinst at dev · YunoHost/yunohost · GitHub

You need to edit the third line and replace set -e with set -ex (this is to enable debugging info)

Then save/quit nano using Ctrl+X, then (Y)es to validate, and Enter when asked which file to save to (= we just want to save to the same file)

Then retrigger the debian postinst with this command:

/var/lib/dpkg/info/yunohost.postinst configure

Alright. Regarding the nginx issue, this is the output i get:
https://paste.yunohost.org/raw/ufefidekus

And regarding the debian postinst:
https://paste.yunohost.org/owigokenis

Hm both show an error trying to run the 15-nginx script…

Hmpf sounds like something is broken because no yunohost command can run, or some specific stuff happening in some yunohost command cause a huge crash with “Illegal instruction” x_x

We can keep digging in, maybe running yunohost domain cert status --debug will bring more info where it crashes …

Alright that command gives me the following output:
https://paste.yunohost.org/lilahemuzu.rb

Mokay so maybe lets look at dpkg --print-architecture and uname -a to check what architecture you are running exactly

Well lets take a look:
https://paste.yunohost.org/igufawukum.rb

Mokay, re-reading the log, I suspect the issue lies in maybe yunohost domain list ? Let’s try just yunohost domain list --debug ? I’m suspecting it will also display Illegal instruction before any actual useful info

Maybe we can also try yunohost tools shell --debug … Theoretically this opens a shell … if it really does, just run Ctrl+D to quit it but it may just crash as well

(Im suspecting maybe the issue lies in the interface with LDAP)

Ok so this is the output of yunohost domain list --debug:
https://paste.yunohost.org/epoyocuwav.rb

And the shell does open, with the following output:
https://paste.yunohost.org/acohugamid.rb

Hope this helps to narrow it down.

Well i have a backup of my server that is 14 days old. Would you advise to just reinstall using the old yunohost image, roll everything back and then try the update again?

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