# Stuck in an upgrade/migration loop

**URL:** <https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042>\
**Category:** Support\
**Tags:** raspberrypi, migration, update, bookworm, english\
**Created:** [January 27, 2025, 10:23am UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042 "2025-01-27T10:23:26Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 27, 2025, 10:23am UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/1 "2025-01-27T10:23:26Z")

</div>

**What type of hardware are you using** : Raspberry Pi 3, 4+  
**What YunoHost version are you running** : 11.3.0.2  
**How are you able to access your server** : The webadmin  
SSH

### Describe your issue

Hi!

I was about to upgrade an app when this error appeared:

```auto
$ sudo yunohost app upgrade --force bookstack 1 ↵
Info: Now upgrading bookstack…
Error: This app requires YunoHost >= 12.0.9 but current installed version is 11.3.0.2

```

Glad that I got the information, I ran the migration command to continue the process.

But then, I got this error:

```auto
$ sudo yunohost tools migrations run --accept-disclaimer
Info: Running migration 0027_migrate_to_bookworm…
Info: Fetching available upgrades for system packages…
Error: Migration 0027_migrate_to_bookworm did not complete, aborting. Error: Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bookworm.
Info: The operation 'Run migrations' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20250127-101219-tools_migrations_migrate_forward' to get help

```

It seems that both actions are blocked by the other, and I have no idea how to fix this.

This is not the only app that’s giving me the need for migration, btw.

Thanks!

### Share relevant logs or error messages

ended\_at: 2025-01-27 10:12:57.818465  
error: ‘Migration 0027\_migrate\_to\_bookworm did not complete, aborting. Error: Your  
system is not fully up-to-date. Please perform a regular upgrade before running  
the migration to Bookworm.’  
interface: cli  
operation: tools\_migrations\_migrate\_forward  
parent: null  
started\_at: 2025-01-27 10:12:19.206780  
success: false  
yunohost\_version: 11.3.0.2

============

2025-01-27 11:12:19,323: INFO - Running migration 0027\_migrate\_to\_bookworm…  
2025-01-27 11:12:19,355: INFO - Fetching available upgrades for system packages…  
2025-01-27 11:12:19,978: DEBUG - Hit:2 [Index of /debian](http://archive.raspberrypi.org/debian) bullseye InRelease  
2025-01-27 11:12:20,027: DEBUG - Hit:3 [https://packages.sury.org/php](https://packages.sury.org/php) bullseye InRelease  
2025-01-27 11:12:20,124: DEBUG - Hit:1 [Index of /debian/](https://forge.yunohost.org/debian) bullseye InRelease  
2025-01-27 11:12:20,211: DEBUG - Get:4 [mirror.fra1.de.leaseweb.net | powered by Leaseweb](http://mirror.de.leaseweb.net/raspbian/raspbian) bullseye InRelease [15.0 kB]  
2025-01-27 11:12:22,210: DEBUG - Fetched 15.0 kB in 2s (6493 B/s)  
2025-01-27 11:12:32,067: DEBUG - Reading package lists…  
2025-01-27 11:12:54,747: DEBUG - Done  
2025-01-27 11:12:54,764: DEBUG - Loading migration 0022\_php73\_to\_php74\_pools…  
2025-01-27 11:12:54,765: DEBUG - Loading migration 0025\_global\_settings\_to\_configpanel…  
2025-01-27 11:12:54,766: DEBUG - Loading migration 0024\_rebuild\_python\_venv…  
2025-01-27 11:12:54,767: DEBUG - Loading migration 0021\_migrate\_to\_bullseye…  
2025-01-27 11:12:54,769: DEBUG - Loading migration 0023\_postgresql\_11\_to\_13…  
2025-01-27 11:12:54,769: DEBUG - Loading migration 0026\_new\_admins\_group…  
2025-01-27 11:12:54,770: DEBUG - Loading migration 0027\_migrate\_to\_bookworm…  
2025-01-27 11:12:57,808: ERROR - Migration 0027\_migrate\_to\_bookworm did not complete, aborting. Error: Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bookworm.  
Traceback (most recent call last):  
File “/usr/lib/python3/dist-packages/yunohost/tools.py”, line 786, in tools\_migrations\_run  
migration.run()  
File “/usr/lib/python3/dist-packages/yunohost/migrations/0027\_migrate\_to\_bookworm.py”, line 98, in run  
self.check\_assertions()  
File “/usr/lib/python3/dist-packages/yunohost/migrations/0027\_migrate\_to\_bookworm.py”, line 376, in check\_assertions  
raise YunohostError(“migration\_0027\_system\_not\_fully\_up\_to\_date”)  
yunohost.utils.error.YunohostError: Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bookworm.

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 27, 2025, 12:44pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/2 "2025-01-27T12:44:12Z")

</div>

Hi Von,

Welcome to the forums!

> [@Von](#):
>
> ```auto
> Error: Migration 0027_migrate_to_bookworm did not complete, aborting. 
> Error: Your system is not fully up-to-date. Please perform a regular upgrade before running the migration to Bookworm.
> 
> ```

I think this refers to a regular `apt upgrade && apt update `. It makes sure all packages are at the (known) last available version for Debian 11 / Bullseye.

From there they can be upgraded to the versions provided by Debian 12 / Bookworm during the migration.

Please run

```auto
$ sudo apt update
$ sudo apt upgrade

```

and post the output if any errors occur.

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 27, 2025, 2:11pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/3 "2025-01-27T14:11:59Z")

</div>

Hey! Thank you for your answer 🙂

It seems like it. I ran the update + upgrade, and was greeted with:

```auto
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  gcc-8-base
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

```

After few searches, I read that it might not be recommended to call the `--only-upgrade` option.

Should I just wait then ?

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 27, 2025, 2:29pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/4 "2025-01-27T14:29:26Z")

</div>

> [@Von](#):
>
> ```auto
> The following packages have been kept back:
> gcc-8-base
> 
> ```

You _could_ try removing gcc-8-base.

If I suggest my Yunohost to do so, a small number of extra packages is also uninstalled:

```auto
$ sudo apt remove gcc-8-base
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libasan3 libcilkrts5 libubsan0
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  gcc-6 gcc-8-base libgcc-6-dev libgcc1 libmpx2
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
After this operation, 39.2 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.
$

```

After that try `apt update` and `apt upgrade` once more to find if there are no more upgradeable packages, and restart the migration.

In case the migration still complains about being not fully up to date, about how many apps are installed on your Yunohost? How many of them have a new version, but state that they depend on YNH12 before they can upgrade? You may tray upgrading them one by one, to find out of any of them still can be upgraded on YNH11

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 27, 2025, 5:02pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/5 "2025-01-27T17:02:24Z")

</div>

The migration started!

But then it failed…

Here is the log: [https://paste.yunohost.org/raw/uqanoxuwuv](https://paste.yunohost.org/raw/uqanoxuwuv)

And now, every yunohost command gets an exception:

```auto
Traceback (most recent call last):
  File "/usr/lib/python3.11/logging/config.py", line 389, in resolve
    found = getattr(found, frag)
            ^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'moulinette.interfaces' has no attribute 'api'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/logging/config.py", line 391, in resolve
    self.importer(used)
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/api.py", line 16, in <module>
    from bottle import request, response, Bottle, HTTPResponse, FileUpload
  File "/usr/lib/python3/dist-packages/bottle.py", line 44, in <module>
    from inspect import getargspec
ImportError: cannot import name 'getargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.11/logging/config.py", line 562, in configure
    handler = self.configure_handler(handlers[name])
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/config.py", line 724, in configure_handler
    klass = self.resolve(cname)
            ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/logging/config.py", line 396, in resolve
    raise v from e
ValueError: Cannot resolve 'moulinette.interfaces.api.APIQueueHandler': cannot import name 'getargspec' from 'inspect' (/usr/lib/python3.11/inspect.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/yunohost", line 77, in <module>
    yunohost.cli(
  File "/usr/lib/python3/dist-packages/yunohost/ __init__.py", line 35, in cli
    init_logging(interface="cli", debug=debug, quiet=quiet)
  File "/usr/lib/python3/dist-packages/yunohost/ __init__.py", line 168, in init_logging
    configure_logging(logging_configuration)
  File "/usr/lib/python3/dist-packages/moulinette/utils/log.py", line 67, in configure_logging
    dictConfig(logging_config)
  File "/usr/lib/python3.11/logging/config.py", line 812, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib/python3.11/logging/config.py", line 569, in configure
    raise ValueError('Unable to configure handler '
ValueError: Unable to configure handler 'api'

```

Should I create a new topic? So sorry to bother…

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 27, 2025, 7:02pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/6 "2025-01-27T19:02:55Z")

</div>

> [@Von](#):
>
> So sorry to bother…

Without that it’d be a silent forum… 🤣

From the log:

```auto
2025-01-27 16:15:50,392: DEBUG - 793 packages upgraded, 179 newly installed, 89 to remove and 8 not upgraded.
2025-01-27 16:15:50,392: DEBUG - Need to get 576 MB/576 MB of archives. After unpacking 454 MB will be used.
2025-01-27 16:15:56,423: INFO - Downloading...
2025-01-27 16:23:32,881: WARNING - E: Failed to fetch http://mirror.de.leaseweb.net/raspbian/raspbian/pool/main/m/mailutils/libmailutils9_3.15-4_armhf.deb: Error reading from server - read (32: Broken pipe) [IP: 37.58.58.140 80]
2025-01-27 16:23:32,889: WARNING - E: Unable to fetch some packages; try '-o APT::Get::Fix-Missing=true' to continue with missing packages
2025-01-27 16:25:54,087: ERROR - Migration 0027_migrate_to_bookworm did not complete, aborting. Error: Failed to run command 'aptitude full-upgrade --show-why -o 

```

Checking that location,

 ![image](https://forum.yunohost.org/uploads/default/original/2X/e/e92302aa868f945367c3deb9c71f215ef392838b.png)

it seems available.

With some luck, `wget` is installed on your Yunohost. Would you try

```auto
$ wget http://mirror.de.leaseweb.net/raspbian/raspbian/pool/main/m/mailutils/libmailutils9_3.15-4_armhf.deb

```

to confirm your Yunohost can reach the mirror?

It’s inconvenient that the `yunohost`-commands broke. You could try once again to kick off the migration command, but if it does not work, we can manually continue the upgrade from Bullseye to Bookworm with the command line that can be found in the log:

```auto
2025-01-27 16:15:14,992: DEBUG - Running: LC_ALL=C DEBIAN_FRONTEND=noninteractive APT_LISTCHANGES_FRONTEND=none aptitude full-upgrade --show-why -o Dpkg::Options::='--force-confold' --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"

```

so,

```auto
$ sudo aptitude full-upgrade --show-why -o Dpkg::Options::='--force-confold' --quiet=2 -o=Dpkg::Use-Pty=0 -o "APT::Status-Fd=$YNH_STDINFO"

```

should return the whole bunch of complaints that you also see in the log (sooo many packages to install, unmet dependencies, suggested solution). Compare to see that it is about the similar list (should be exact, but as all planets are about to be aligned, you never know…)

Once that is done, run `apt upgade && apgrade` once again, then try running the migration once more via the `yunohost`-command.

If that still does not work, it may be time to get the pro’s involved. I’ve had the Yunohost commands broken and repaired again, but I’m not too familiar with the ways in which they can get broken.

So, to summarize:

- migration was cancelled after the first package could not be downloaded
- check that the mirror is actually available from your Yunohost
- try running the yunohost-migration
  - if that one does not work, run the complicated `aptitude` command from the log

- run apt update and upgrade
- try restarting the yunohost-migration

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 28, 2025, 11:05am UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/7 "2025-01-28T11:05:27Z")

</div>

Hey!

First of all, thank you for the detailed answer.

Here’s what happened:

I ran the command to manually continue the upgrade and it went through it without error. I accepted that the sshd and dovecot config would upgrade and override the current config well.

Then I proceeded to update/upgrade again, and this is what I was greeted with:

```auto
$ sudo apt update
sudo: you do not exist in the passwd database

```

That didn’t felt right, but I managed to run the commands by becoming root instead of admin. 8 packages were upgraded.

Then I ran the migration again, and got few LDAP errors. It continued and broke at the `Regenerate system configurations 'nsswitch'` operation.  
Here are the related logs:

- [https://paste.yunohost.org/raw/xirofilaqa](https://paste.yunohost.org/raw/xirofilaqa)
- [https://paste.yunohost.org/raw/defajixoma](https://paste.yunohost.org/raw/defajixoma)

I wanted to check the users in the webadmin, and got the same error:  
**Error** : `"500" `  
**Action** : `"GET" /yunohost/api/domains?locale=en`  
**Error message:**

```auto
error during LDAP search operation with: base='ou=domains,dc=yunohost,dc=org', filter='virtualdomain=*', attrs=['virtualdomain'] and exception {'desc': 'No such object'}

```

It seems kinda bad from my perspective 😬 , but I’m not an expert on LDAP

**Edit:** I thought it was a good idea to reboot, when in doubt… I can’t access by ssh, stating “Too many authentication failures”  
But I can access the webadmin by local IP, enven though my login is granted by “Wrong password or username”

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 28, 2025, 9:53pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/8 "2025-01-28T21:53:02Z")

</div>

So, that started off well enough, but the fun didn’t last.

> [@Von](#):
>
> **Edit:** I thought it was a good idea to reboot,

When faced with authentication failures, it’s always nice to have a root-session at hand. Rebooting may let you lose it. So, SSH does not allow you back in? If you still can get in via the webadmin, you may be able to install a [web-terminal](https://apps.yunohost.org/catalog?search=terminal). It’s less comfortable than a regular terminal, but will let you repair the system in times of need.

In case the configuration for `nsswitch` is broken, I’ll paste mine below so you can compare, and seeing no item related to my specific server, try copying it to yours:

```auto
$ cat /etc/nsswitch.conf 
# /etc/nsswitch.conf

passwd: files systemd ldap
group: files systemd ldap
shadow: files ldap
gshadow: files

hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns
networks: files

protocols: db files
services: db files
ethers: db files
rpc: db files

netgroup: nis
sudoers: files ldap

```

There was something else I’d thought to write, but between starting the post and coming back home, it slipped my mind.

If there’s any other user you can use to gain `sudo`, that would be helpful of course!

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 29, 2025, 8:40am UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/9 "2025-01-29T08:40:59Z")

</div>

Yes, it was too late when I realized I had a bad idea rebooting…

Unfortunately, I can’t get in via the webadmin, the users are not found.

I think the only user left is root, so I’ll try to find the time to physically connect to the server today, for direct connection on the machine.

I’ll keep you posted. Thanks!

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 29, 2025, 9:07am UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/10 "2025-01-29T09:07:05Z")

</div>

> [@Von](#):
>
> I can’t get in

Ah, that’s nasty ☹

> [@Von](#):
>
> I’ll try to find the time to physically connect to the server

If that does not work, you could try mounting the SD card on another (Linux) computer, and check the contents of `/etc/nsswitch.conf` there.

You could then also change some files to (be able to) reset passwords (either by changing `/boot/cmdline.txt` or `/etc/shadow` and `/etc/passwd`, as explained on [pi 3 - Resseting password using init=/bin/sh - Keyboard doesn't work - Raspberry Pi Stack Exchange](https://raspberrypi.stackexchange.com/questions/85146/resseting-password-using-init-bin-sh-keyboard-doesnt-work) and the referenced [ssh - Change/reset password WITHOUT monitor/keyboard - Raspberry Pi Stack Exchange](https://raspberrypi.stackexchange.com/questions/24770/change-reset-password-without-monitor-keyboard))

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 29, 2025, 2:31pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/11 "2025-01-29T14:31:43Z")

</div>

Hey! New day, new tries!

I did as suggested and tweaked the SD card directly. I rebooted the server and even though I couldn’t access it locally, I was able to get in from ssh by accessing it via another server.  
To summarize: I have root access again.

About the nsswitch.conf file, I had the same content, without the last line (which I added):  
`sudoers: files ldap`

But my yunohost users don’t appear in my shadow file. I tried to add the `admin` manually, with a `useradd` and setting a password, but it didn’t give me access to the weblogin. It might be a group issue.

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 29, 2025, 4:50pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/12 "2025-01-29T16:50:53Z")

</div>

We’re not there yet, but it sure looks like progress.

Without access to the webadmin, you can run `yunohost`-commands from the CLI over SSH.

Once you got a root session, try:

```auto
yunohost user list # the users that Yunohost knows about
yunohost user group info admins # that returns a list of members, among other info
yunohost user group add admins von # to add user von to group admins 

```

Adding ` --help` after any of the commands will give a short help and list of options.

> [@Von](#):
>
> my yunohost users don’t appear in my shadow file

My bad, sorry. LDAP provides the users. Without knowing the specifics, the web logins are checked against LDAP as well. If the `yunohost user list` returns an empty list (which would be peculiar…), you can run `yunohost user create` to add a new one. _IF that is the case_, I’d create a non-existing temporary user, to get regular access again, and then continue the troubleshoot.

Good luck!

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 29, 2025, 10:56pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/13 "2025-01-29T22:56:53Z")

</div>

I’m sorry I forgot to mention that I already tried those yunohost commands. But no matter which one, I always end up getting one of those errors:

`Error: error during LDAP search operation with: base='ou=users,dc=yunohost,dc=org', filter='(&(objectclass=person)(!(uid=root))(!(uid=nobody)))', attrs={'mail', 'cn', 'mailuserquota', 'uid'} and exception {'msgtype': 101, 'msgid': 3, 'result': 32, 'desc': 'No such object', 'ctrls': []}`

It doesn’t matter which yunohost command, I always get this kind of error, with some values being different. That’s why I think there’s something really broken with ldap here.

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 30, 2025, 12:29pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/14 "2025-01-30T12:29:00Z")

</div>

> [@Von](#):
>
> It doesn’t matter which yunohost command, I always get this kind of error,

You mean, _any_ Yunohost command, not just the `yunohost user` commands?

How about trying to re-run (as root) the last command in the migration log,

```auto
aptitude full-upgrade --show-why -o Dpkg::Options::='--force-confold'

```

Big chance it will error out again, but it’s worth a try.

It may be that the partial upgrade let parts of Yunohost and `moulinette` in non-compatible versions, thus rendering them unable to either start or communicate.

Does the service `yunohost-api` run?

```auto
service yunohost-api status

```

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 30, 2025, 3:31pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/15 "2025-01-30T15:31:48Z")

</div>

Yes, _any_ yunohost command unfortunately.  
Here’s the result for listing the apps for example:

```auto
root@cloud:~# yunohost app list
Error: Failed to read info for bookstack : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 3, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for calibreweb : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 4, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for cyberchef : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 5, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for my_webapp : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 6, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for my_webapp__2 : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 7, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for navidrome : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 8, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for privatebin : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 9, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for redirect : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 10, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for tinyfilemanager : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 11, 'result': 32, 'desc': 'No such object', 'ctrls': []}
Error: Failed to read info for writefreely : error during LDAP search operation with: base='ou=permission,dc=yunohost,dc=org', filter='(objectclass=permissionYnh)', attrs=['cn', 'groupPermission', 'inheritPermission', 'URL', 'additionalUrls', 'authHeader', 'label', 'showTile', 'isProtected'] and exception {'msgtype': 101, 'msgid': 12, 'result': 32, 'desc': 'No such object', 'ctrls': []}
apps:
# nothing after

```

The result of the last command was the same as last time. Here’s the log: [https://paste.yunohost.org/raw/zosugijoyo](https://paste.yunohost.org/raw/zosugijoyo)  
And the log from the nsswitch error: [https://paste.yunohost.org/raw/tohoyovozo](https://paste.yunohost.org/raw/tohoyovozo)

yunohost-api is definitely running:

```auto
root@cloud:~# service yunohost-api status
● yunohost-api.service - YunoHost API Server
     Loaded: loaded (/etc/systemd/system/yunohost-api.service; enabled; preset: enabled)
     Active: active (running) since Wed 2025-01-29 13:17:08 CET; 1 day 1h ago
   Main PID: 605 (yunohost-api)
      Tasks: 1 (limit: 2057)
        CPU: 2.335s
     CGroup: /system.slice/yunohost-api.service
             └─605 /usr/bin/python3 /usr/bin/yunohost-api

```

I really have no clue how to fix this ldap error. I tried adding some `ou=` values into the `/etc/ldap/slapd.ldif` file, but it didn’t do anything.

I also ran a `apt full-upgrade` just in case, which upgraded `raspi-config rpi-eeprom`

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 30, 2025, 4:16pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/16 "2025-01-30T16:16:39Z")

</div>

> [@Von](#):
>
> Yes, _any_ yunohost command unfortunately.

☹

There have been some threads involving LDAP, [of which one](https://forum.yunohost.org/t/yunohost-package-update-broke-ldap/30574/16) that found the culprit in `/etc/hosts` goes quite in-depth. It also mentions another thread in one of the first posts.

Could you have a look whether their troubleshooting shines any light on your situation? First of all, I’d check the `hosts`-file.

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 30, 2025, 5:20pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/17 "2025-01-30T17:20:25Z")

</div>

Ok! I managed to do stuff!

First, there was no problem on my hosts file, so I looked elsewhere. And based on what I found, here was my process:

```auto
# regen slapd
/usr/share/yunohost/hooks/conf_regen/06-slapd init
# check if a slapd process is already running
netstat -tulpn | grep 389
# kill the existing process
pkill slapd
# and restart slapd
systemctl restart slapd

```

Yunohost commands were working again!  
But I couldn’t create a user due to domain error

```auto
# add main domain + create cert
yunohost domain add <DOMAINNAME>
# create new admin user
yunohost user create <USERNAME>
yunohost user group add admins <USERNAME>

```

Now I have access to the webadmin!

But even though I can add domains, none of my apps appear in the webadmin view, whereas I can see them via cli. Also I can’t access them via browser, but that should be another issue I guess.

I still can’t connect using a normal user I created, but at least stuff are coming back.

I’m just wondering about the migration. Should I try to run it again?

Anyway, thanks a lot for getting me here!

**Edit:** Yes, something is odd:

```auto
root@cloud:~# yunohost app setting app privatebin
Error: Could not find app in the list of installed apps: 
 * bookstack
 * calibreweb
 * cyberchef
 * my_webapp
 * my_webapp__2
 * navidrome
 * privatebin
 * redirect
 * tinyfilemanager
 * writefreely

```

---

<div class="post-metadata">

**Author:** ![wbk](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/w/e0b2c6/32.png) [@wbk](https://forum.yunohost.org/u/wbk)\
**Post date:** [January 30, 2025, 8:22pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/18 "2025-01-30T20:22:29Z")

</div>

Ah, great, well done 🙂

> [@Von](#):
>
> I’m just wondering about the migration. Should I try to run it again?

That’s what I would do, it is built safe for re-use.

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [January 31, 2025, 1:53pm UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/19 "2025-01-31T13:53:31Z")

</div>

I have great news: The migration went through all of it without errors. I’m the proud owner of an up to date Yunohost server thanks to you!

I just had to create new users, the former ones were obliterated from reality (but I got to keep their `/home/`).

I also had to recreate all my domains, and I have few apps that prevent me from login because the users are not existing anymore. So I might have to reinstall stuff from scratch and reconfigure.

The major issue I’m encountering is the 504 error when trying to log in to the weblogin. It’s preventing me to access some of the admin only app, and it’s a problem. But at least I have my yunohost running with the main apps.

**Edit:** My 504 error is exactly the same case depicted here: [Erreur 504 via yunohost/sso portalapi (debian Bookworm) - #38 by valen](https://forum.yunohost.org/t/erreur-504-via-yunohost-sso-portalapi-debian-bookworm/31799/38)  
With all the commands returning the same. Such a shame there is no solution provided. Setting NGINX to “modern” didn’t solve it.

---

<div class="post-metadata">

**Author:** ![Von](https://forum.yunohost.org/letter_avatar_proxy/v4/letter/v/6bbea6/32.png) [@Von](https://forum.yunohost.org/u/Von)\
**Post date:** [February 3, 2025, 10:52am UTC](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042/20 "2025-02-03T10:52:09Z")

</div>

I increased the timeout, following this post: [After installation, I can't login as user](https://forum.yunohost.org/t/after-installation-i-cant-login-as-user/32474)

It worked! Even though it doesn’t seem long term fix 😅

[Next page](https://forum.yunohost.org/t/stuck-in-an-upgrade-migration-loop/35042.md?page=2)
