Plus d'accès au webadmin depuis la migration

Bonjour à tous
Je viens d’effectuer une migration de yunohost 3.8 vers la version 4 sur ma brique, et depuis, j’ai plusieurs soucis :

  • je n’ai plus accès au webadmin. Plus précisément, il m’affiche un “chargement” qui ne se résout jamais. Après plusieurs minutes, je n’atteins toujours pas la demande de mot de passe, et j’obtiens au final une erreur en rouge dans le bandeau Le serveur a fermé la connexion au lieu d’y répondre. Est-ce que Nginx ou l'API YunoHost aurait été redémarré ou arrêté ? (code/message d’erreur : 0 error)

→ j’ai bien tenté de redémarrer le service nginx (l’opération a fonctionné), mais ça n’a pas résolu le problème.

  • je n’ai plus accès au portail yunohost avec mes applis. Firefox m’empêche d’accéder en raison d’un certificat non valide (que je ne peux pas outrepasser).
    → j’ai tenté de le revalider avec la commande suivante :
~# sudo yunohost domain cert-install smidge.noho.st --no-checks
Info : Now attempting install of certificate for domain smidge.noho.st!
Info : Parsing account key...
Info : Parsing CSR...
Info : Found domains: smidge.noho.st, xmpp-upload.smidge.noho.st
Info : Getting directory...
Info : Directory found!
Info : Registering account...
Info : Already registered!
Info : Creating new order...
Info : Order created!
Info : Verifying smidge.noho.st...
Erreur : Challenge did not pass for smidge.noho.st: {'identifier': {'type': 'dns', 'value': 'smidge.noho.st'}, 'status': 'invalid', 'expires': '2021-09-11T21:06:17Z', 'challenges': [{'type': 'http-01', 'status': 'invalid', 'error': {'type': 'urn:ietf:params:acme:error:connection', 'detail': 'Fetching http://smidge.noho.st/.well-known/acme-challenge/Sp-AyLX3aaYYg6al5c_rI6pD6uqW1PfaZI7bisp817I: Timeout during connect (likely firewall problem)', 'status': 400}, 'url': 'https://acme-v02.api.letsencrypt.org/acme/chall-v3/28026525820/WNWrlg', 'token': 'Sp-AyLX3aaYYg6al5c_rI6pD6uqW1PfaZI7bisp817I', 'validationRecord': [{'url': 'http://smidge.noho.st/.well-known/acme-challenge/Sp-AyLX3aaYYg6al5c_rI6pD6uqW1PfaZI7bisp817I', 'hostname': 'smidge.noho.st', 'port': '80', 'addressesResolved': ['86.246.104.180'], 'addressUsed': '86.246.104.180'}], 'validated': '2021-09-05T08:55:12Z'}]}
Erreur : Certificate installation for smidge.noho.st failed !
Exception: Impossible de signer le nouveau certificat
Info : L’opération 'Installer le certificat Let’s Encrypt sur le domaine 'smidge.noho.st'' a échoué ! Pour obtenir de l’aide, merci de partager le journal de l’opération en utilisant la commande 'yunohost log share 20210905-085459-letsencrypt_cert_install-smidge.noho.st'
Erreur : Please consider checking the 'DNS records' (basic) and 'Web' categories of the diagnosis to check for possible issues that may prevent installing a Let's Encrypt certificate on domain smidge.noho.st.

Ca n’a donc pas fonctionné non plus.

J’ai fait appel hier à quelqu’un sur un IRC dédié à yunohost (qui a trouvé certains problèmes, comme une mauvaise configuration DNS qui m’empêchait de mettre à jour les applications - chose faite depuis), mais les problèmes soulevés ci-dessus persistent.

Je ne suis pas très familier avec les commandes linux (ce qui rend compliquées d’éventuelles investigations de ma part !), mais je sais me connecter en SSH et faire ce qu’on me dit !

Merci d’avance pour vos éventuelles suggestions !

Maybe restart YunoHost API… sudo yunohost service restart yunohost-api

Merci pour ta réponse.
J’ai essayé de redémarrer le service (ça a fonctionné avec succès), mais ça n’a pas réglé mon problème.

@Smidge peux-tu nous donner les infos suivantes ?

Quels services sont dans les choux :

sudo systemctl --failed

En particulier, ce que raconte le service nginx :

sudo systemctl status nginx
# sudo systemctl --failed
  UNIT                  LOAD   ACTIVE SUB    DESCRIPTION
● ifup@eth0.service     loaded failed failed ifup for eth0
● networking.service    loaded failed failed Raise network interfaces
● ynh-vpnclient.service loaded failed failed YunoHost VPN Client.

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

3 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.

Et pour l’autre commande :

# sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
   Active: active (running) since Sat 2021-09-04 23:00:10 CEST; 13h ago
     Docs: man:nginx(8)
  Process: 18946 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
  Process: 18953 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (cod
  Process: 19700 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s
 Main PID: 18960 (nginx)
    Tasks: 3 (limit: 2304)
   Memory: 13.3M
   CGroup: /system.slice/nginx.service
           ├─18960 nginx: master process /usr/sbin/nginx -g daemon on; master_pr
           ├─19710 nginx: worker process
           └─19711 nginx: worker process

sept. 04 23:00:08 smidge.noho.st systemd[1]: Starting A high performance web ser
sept. 04 23:00:10 smidge.noho.st systemd[1]: Started A high performance web serv
sept. 04 23:05:07 smidge.noho.st systemd[1]: Reloading A high performance web se
sept. 04 23:05:07 smidge.noho.st systemd[1]: Reloaded A high performance web ser
sept. 04 23:05:09 smidge.noho.st systemd[1]: Reloading A high performance web se
sept. 04 23:05:09 smidge.noho.st systemd[1]: Reloaded A high performance web ser
...skipping...
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
   Active: active (running) since Sat 2021-09-04 23:00:10 CEST; 13h ago
     Docs: man:nginx(8)
  Process: 18946 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
  Process: 18953 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (cod
  Process: 19700 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s
 Main PID: 18960 (nginx)
    Tasks: 3 (limit: 2304)
   Memory: 13.3M
   CGroup: /system.slice/nginx.service
           ├─18960 nginx: master process /usr/sbin/nginx -g daemon on; master_pr
           ├─19710 nginx: worker process
           └─19711 nginx: worker process

sept. 04 23:00:08 smidge.noho.st systemd[1]: Starting A high performance web ser
sept. 04 23:00:10 smidge.noho.st systemd[1]: Started A high performance web serv
sept. 04 23:05:07 smidge.noho.st systemd[1]: Reloading A high performance web se
sept. 04 23:05:07 smidge.noho.st systemd[1]: Reloaded A high performance web ser
sept. 04 23:05:09 smidge.noho.st systemd[1]: Reloading A high performance web se
sept. 04 23:05:09 smidge.noho.st systemd[1]: Reloaded A high performance web ser
~
~

OK, donc ton VPN est dans les choux. Donc tu ne pourras pas accéder à ton interface Web tant qu’il ne sera pas rétabli. À tout hasard, essaye de le relancer :

sudo systemctl restart ynh-vpnclient
# sudo systemctl restart ynh-vpnclient
Job for ynh-vpnclient.service failed because the control process exited with error code.
See "systemctl status ynh-vpnclient.service" and "journalctl -xe" for details.

J’ai donc lancé la commande suggérée :

# systemctl status ynh-vpnclient.service
● ynh-vpnclient.service - YunoHost VPN Client.
   Loaded: loaded (/etc/systemd/system/ynh-vpnclient.service; enabled; vendor pr
   Active: failed (Result: exit-code) since Sun 2021-09-05 12:45:12 CEST; 37s ag
  Process: 29550 ExecStart=/usr/local/bin/ynh-vpnclient start (code=exited, stat
 Main PID: 29550 (code=exited, status=1/FAILURE)

sept. 05 12:45:12 smidge.noho.st systemd[1]: Starting YunoHost VPN Client....
sept. 05 12:45:12 smidge.noho.st ynh-vpnclient[29550]: [CRIT] You need a CA serv
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Main process
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Failed with
sept. 05 12:45:12 smidge.noho.st systemd[1]: Failed to start YunoHost VPN Client
...skipping...
● ynh-vpnclient.service - YunoHost VPN Client.
   Loaded: loaded (/etc/systemd/system/ynh-vpnclient.service; enabled; vendor pr
   Active: failed (Result: exit-code) since Sun 2021-09-05 12:45:12 CEST; 37s ag
  Process: 29550 ExecStart=/usr/local/bin/ynh-vpnclient start (code=exited, stat
 Main PID: 29550 (code=exited, status=1/FAILURE)

sept. 05 12:45:12 smidge.noho.st systemd[1]: Starting YunoHost VPN Client....
sept. 05 12:45:12 smidge.noho.st ynh-vpnclient[29550]: [CRIT] You need a CA serv
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Main process
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Failed with
sept. 05 12:45:12 smidge.noho.st systemd[1]: Failed to start YunoHost VPN Client
~
~
~
~
~
~
~
~
~
~
~
~
 ESCOD
● ynh-vpnclient.service - YunoHost VPN Client.
   Loaded: loaded (/etc/systemd/system/ynh-vpnclient.service; enabled; vendor pr
   Active: failed (Result: exit-code) since Sun 2021-09-05 12:45:12 CEST; 37s ag
  Process: 29550 ExecStart=/usr/local/bin/ynh-vpnclient start (code=exited, stat
 Main PID: 29550 (code=exited, status=1/FAILURE)

sept. 05 12:45:12 smidge.noho.st systemd[1]: Starting YunoHost VPN Client....
sept. 05 12:45:12 smidge.noho.st ynh-vpnclient[29550]: [CRIT] You need a CA serv
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Main process
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Failed with
sept. 05 12:45:12 smidge.noho.st systemd[1]: Failed to start YunoHost VPN Client
~
~
~
~
~
~
~
~
~
~
~
~
 ESCOD
● ynh-vpnclient.service - YunoHost VPN Client.
   Loaded: loaded (/etc/systemd/system/ynh-vpnclient.service; enabled; vendor pr
   Active: failed (Result: exit-code) since Sun 2021-09-05 12:45:12 CEST; 37s ag
  Process: 29550 ExecStart=/usr/local/bin/ynh-vpnclient start (code=exited, stat
 Main PID: 29550 (code=exited, status=1/FAILURE)

sept. 05 12:45:12 smidge.noho.st systemd[1]: Starting YunoHost VPN Client....
sept. 05 12:45:12 smidge.noho.st ynh-vpnclient[29550]: [CRIT] You need a CA serv
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Main process
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Failed with
sept. 05 12:45:12 smidge.noho.st systemd[1]: Failed to start YunoHost VPN Client
~
~
~
~
~
~
~
~
~
~
~
~
 ESCOD
● ynh-vpnclient.service - YunoHost VPN Client.
   Loaded: loaded (/etc/systemd/system/ynh-vpnclient.service; enabled; vendor pr
   Active: failed (Result: exit-code) since Sun 2021-09-05 12:45:12 CEST; 37s ag
  Process: 29550 ExecStart=/usr/local/bin/ynh-vpnclient start (code=exited, stat
 Main PID: 29550 (code=exited, status=1/FAILURE)

sept. 05 12:45:12 smidge.noho.st systemd[1]: Starting YunoHost VPN Client....
sept. 05 12:45:12 smidge.noho.st ynh-vpnclient[29550]: [CRIT] You need a CA serv
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Main process
sept. 05 12:45:12 smidge.noho.st systemd[1]: ynh-vpnclient.service: Failed with
sept. 05 12:45:12 smidge.noho.st systemd[1]: Failed to start YunoHost VPN Client
~

Bon, même si le message est tronqué, on voit quand même qu’il y a un soucis avec la configuration openvpn : il manque le fichier /etc/openvpn/keys/ca-server.crt supposé contenir la CA du service openvpn que tu utilises.

Si tu as encore ton fichier .cube quelque part sur ta brique (par exemple dans /root/vpnclient-xxxxx.cube) tu peux essayer de le charger à nouveau avec le commande suivante :

sudo ynh-vpnclient-loadcubefile.sh \
 -u <ton_username> \
 -p <ton_mot_de_passe> \
 -c /root/vpnclient-xxxxx.cube
1 Like

Voilà, c’est chose faite (ça a fonctionné).
Dans la foulée, j’ai relancé du coup # sudo systemctl restart ynh-vpnclient, qui cette fois est allé au bout sans erreur.

Pour le moment, ça n’a pas changé l’accès (ni le message d’erreur) au panel admin, ni le certificat dépassé du portail yunohost.

Maintenant que tu as ta connexion VPN active, il faut mettre à jour l’enregistrement DNS smidge.noho.st pour qu’il pointe vers ton IP de VPN (pour l’instant, il pointe vers l’IP de ta box je pense).

sudo yunohost dyndns update

Fait (avec succès) :

# sudo yunohost dyndns update
Info : Updated needed, going on...
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id:      0
;; flags:; ZONE: 0, PREREQ: 0, UPDATE: 0, ADDITIONAL: 0
;; ZONE SECTION:
;noho.st.                       IN      SOA

;; UPDATE SECTION:
smidge.noho.st.         0       ANY     ANY
smidge.noho.st.         0       ANY     ANY
_xmpp-client._tcp.smidge.noho.st. 0 ANY ANY
_xmpp-server._tcp.smidge.noho.st. 0 ANY ANY
muc.smidge.noho.st.     0       ANY     ANY
pubsub.smidge.noho.st.  0       ANY     ANY
vjud.smidge.noho.st.    0       ANY     ANY
xmpp-upload.smidge.noho.st. 0   ANY     ANY
smidge.noho.st.         0       ANY     ANY
smidge.noho.st.         0       ANY     ANY
mail._domainkey.smidge.noho.st. 0 ANY   ANY
_dmarc.smidge.noho.st.  0       ANY     ANY
*.smidge.noho.st.       0       ANY     ANY
*.smidge.noho.st.       0       ANY     ANY
smidge.noho.st.         0       ANY     ANY
smidge.noho.st.         3600    IN      A       79.143.250.108
smidge.noho.st.         3600    IN      AAAA    2001:678:938:100::108
_xmpp-client._tcp.smidge.noho.st. 3600 IN SRV   0 5 5222 smidge.noho.st.
_xmpp-server._tcp.smidge.noho.st. 3600 IN SRV   0 5 5269 smidge.noho.st.
muc.smidge.noho.st.     3600    IN      CNAME   smidge.noho.st.
pubsub.smidge.noho.st.  3600    IN      CNAME   smidge.noho.st.
vjud.smidge.noho.st.    3600    IN      CNAME   smidge.noho.st.
xmpp-upload.smidge.noho.st. 3600 IN     CNAME   smidge.noho.st.
smidge.noho.st.         3600    IN      MX      10 smidge.noho.st.
smidge.noho.st.         3600    IN      TXT     "v=spf1 a mx -all"
mail._domainkey.smidge.noho.st. 3600 IN TXT     "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5DcgaqXcNnLaHqkZlOCy1YoKRdhbRHzfdNOyi2nEwVHSAG5vbDRr4jhBWpk6b8RetX83LEJrbmp14IDrpdPOXRLXkiP+Klx7LVNcGc0xfx1lKN486yAa7fbDwpWaP4LG2nuTPxNAVrZhR9zunMfo1m+Qij9jb9oi0cUh2fMiM4QIDAQAB"
_dmarc.smidge.noho.st.  3600    IN      TXT     "v=DMARC1; p=none"
*.smidge.noho.st.       3600    IN      A       79.143.250.108
*.smidge.noho.st.       3600    IN      AAAA    2001:678:938:100::108
smidge.noho.st.         3600    IN      CAA     128 issue "letsencrypt.org"

Succès ! Mise à jour de votre IP pour le domaine DynDNS

Tu n’as plus qu’à attendre que cette modification DNS se propage.
Ou si tu es impatient, trouve comment vider le cache DNS sur ton poste.

1 Like

merci pour toutes les manips !
J’ai de nouveau accès à mon portail avec les applis, mais j’ai 2 problèmes :

  • certaines de ces applis ne se lancent pas
  • et, plus problématique, je n’ai toujours pas accès à mon panel admin. Il bloque toujours sur la page de chargement :

Il faut peut-être faire un Ctrl+Shift+R (sous firefox) pour nettoyer le cache

Ça n’a pas fonctionné.

J’ai testé avec un autre navigateur, et j’ai obtenu ça :
image

Du coup, j’ai renouvelé le certificat (ce qui a fonctionné), mais ça n’a pas résolu le problème.

# sudo yunohost domain cert-install smidge.noho.st --no-checks
Info : Now attempting install of certificate for domain smidge.noho.st!
Attention : Le fichier de configuration '/etc/resolv.dnsmasq.conf' a été modifié manuellement et ne sera pas mis à jour
Info : Parsing account key...
Info : Parsing CSR...
Info : Found domains: xmpp-upload.smidge.noho.st, smidge.noho.st
Info : Getting directory...
Info : Directory found!
Info : Registering account...
Info : Already registered!
Info : Creating new order...
Info : Order created!
Info : Verifying xmpp-upload.smidge.noho.st...
Info : xmpp-upload.smidge.noho.st verified!
Info : Verifying smidge.noho.st...
Info : smidge.noho.st verified!
Info : Signing certificate...
Info : Certificate signed!
Succès ! La configuration a été mise à jour pour 'nginx'
Succès ! Le certificat Let’s Encrypt est maintenant installé pour le domaine « smidge.noho.st »

Pour une raison inexpliquée (je n’ai touché à rien depuis hier :x), tout refonctionne !

Merci à tous pour vos aides !

Tu as patienté suffisamment longtemps pour que la modif DNS t’affecte :slight_smile:

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