"L'API YunoHost ne répond pas. Peut-être que 'yunohost-api' est en panne ou a été redémarré ?"

Bonjour,

j’utilise Yunohost sur RPi 3B+ à la maison.
J’ai fait les dernières mises à jour (je n’arrive plus à récupérer la version…)
Je n’ai plus accès à la WebAdmin (c’est l’objet de ce message)
J’ai accès en ssh.

J’ai installé AirSonic, NextCloud et logwatch.

Depuis 2 jours, je n’arrive plus à me connecter à la WebAdmin.
J’ai le message d’erreur “L’API YunoHost ne répond pas. Peut-être que ‘yunohost-api’ est en panne ou a été redémarré ?”

J’ai fait :

sudo systemctl status yunohost-api.service

● yunohost-api.service
Loaded: error (Reason: Bad message)
Active: inactive (dead)

Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:26] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:27] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:28] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:29] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:30] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:31] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:32] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:33] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [/usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/java.1.gz:34] Assignment outside of section. Ignoring.
Apr 20 13:12:18 truc.ynh.fr systemd[1]: [296B blob data]

De plus, root reçoit toutes les 2 minutes un e-mail :
sujet : Cron root@truc yunohost dyndns update >> /dev/null

Illegal option: dyndns
Key and Certificate Management Tool

Une idée :thinking: ?

J’ai fait aussi :

sudo service yunohost-api restart

Failed to restart yunohost-api.service: Unit yunohost-api.service is not loaded properly: Bad message.
See system logs and 'systemctl status yunohost-api.service' for details.

Bonsoir,

Alors pour le dyndns c’est pour que ton serveur soit toujours joignable via ton nom de domaine fourni par YunoHost.
Il y a une tâche cron qui met à jour ton ip toutes les 2 minutes pour l’associer à ton nom de domaine YunoHost sur l’infrastructure YunoHost.

Après, as-tu essayé de redémarrer ta Raspberry afin de voir si tous les services redémarrent bien ?

Sinon, une Raspberry n’est pas une bête de course et avec des applications gourmandes en ressources ça peut faire caler quelques trucs de temps en temps.
Si tu a une carte micro SD avec un peu de place, peut être voir pour augmenter un peu le swap, et ainsi le passer de 100 Mo (valeur par défaut) à 512 voire 1024 Mo sans un premier temps.

ppr

1 Like

Merci pour ta réponse rapide !

Oui, j’ai redémarré le RPi, le pb est toujours le même.

Quant au swap, je pourrai l’augmenter car je boote sur un disque dur, et non sur une carte SD. Je vais regarder comment faire (je ne sais pas trop comment augmenter la taille d’une partition…)

En effet, j’ai l’impression que tout le swap est utilisé :

admin@truc:~ $ free -m
              total        used        free      shared  buff/cache   available
Mem:            926         501         123          44         300         325
Swap:            99          99           0

By the holy gods of systemd

3otymh

Can you try to cat /lib/systemd/system/yunohost-api.service

C’est du binaire !
je n’y comprends rien :smiley:

@ppr : ça y est j’ai augmenté la taille du swap à 2048 (confirmé par free -m), mais mon pb est toujours là.

Wtf …

Bon ben perso je ferais un apt install yunohost --reinstall pour commencer…

ça réinstalle tout ? tout quoi ?
je vais perdre des trucs ?

Ca réinstalle juste le code, tu vas pas perdre de données avec ça, ca s’assure juste que tous les bons fichiers sont au bon endroit.

Accessoirement si avant tu peux faire un ls -l /lib/systemd/system/yunohost-api.service … pour peut-être voir si c’est un lien symbolique vers un truc chelou pour qu’on comprenne ptete d’où ça sort

en effet c’est un lien :

lrwxrwxrwx 1 root root 27 Apr 15 18:11 /lib/systemd/system/yunohost-api.service -> /etc/alternatives/java.1.gz

une idée ? ou je lance l’install ?

Wtf … et vu que t’as apparament le meme genre de blague chelou avec la commande yunohost, est-ce que tu peux aussi faire

which yunohost

ls -l $(which yunohost)

bien vu, c’est le même machin …

admin@truc:~ $ which yunohost
/usr/bin/yunohost
admin@truc:~ $ ls -l $(which yunohost)
lrwxrwxrwx 1 root root 25 Apr 15 18:11 /usr/bin/yunohost -> /etc/alternatives/keytool

Mais qu’est-ce que c’est qu’ce bordel …

Regardons voir un ls -l /usr/bin | grep "yunohost\|alternatives"

admin@truc:~ $ ls -l /usr/bin | grep "yunohost\|alternatives" 
lrwxrwxrwx 1 root   root          25 Feb 18  2019 aclocal -> /etc/alternatives/aclocal
lrwxrwxrwx 1 root   root          25 Jan 27 21:50 animate -> /etc/alternatives/animate
lrwxrwxrwx 1 root   root          29 Jan 27 21:50 animate-im6 -> /etc/alternatives/animate-im6
lrwxrwxrwx 1 root   root          26 Feb 18  2019 aptitude -> /etc/alternatives/aptitude
lrwxrwxrwx 1 root   root          26 Feb 18  2019 automake -> /etc/alternatives/automake
lrwxrwxrwx 1 root   root          21 Feb 18  2019 awk -> /etc/alternatives/awk
lrwxrwxrwx 1 root   root          21 Feb 18  2019 c++ -> /etc/alternatives/c++
lrwxrwxrwx 1 root   root          21 Feb 18  2019 c89 -> /etc/alternatives/c89
lrwxrwxrwx 1 root   root          21 Feb 18  2019 c99 -> /etc/alternatives/c99
lrwxrwxrwx 1 root   root          20 Feb 18  2019 cc -> /etc/alternatives/cc
lrwxrwxrwx 1 root   root          25 Jan 27 21:50 compare -> /etc/alternatives/compare
lrwxrwxrwx 1 root   root          29 Jan 27 21:50 compare-im6 -> /etc/alternatives/compare-im6
lrwxrwxrwx 1 root   root          27 Jan 27 21:50 composite -> /etc/alternatives/composite
lrwxrwxrwx 1 root   root          31 Jan 27 21:50 composite-im6 -> /etc/alternatives/composite-im6
lrwxrwxrwx 1 root   root          25 Jan 27 21:50 conjure -> /etc/alternatives/conjure
lrwxrwxrwx 1 root   root          29 Jan 27 21:50 conjure-im6 -> /etc/alternatives/conjure-im6
lrwxrwxrwx 1 root   root          25 Jan 27 21:50 convert -> /etc/alternatives/convert
lrwxrwxrwx 1 root   root          29 Jan 27 21:50 convert-im6 -> /etc/alternatives/convert-im6
lrwxrwxrwx 1 root   root          25 Jan 27 21:50 display -> /etc/alternatives/display
lrwxrwxrwx 1 root   root          29 Jan 27 21:50 display-im6 -> /etc/alternatives/display-im6
lrwxrwxrwx 1 root   root          25 Feb 18  2019 dotlock -> /etc/alternatives/dotlock
lrwxrwxrwx 1 root   root          24 Feb 18  2019 editor -> /etc/alternatives/editor
lrwxrwxrwx 1 root   root          20 Feb 18  2019 ex -> /etc/alternatives/ex
lrwxrwxrwx 1 root   root          26 Feb 18  2019 fakeroot -> /etc/alternatives/fakeroot
lrwxrwxrwx 1 root   root          21 Feb 18  2019 frm -> /etc/alternatives/frm
lrwxrwxrwx 1 root   root          22 Feb 18  2019 from -> /etc/alternatives/from
lrwxrwxrwx 1 root   root          26 Jan 27 21:50 identify -> /etc/alternatives/identify
lrwxrwxrwx 1 root   root          30 Jan 27 21:50 identify-im6 -> /etc/alternatives/identify-im6
lrwxrwxrwx 1 root   root          24 Jan 27 21:50 import -> /etc/alternatives/import
lrwxrwxrwx 1 root   root          28 Jan 27 21:50 import-im6 -> /etc/alternatives/import-im6
lrwxrwxrwx 1 root   root          29 Feb 18  2019 infobrowser -> /etc/alternatives/infobrowser
lrwxrwxrwx 1 root   root          22 Apr 15 18:11 java -> /etc/alternatives/java
lrwxrwxrwx 1 root   root          23 Apr 15 18:11 jexec -> /etc/alternatives/jexec
lrwxrwxrwx 1 root   root          21 Apr 15 18:11 jjs -> /etc/alternatives/jjs
lrwxrwxrwx 1 root   root          25 Apr 15 18:11 keytool -> /etc/alternatives/keytool
lrwxrwxrwx 1 root   root          21 Feb 18  2019 lft -> /etc/alternatives/lft
lrwxrwxrwx 1 root   root          33 Feb 18  2019 lua -> /etc/alternatives/lua-interpreter
lrwxrwxrwx 1 root   root          30 Feb 18  2019 luac -> /etc/alternatives/lua-compiler
lrwxrwxrwx 1 root   root          23 Feb 18  2019 lzcat -> /etc/alternatives/lzcat
lrwxrwxrwx 1 root   root          23 Feb 18  2019 lzcmp -> /etc/alternatives/lzcmp
lrwxrwxrwx 1 root   root          24 Feb 18  2019 lzdiff -> /etc/alternatives/lzdiff
lrwxrwxrwx 1 root   root          25 Feb 18  2019 lzegrep -> /etc/alternatives/lzegrep
lrwxrwxrwx 1 root   root          25 Feb 18  2019 lzfgrep -> /etc/alternatives/lzfgrep
lrwxrwxrwx 1 root   root          24 Feb 18  2019 lzgrep -> /etc/alternatives/lzgrep
lrwxrwxrwx 1 root   root          24 Feb 18  2019 lzless -> /etc/alternatives/lzless
lrwxrwxrwx 1 root   root          22 Feb 18  2019 lzma -> /etc/alternatives/lzma
lrwxrwxrwx 1 root   root          24 Feb 18  2019 lzmore -> /etc/alternatives/lzmore
lrwxrwxrwx 1 root   root          22 Feb 18  2019 mail -> /etc/alternatives/mail
lrwxrwxrwx 1 root   root          23 Feb 18  2019 mailx -> /etc/alternatives/mailx
lrwxrwxrwx 1 root   root          26 Feb 18  2019 messages -> /etc/alternatives/messages
lrwxrwxrwx 1 root   root          25 Jan 27 21:50 mogrify -> /etc/alternatives/mogrify
lrwxrwxrwx 1 root   root          29 Jan 27 21:50 mogrify-im6 -> /etc/alternatives/mogrify-im6
lrwxrwxrwx 1 root   root          25 Jan 27 21:50 montage -> /etc/alternatives/montage
lrwxrwxrwx 1 root   root          29 Jan 27 21:50 montage-im6 -> /etc/alternatives/montage-im6
lrwxrwxrwx 1 root   root          26 Feb 18  2019 movemail -> /etc/alternatives/movemail
lrwxrwxrwx 1 root   root          22 Feb 18  2019 nawk -> /etc/alternatives/nawk
lrwxrwxrwx 1 root   root          22 Apr 15 18:11 orbd -> /etc/alternatives/orbd
lrwxrwxrwx 1 root   root          25 Apr 15 18:11 pack200 -> /etc/alternatives/pack200
lrwxrwxrwx 1 root   root          23 Feb 18  2019 pager -> /etc/alternatives/pager
lrwxrwxrwx 1 root   root          22 Feb 18  2019 phar -> /etc/alternatives/phar
lrwxrwxrwx 1 root   root          27 Feb 18  2019 phar.phar -> /etc/alternatives/phar.phar
lrwxrwxrwx 1 root   root          21 Feb 18  2019 php -> /etc/alternatives/php
lrwxrwxrwx 1 root   root          22 Feb 18  2019 pico -> /etc/alternatives/pico
lrwxrwxrwx 1 root   root          26 Feb 18  2019 pinentry -> /etc/alternatives/pinentry
lrwxrwxrwx 1 root   root          28 Apr 15 18:11 policytool -> /etc/alternatives/policytool
lrwxrwxrwx 1 root   root          21 Feb 18  2019 rcp -> /etc/alternatives/rcp
lrwxrwxrwx 1 root   root          25 Feb 18  2019 readmsg -> /etc/alternatives/readmsg
lrwxrwxrwx 1 root   root          24 Feb 18  2019 rename -> /etc/alternatives/rename
lrwxrwxrwx 1 root   root          24 Feb 18  2019 rlogin -> /etc/alternatives/rlogin
lrwxrwxrwx 1 root   root          22 Apr 15 18:11 rmid -> /etc/alternatives/rmid
lrwxrwxrwx 1 root   root          29 Apr 15 18:11 rmiregistry -> /etc/alternatives/rmiregistry
lrwxrwxrwx 1 root   root          21 Feb 18  2019 rsh -> /etc/alternatives/rsh
lrwxrwxrwx 1 root   root          23 Feb 18  2019 rview -> /etc/alternatives/rview
lrwxrwxrwx 1 root   root          28 Apr 15 18:11 servertool -> /etc/alternatives/servertool
lrwxrwxrwx 1 root   root          24 Jan 27 21:50 stream -> /etc/alternatives/stream
lrwxrwxrwx 1 root   root          28 Jan 27 21:50 stream-im6 -> /etc/alternatives/stream-im6
lrwxrwxrwx 1 root   root          27 Apr 15 18:11 tnameserv -> /etc/alternatives/tnameserv
lrwxrwxrwx 1 root   root          28 Feb 18  2019 traceproto -> /etc/alternatives/traceproto
lrwxrwxrwx 1 root   root          28 Feb 18  2019 traceroute -> /etc/alternatives/traceroute
lrwxrwxrwx 1 root   root          29 Feb 18  2019 traceroute6 -> /etc/alternatives/traceroute6
lrwxrwxrwx 1 root   root          24 Feb 18  2019 unlzma -> /etc/alternatives/unlzma
lrwxrwxrwx 1 root   root          27 Apr 15 18:11 unpack200 -> /etc/alternatives/unpack200
-rwxr-xr-x 1 root   root       38408 Jun 26  2018 update-alternatives
lrwxrwxrwx 1 root   root          20 Feb 18  2019 vi -> /etc/alternatives/vi
lrwxrwxrwx 1 root   root          22 Feb 18  2019 view -> /etc/alternatives/view
lrwxrwxrwx 1 root   root          19 Feb 18  2019 w -> /etc/alternatives/w
lrwxrwxrwx 1 root   root          23 Feb 18  2019 write -> /etc/alternatives/write
lrwxrwxrwx 1 root   root          24 Feb 18  2019 wsdump -> /etc/alternatives/wsdump
lrwxrwxrwx 1 root   root          25 Apr 15 18:11 yunohost -> /etc/alternatives/keytool
lrwxrwxrwx 1 root   root          59 Apr 15 18:11 yunohost-api -> /usr/lib/jvm/java-8-openjdk-armhf/jre/man/man1/keytool.1.gz
lrwxrwxrwx 1 root   root          30 Apr 15 18:11 yunopaste -> /etc/alternatives/keytool.1.gz

Hmokay le point commun dans tout ça c’est que c’est lié à un truc qui s’apelle “keytool” …

Si tu fais dkpg --list | grep keytool ça raconte quoi ?

'Puis tant qu’on y est on va essayer de trouver ce qu’il s’est passé avec :

grep -nr -C5 'java\|jdk\|alternatives' /var/log/apt/*.log

(ça risque de sortir pas mal de lignes)

curieux …

admin@truc:~ $ dkpg --list | grep keytool
-bash: dkpg: command not found
admin@truc:~ $ which dkpg

Arf désolé c’était “dpkg” … mais j’ai l’impression que c’est pas un vrai paquet, c’est un truc interne à java …

(ping @Gofannon : si tu passes par là, j’ai l’impression que c’est lié à airsonic … et le script d’install a un commentaire qui parle de update-alternatives … même si je pige pas comment ça peut en arriver là …)