Error Cron <root@ndd> : YunoHost DynDNS update

,

Mon serveur YunoHost

Matériel: VPS acheté en ligne
Version de YunoHost: 4.3.6.2
J’ai accès à mon serveur : En SSH | Par la webadmin | …
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
Si oui, expliquer:

Description du problème / Description of the problem

FR
Depuis l’ajout d’un NDD en ynh.fr sur mon installation disposant aussi de son propre NDD, j’ai un mail toutes les 10 minutes de DynDNS.
EN
Since I added an NDD in ynh.fr on my installation which also has its own NDD, I have an email every 10 minutes from DynDNS.

Cron <root@ndd> : YunoHost DynDNS update; sleep $((RANDOM%60)); ! ping -q -W5 -c1 ip.yunohost.org >/dev/null 2>&1 || test -e /var/run/moulinette_yunohost.lock || yunohost dyndns update >> /dev/null

FR
Un petit tour dans le Diagnostic qui me dit d’essayer la commande suivante
EN
A little tour in the Diagnostic that tells me to try the following command

yunohost dyndns update --force

resultat/result :

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:
;ynh.fr.				IN	SOA

;; UPDATE SECTION:
ndd.ynh.fr. 0	ANY	ANY	
ndd.ynh.fr. 0	ANY	ANY	
*.ndd.ynh.fr. 0 ANY	ANY	
*.ndd.ynh.fr. 0 ANY	ANY	
ndd.ynh.fr. 0	ANY	ANY	
ndd.ynh.fr. 3600 IN	A	mon:ip:serveur:v4
ndd.ynh.fr. 3600 IN	AAAA	mon:ip:serveur:v6
*.ndd.ynh.fr. 3600 IN	A	mon:ip:serveur:v4
*.ndd.ynh.fr. 3600 IN	AAAA	mon:ip:serveur:v6
ndd.ynh.fr. 3600 IN	CAA	128 issue "letsencrypt.org"

; Communication with ipv6#53 failed: timed out
; Communication with ipv4#53 failed: timed out
Info: The operation 'Update the IP associated with your YunoHost subdomain 'ndd.ynh.fr'' could not be completed. Please share the full log of this operation using the command 'yunohost log share 20220312-094321-dyndns_update-ndd.ynh.fr' to get help
Error: Could not update IP address to DynDNS

FR
J’ai vu dans un sujet sur forum cette commande mais aussi que cela pouvais etre une erreur de serveus de Yunohost ?
EN
I saw in a topic on forum this order but also that it could be an error of serveus of Yunohost?

yunohost dyndns update --verbose --debug | yunopaste

resultat/result :

Invalid usage: No input is provided.

Usage: /usr/bin/yunopaste [OPTION]...

Read from input stream and paste the data to the YunoHost
Haste server.

For example, to paste the output of the YunoHost diagnosis, you
can simply execute the following:
  yunohost diagnosis show | /usr/bin/yunopaste

It will return the URL where you can access the pasted data.

Options:
  -h, --help   show this help message and exit
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.7/logging/__init__.py", line 1038, in emit
    self.flush()
  File "/usr/lib/python3.7/logging/__init__.py", line 1018, in flush
    self.stream.flush()
BrokenPipeError: [Errno 32] Broken pipe
Call stack:
  File "/usr/bin/yunohost", line 72, in <module>
    parser=parser
  File "/usr/lib/moulinette/yunohost/__init__.py", line 25, in cli
    ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser)
  File "/usr/lib/python3/dist-packages/moulinette/__init__.py", line 130, in cli
    Cli(top_parser=top_parser, load_only_category=load_only_category).run(
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 470, in __init__
    ActionsMapParser(top_parser=top_parser),
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 294, in __init__
    super(ActionsMapParser, self).__init__(parent)
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/__init__.py", line 42, in __init__
    logger.debug("initializing base actions map parser for %s", self.interface)
  File "/usr/lib/python3.7/logging/__init__.py", line 1371, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python3.7/logging/__init__.py", line 1519, in _log
    self.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1529, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 905, in handle
    self.emit(record)
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 267, in emit
    logging.StreamHandler.emit(self, record)
Message: 'initializing base actions map parser for %s'
Arguments: ('cli',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.7/logging/__init__.py", line 1038, in emit
    self.flush()
  File "/usr/lib/python3.7/logging/__init__.py", line 1018, in flush
    self.stream.flush()
BrokenPipeError: [Errno 32] Broken pipe
Call stack:
  File "/usr/bin/yunohost", line 72, in <module>
    parser=parser
  File "/usr/lib/moulinette/yunohost/__init__.py", line 25, in cli
    ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser)
  File "/usr/lib/python3/dist-packages/moulinette/__init__.py", line 130, in cli
    Cli(top_parser=top_parser, load_only_category=load_only_category).run(
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 471, in __init__
    load_only_category=load_only_category,
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 411, in __init__
    logger.debug("loading actions map namespace '%s'", n)
  File "/usr/lib/python3.7/logging/__init__.py", line 1371, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python3.7/logging/__init__.py", line 1519, in _log
    self.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1529, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 905, in handle
    self.emit(record)
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 267, in emit
    logging.StreamHandler.emit(self, record)
Message: "loading actions map namespace '%s'"
Arguments: ('yunohost',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.7/logging/__init__.py", line 1038, in emit
    self.flush()
  File "/usr/lib/python3.7/logging/__init__.py", line 1018, in flush
    self.stream.flush()
BrokenPipeError: [Errno 32] Broken pipe
Call stack:
  File "/usr/bin/yunohost", line 72, in <module>
    parser=parser
  File "/usr/lib/moulinette/yunohost/__init__.py", line 25, in cli
    ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser)
  File "/usr/lib/python3/dist-packages/moulinette/__init__.py", line 130, in cli
    Cli(top_parser=top_parser, load_only_category=load_only_category).run(
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 471, in __init__
    load_only_category=load_only_category,
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 476, in __init__
    self.parser = self._construct_parser(actionsmaps, top_parser)
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 649, in _construct_parser
    logger.debug("building parser...")
  File "/usr/lib/python3.7/logging/__init__.py", line 1371, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python3.7/logging/__init__.py", line 1519, in _log
    self.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1529, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 905, in handle
    self.emit(record)
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 267, in emit
    logging.StreamHandler.emit(self, record)
Message: 'building parser...'
Arguments: ()
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib/python3.7/logging/__init__.py", line 1038, in emit
    self.flush()
  File "/usr/lib/python3.7/logging/__init__.py", line 1018, in flush
    self.stream.flush()
BrokenPipeError: [Errno 32] Broken pipe
Call stack:
  File "/usr/bin/yunohost", line 72, in <module>
    parser=parser
  File "/usr/lib/moulinette/yunohost/__init__.py", line 25, in cli
    ret = moulinette.cli(args, output_as=output_as, timeout=timeout, top_parser=parser)
  File "/usr/lib/python3/dist-packages/moulinette/__init__.py", line 130, in cli
    Cli(top_parser=top_parser, load_only_category=load_only_category).run(
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 471, in __init__
    load_only_category=load_only_category,
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 476, in __init__
    self.parser = self._construct_parser(actionsmaps, top_parser)
  File "/usr/lib/python3/dist-packages/moulinette/actionsmap.py", line 771, in _construct_parser
    logger.debug("building parser took %.3fs", time() - start)
  File "/usr/lib/python3.7/logging/__init__.py", line 1371, in debug
    self._log(DEBUG, msg, args, **kwargs)
  File "/usr/lib/python3.7/logging/__init__.py", line 1519, in _log
    self.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1529, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 905, in handle
    self.emit(record)
  File "/usr/lib/python3/dist-packages/moulinette/interfaces/cli.py", line 267, in emit
    logging.StreamHandler.emit(self, record)
Message: 'building parser took %.3fs'
Arguments: (0.009979009628295898,)
usage: yunohost {dyndns} ...
                [-h] [--output-as {json,plain,none}] [--debug] [--quiet]
                [--timeout ==SUPPRESS==] [-v]
yunohost: error: unrecognized arguments: --verbose
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>
BrokenPipeError: [Errno 32] Broken pipe

FR
Et dans un autre de supprimer la tache CRON car j’ai une IP fixe.

Je n’ai pas envie de faire n’importe quoi alors je veux bien un peu de votre aide SVP.

Merci d’avance

EN
And in another to remove the CRON spot because I have a fixed IP.

I don’t want to do anything so I would like to have your help please.

Thanks in advance

Si c’est une Ip fixe, ce script n’a pas d’intérêt. Utilise un hook qui le désactive.

Salut,

Merci pour ta réponse.
Pourrais tu me donnner plus d’infos sur le “comment faire” stp.

Il faut que je supprime la tache CRON dans etc/cron* ?

Merci d’avance

Edit :

Il suffit de supprimer le fichiet yunohost-dyndns dans le dossier /etc/cron.d/ via la commande rm -R /etc/cron.d/yunohost-dyndns en étant connecté en admin.

Merci encore.

hmmm, c’est un peu radical de supprimer ce fichier même si ça fonctionne. Possible que le diagnostique râle que ce fichier n’existe plus. Dans ce cas il faudra ajouter une exception “Ignorer” via la webadmin. Mais c’est mieux de passer par un hook comme ce que j’indique ci-dessous:

Il suffisait de commenter la ligne du script avec un # , et mieux, passer par un hook pour que yunohost considère ce changement comme natif afin que le diagnostique ne s’alarme pas:
Créer le fichier /etc/yunohost/hooks.d/conf_regen/02-yunohost_diag avec nano ou un autre éditeur.
Coller ce contenu:

#!/bin/bash

action=$1
pending_dir=$4
dns_conf=$pending_dir/../yunohost/etc/cron.d/yunohost-dyndns
[[ "$action" == "pre" ]] || exit 0
[[ -e $dns_conf ]] || exit 0
sed -e "/#/! s/^/#/g" \
    -i $dns_conf

Et activer le hook:

yunohost tools regen-conf yunohost --force

Ton fichier sera recréer si il n’existe plus (suppression avec rm) et la ligne sera commentée. Comme ça le résultat sera le même qu’un rm mais ça n’empêchera pas une mise à jour de ce script par l’équipe de yunohost et le diagnostique considérera ce changement comme natif.

1 Like

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