Migration Fail: API doesn’t work

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: I don’t know - can’t access.
How are you able to access your server: The webadmin
SSH
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: I tried doing the 11 → 12 Upgrade.

Describe your issue

Hello,

I’m experiencing issues and need technical support. Yesterday, I attempted to upgrade my Raspberry Pi from YunoHost 11 to 12, but the migration process failed due to an internet connection loss. After the failure, I restarted the server.

Currently, the YunoHost API is not functioning, and I’m unable to reinitiate the migration process. It gives be a 502 Error. I still have SSH access to the server, though.​​​​​​​​​​​​​​​​

Share relevant logs or error messages

Fehler: “502”
Aktion: “GET” /yunohost/api/installed?locale=de

Fehlermeldung:
Die YunoHost-API antwortet nicht. Vielleicht ist ‘yunohost-api’ ausgefallen oder wurde neu gestartet?

When trying to access the API from the command line I get this error:

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
from bottle import request, response, Bottle, HTTPResponse, FileUpload
File “/usr/lib/python3/dist-packages/bottle.py”, line 44, in
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
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’

I’ve now tried to get everything running again by performing an upgrade via APT. Initially, it had to repair DPKG in some way, and then it completed the upgrade as usual. Afterwards, I simply restarted the API using systemctl. However, I’m now seeing several error messages in the diagnostics. Among them, it states that the server might not be reachable under the IPv4 address. Additionally, the migration still cannot be performed at all.

I tried once more to troubleshoot everything and specifically focused on getting DNSMasq running again. I reinstalled it using AI tools that guided me through the steps, as I’m not particularly tech-savvy. Unfortunately, the migration continues to fail, and there are still issues with resolving DNS addresses. I’ll share my complete log on another site, as it’s not possible for me to upload it to Yunopaste.

Log: tchncs

Warning: E: Sub-process /usr/bin/dpkg returned an error code (1)
Warning: dpkg: error processing package fontconfig (--configure):
Warning:  package is in a very bad inconsistent state; you should
Warning:  reinstall it before attempting configuration

so the issue seems to be with “fontconfig” which in turn causes other error … Naively I would try something like sudo apt install fontconfig --reinstall (and share what is displays if that doesnt fix the situation)

In parallel you’re having DNS resolution issue which may be related to the fact that you’re in some intermediate state … Temporarily you may want to echo 'nameserver 8.8.8.8' | sudo tee /etc/resolv.conf to get back a working DNS resolution (without which apt and yunopaste may not work)

Thank you for the help!
I tried both. My biggest problem right now is that I can’t get the website to really load. I see the login page, but can’t get further because of an „ Safari can’t open the page because the network connection was broken.“ error. :confused: