YunoHost Automatic Diagnosis; sleep

,

Bonjour, je vous écris car j’ai besoin d’un petit peu d’aide.
Hello, I wrote here because i need some help

My YunoHost server

Hardware: Old computer.
YunoHost version: 4.0.8.3 (stable).
I have access to my server : All the way possible.
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no.

Description of my issue

Return-Path: <root@domaine.tld>
Delivered-To: guillermo@domaine.tld
Received: by ankh.gr (Postfix, from userid 0)
	id 28D4A2C26B4; Mon,  4 Jan 2021 07:21:06 +0100 (CET)
From: root@domaine.tld (Cron Daemon)
To: root@domaine.tld
Subject: Cron <root@domaine.tld> : YunoHost Automatic Diagnosis; sleep $((RANDOM%1200)); yunohost diagnosis run --email > /dev/null 2>/dev/null || echo "Running the automatic diagnosis failed miserably"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
Message-Id: <20210104062106.28D4A2C26B4@domaine.tld>
Date: Mon,  4 Jan 2021 07:21:06 +0100 (CET)

Running the automatic diagnosis failed miserably

Even i can run diagnosis by ssh or web admin.
Is someone have idea ? And coul teach me
Thanks a lot in advance.
Guillermo


Mon serveur YunoHost

Matériel: Vieil ordinateur.
Version de YunoHost: 4.0.8.3 (stable).
J’ai accès à mon serveur : De toutes les manières possibles.
Êtes-vous dans un contexte particulier ou avez-vous effectué des modifications particulières sur votre instance ? : non.

Description du problème

Depuis une petite semaine à la place de recevoir le diagnostic, je reçois l’e-mail suivant :

Return-Path: <root@domaine.tld>
Delivered-To: guillermo@domaine.tld
Received: by ankh.gr (Postfix, from userid 0)
	id 28D4A2C26B4; Mon,  4 Jan 2021 07:21:06 +0100 (CET)
From: root@domaine.tld (Cron Daemon)
To: root@domaine.tld
Subject: Cron <root@domaine.tld> : YunoHost Automatic Diagnosis; sleep $((RANDOM%1200)); yunohost diagnosis run --email > /dev/null 2>/dev/null || echo "Running the automatic diagnosis failed miserably"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
Message-Id: <20210104062106.28D4A2C26B4@domaine.tld>
Date: Mon,  4 Jan 2021 07:21:06 +0100 (CET)

Running the automatic diagnosis failed miserably

Alors que lorsque je suis en SSH, ou sur la web admin et que je vais chercher le diagnostic, cela est fonctionnel.
Si quelqu’un à une idée et peut m’apprendre le comment comprendre et débloquer cela.

Merci beaucoup par avance.
Guillermo

Bonjour @Guillermo,

Sans aucune certitude car j’ai eu une erreur un peu différente, en changeant l’horaire de la tâche cron /etc/cron.d/yunohost-diagnosis, le diagnostique automatique fonctionne désormais correctement pour moi. Bug confirmé par @ljf.

1 Like

Hello @metyun,

J’ai essayé l’idée en mettant un horaire qui se situe à distance de mes autres événements crontab et j’obtiens toujours le même message d’erreur aux horaires demandés.

Ce n’est pas tant à distance de tes autres tâches cron mais c’est surtout à distance de l’horaire indiqué par défaut qu’il faut essayer car la tâche se lance pour tous les utilisateurs Yunohost à la même heure (sur une période de 20 min. si je comprends bien le RANDOM).
Pour ma part, je recevais bien le diagnostique mais celui-ci m’indiquait que le port 80 était injoignable. Comme toi, le diagnostique fonctionnait correctement par la webadmin ou en SSH mais pas à partir de Crontab.
L’erreur vient peut-être aussi d’ailleurs mais c’est la seule piste que j’ai .

1 Like

Je viens d’essayer en le mettant à 15h55 et c’est le même résultat.

I try to put it at 15h55 and same things, i don’t know what try to fix it

Could you try to run

yunohost diagnosis run --email --debug

and see if there are some errors or stack trace.

It said :

Résumé

root@domaine.tld:/home/admin# yunohost diagnosis run --email --debug
65 DEBUG loading actions map namespace ‘yunohost’
73 DEBUG extra parameter classes loaded: [‘comment’, ‘ask’, ‘password’, ‘required’, ‘pattern’]
74 DEBUG initializing base actions map parser for cli
74 DEBUG registering new callback action ‘yunohost.utils.packages.ynh_packages_version’ to [’-v’, ‘–version’]
114 DEBUG acquiring lock…
132 DEBUG lock has been acquired
146 DEBUG loading python module yunohost.diagnosis took 0.013s
146 INFO processing action [2216.1]: yunohost.diagnosis.run with args={‘except_if_never_ran_yet’: False, ‘force’: False, ‘email’: True, ‘categories’: []}
146 DEBUG No custom hook for action ‘diagnosis’ in /etc/yunohost/hooks.d/
146 DEBUG Running diagnosis for basesystem …
157 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/basesystem.json
157 INFO (Le cache est encore valide pour le diagnostic Système de base. Il ne sera pas re-diagnostiqué pour le moment!)
157 DEBUG Running diagnosis for ip …
175 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/ip.json
175 INFO (Le cache est encore valide pour le diagnostic Connectivité Internet. Il ne sera pas re-diagnostiqué pour le moment!)
175 DEBUG Running diagnosis for dnsrecords …
249 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/dnsrecords.json
249 INFO (Le cache est encore valide pour le diagnostic Enregistrements DNS. Il ne sera pas re-diagnostiqué pour le moment!)
249 DEBUG Running diagnosis for ports …
249 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/ports.json
250 INFO (Le cache est encore valide pour le diagnostic Exposition des ports. Il ne sera pas re-diagnostiqué pour le moment!)
250 DEBUG Running diagnosis for web …
340 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/web.json
340 INFO (Le cache est encore valide pour le diagnostic Web. Il ne sera pas re-diagnostiqué pour le moment!)
340 DEBUG Running diagnosis for mail …
341 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/mail.json
341 INFO (Le cache est encore valide pour le diagnostic E-mail. Il ne sera pas re-diagnostiqué pour le moment!)
341 DEBUG Running diagnosis for services …
342 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/services.json
342 INFO (Le cache est encore valide pour le diagnostic État des services. Il ne sera pas re-diagnostiqué pour le moment!)
342 DEBUG Running diagnosis for systemresources …
342 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/systemresources.json
343 INFO (Le cache est encore valide pour le diagnostic Ressources système. Il ne sera pas re-diagnostiqué pour le moment!)
343 DEBUG Running diagnosis for regenconf …
343 DEBUG Cache still valid : /var/cache/yunohost/diagnosis/regenconf.json
343 INFO (Le cache est encore valide pour le diagnostic Configurations système. Il ne sera pas re-diagnostiqué pour le moment!)
343 DEBUG No custom hook for action ‘diagnosis’ in /etc/yunohost/hooks.d/
365 DEBUG action [2216.1] executed in 0.219s
366 DEBUG lock has been released
Traceback (most recent call last):
File “/usr/bin/yunohost”, line 218, in timeout=opts.timeout,
File “/usr/lib/python2.7/dist-packages/moulinette/init.py”, line 149, in cli
moulinette.run(args, output_as=output_as, password=password, timeout=timeout)
File “/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py”, line 469, in run
ret = self.actionsmap.process(args, timeout=timeout)
File “/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py”, line 588, in process
return func(**arguments)
File “/usr/lib/moulinette/yunohost/diagnosis.py”, line 187, in diagnosis_run
email_diagnosis_issues()
File “/usr/lib/moulinette/yunohost/diagnosis.py”, line 568, in email_diagnosis_issues
issues = diagnosis_show(issues=True)[“reports”]
File “/usr/lib/moulinette/yunohost/diagnosis.py”, line 98, in diagnosis_show
Diagnoser.i18n(report, force_remove_html_tags=share or human_readable)
File “/usr/lib/moulinette/yunohost/diagnosis.py”, line 496, in i18n
item[“summary”] = m18n
(item[“summary”])
File “/usr/lib/moulinette/yunohost/diagnosis.py”, line 485, in m18n

s = m18n.n(info[0], **(info[1]))
File “/usr/lib/python2.7/dist-packages/moulinette/core.py”, line 268, in n
return self._namespaces[self._current_namespace].translate(key, *args, **kwargs)
File “/usr/lib/python2.7/dist-packages/moulinette/core.py”, line 104, in translate
.format(*args, **kwargs)
UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\xe2’ in position 10: ordinal not in range(128)
root@domaine.tld:/home/admin#

And now i have this when i try to launch a diagnosis.

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/api.py", line 485, in process
    ret = self.actionsmap.process(arguments, timeout=30, route=_route)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 592, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/diagnosis.py", line 97, in diagnosis_show
    Diagnoser.i18n(report, force_remove_html_tags=share or human_readable)
  File "/usr/lib/moulinette/yunohost/diagnosis.py", line 496, in i18n
    item["summary"] = m18n_(item["summary"])
  File "/usr/lib/moulinette/yunohost/diagnosis.py", line 485, in m18n_
    s = m18n.n(info[0], **(info[1]))
  File "/usr/lib/python2.7/dist-packages/moulinette/core.py", line 266, in n
    return self._namespaces[self._current_namespace].translate(key, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/moulinette/core.py", line 102, in translate
    .format(*args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 10: ordinal not in range(128)

Hmpf okay sounds like an encoding issue …

If you’re okay, let’s savagely hack the code to add a print and see what it’s trying to translate:

(NB. spaces are important in this command)

sed -i 's@s = m18n@print(info)\n                s = m18n@g' /usr/lib/moulinette/yunohost/diagnosis.py

Then re-run the diagnosis command you just launched, and we should see some additional info before the stacktrace

I don’t know if it’s link but since few days ago i obtain this when i do a yunohost backup

Source path '/etc/yunohost/dyndns' does not exist
Source path '/etc/cron.d/yunohost-dyndns' does not exist

And for the print i obtain this when i send yunohost diagnosis

I just switch my IP adresse by
PUBLIC IP ADRESS
or
INTERNAL IP
and
DOMAINE.TLD

Trace
(u'diagnosis_basesystem_hardware', {u'test': u'hardware', u'virt': u'bare-metal', u'model': u'LENOVO 10J0S1CK00', u'arch': u'amd64'})
(u'diagnosis_basesystem_hardware_model', {u'test': u'hardware', u'virt': u'bare-metal', u'model': u'LENOVO 10J0S1CK00', u'arch': u'amd64'})
(u'diagnosis_basesystem_kernel', {u'test': u'kernel', u'kernel_version': u'4.19.0-13-amd64'})
(u'diagnosis_basesystem_host', {u'test': u'host', u'debian_version': u'10.7'})
(u'diagnosis_basesystem_ynh_main_version', {u'test': u'ynh_versions', u'repo': u'stable', u'main_version': u'4.1.4.4'})
[u'diagnosis_basesystem_ynh_single_version', {u'repo': u'stable', u'main_version': u'4.1.4.4', u'version': u'4.1.4.4', u'package': u'yunohost', u'test': u'ynh_versions'}]
[u'diagnosis_basesystem_ynh_single_version', {u'repo': u'stable', u'main_version': u'4.1.4.4', u'version': u'4.1.3', u'package': u'yunohost-admin', u'test': u'ynh_versions'}]
[u'diagnosis_basesystem_ynh_single_version', {u'repo': u'stable', u'main_version': u'4.1.4.4', u'version': u'4.1.3', u'package': u'moulinette', u'test': u'ynh_versions'}]
[u'diagnosis_basesystem_ynh_single_version', {u'repo': u'stable', u'main_version': u'4.1.4.4', u'version': u'4.1.2', u'package': u'ssowat', u'test': u'ynh_versions'}]
(u'diagnosis_ip_dnsresolution_working', {u'test': u'dnsresolv'})
(u'diagnosis_ip_connected_ipv4', {u'test': u'ipv4', u'global': u'PUBLIC IP ADRESS u'local': u'PUBLIC IP ADRESS'})
(u'diagnosis_ip_global', {u'test': u'ipv4', u'global': u'PUBLIC IP ADRESS', u'local': u'INTERNAL IP'})
(u'diagnosis_ip_local', {u'test': u'ipv4', u'global': u'PUBLIC IP ADRESS', u'local': u'INTERNAL IP'})
(u'diagnosis_ip_no_ipv6', {u'test': u'ipv6', u'global': None, u'local': u'IPV6 ADRESSS'})
(u'diagnosis_ip_no_ipv6_tip', {u'test': u'ipv6', u'global': None, u'local': u'IPV6 ADRESS})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'mail', u'MX:@': u'OK', u'domain': u'DOMAINE.TLD', u'TXT:@': u'OK', u'TXT:mail._domainkey': u'OK', u'TXT:_dmarc': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'xmpp', u'CNAME:vjud': u'OK', u'domain': u'DOMAINE.TLD', u'CNAME:muc': u'OK', u'CNAME:xmpp-upload': u'OK', u'SRV:_xmpp-server._tcp': u'OK', u'SRV:_xmpp-client._tcp': u'OK', u'CNAME:pubsub': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'extra', u'domain': u'DOMAINE.TLD', u'A:*': u'OK', u'CAA:@': u'OK', u'AAAA:*': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'carnet.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'collabora.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'courriel.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'famille.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'nuage.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'pal.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'qr.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'test.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'url.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'visio.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'webmail.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_dns_good_conf', {u'category': u'basic', u'A:@': u'OK', u'domain': u'wiki.DOMAINE.TLD', u'AAAA:@': u'OK'})
(u'diagnosis_ports_ok', {u'category': u'admin', u'port': u'22', u'service': u'ssh'})
(u'diagnosis_ports_needed_by', {u'category': u'admin', u'port': u'22', u'service': u'ssh'})
(u'diagnosis_ports_ok', {u'category': u'email', u'port': u'25', u'service': u'postfix'})
(u'diagnosis_ports_needed_by', {u'category': u'email', u'port': u'25', u'service': u'postfix'})
(u'diagnosis_ports_ok', {u'category': u'web', u'port': u'80', u'service': u'nginx'})
(u'diagnosis_ports_needed_by', {u'category': u'web', u'port': u'80', u'service': u'nginx'})
(u'diagnosis_ports_ok', {u'category': u'web', u'port': u'443', u'service': u'nginx'})
(u'diagnosis_ports_needed_by', {u'category': u'web', u'port': u'443', u'service': u'nginx'})
(u'diagnosis_ports_ok', {u'category': u'email', u'port': u'587', u'service': u'postfix'})
(u'diagnosis_ports_needed_by', {u'category': u'email', u'port': u'587', u'service': u'postfix'})
(u'diagnosis_ports_ok', {u'category': u'email', u'port': u'993', u'service': u'dovecot'})
(u'diagnosis_ports_needed_by', {u'category': u'email', u'port': u'993', u'service': u'dovecot'})
(u'diagnosis_ports_ok', {u'category': u'xmpp', u'port': u'5222', u'service': u'metronome'})
(u'diagnosis_ports_needed_by', {u'category': u'xmpp', u'port': u'5222', u'service': u'metronome'})
(u'diagnosis_ports_ok', {u'category': u'xmpp', u'port': u'5269', u'service': u'metronome'})
(u'diagnosis_ports_needed_by', {u'category': u'xmpp', u'port': u'5269', u'service': u'metronome'})
(u'diagnosis_http_ok', {u'domain': u'DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'carnet.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'collabora.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'courriel.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'famille.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'nuage.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'pal.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'qr.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'test.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'url.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'visio.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'webmail.DOMAINE.TLD'})
(u'diagnosis_http_ok', {u'domain': u'wiki.DOMAINE.TLD'})
(u'diagnosis_mail_outgoing_port_25_blocked', {u'test': u'outgoing_port_25', u'ipversion': 4})
(u'diagnosis_mail_outgoing_port_25_blocked_details', {u'test': u'outgoing_port_25', u'ipversion': 4})
(u'diagnosis_mail_outgoing_port_25_blocked_relay_vpn', {u'test': u'outgoing_port_25', u'ipversion': 4})
(u'diagnosis_mail_ehlo_ok', {u'test': u'mail_ehlo'})
(u'diagnosis_mail_fcrdns_different_from_ehlo_domain', {u'test': u'mail_fcrdns', u'ipversion': 4, u'ip': u'PUBLIC IP ADRESS', u'ehlo_domain': u'DOMAINE.TLD', u'rdns_domain': u'adijon-651-1-229-23.w109-217.abo.wanadoo.fr'})
(u'diagnosis_mail_fcrdns_different_from_ehlo_domain_details', {u'test': u'mail_fcrdns', u'ipversion': 4, u'ip': u'PUBLIC IP ADRESS', u'ehlo_domain': u'DOMAINE.TLD', u'rdns_domain': u'adijon-651-1-229-23.w109-217.abo.wanadoo.fr'})
(u'diagnosis_mail_fcrdns_nok_details', {u'test': u'mail_fcrdns', u'ipversion': 4, u'ip': u'PUBLIC IP ADRESS', u'ehlo_domain': u'DOMAINE.TLD', u'rdns_domain': u'adijon-651-1-229-23.w109-217.abo.wanadoo.fr'})
(u'diagnosis_mail_fcrdns_nok_alternatives_4', {u'test': u'mail_fcrdns', u'ipversion': 4, u'ip': u'PUBLIC IP ADRESS', u'ehlo_domain': u'DOMAINE.TLD', u'rdns_domain': u'adijon-651-1-229-23.w109-217.abo.wanadoo.fr'})
(u'diagnosis_mail_blacklist_listed_by', {u'blacklist': u'zen.spamhaus.org', u'item': u'PUBLIC IP ADRESS', u'blacklist_website': u'https://www.spamhaus.org/zen/', u'blacklist_name': u'Spamhaus ZEN', u'test': u'mail_blacklist', u'reason': u'"https://www.spamhaus.org/query/ip/PUBLIC IP ADRESS"'})
(u'diagnosis_mail_blacklist_reason', {u'blacklist': u'zen.spamhaus.org', u'item': u'PUBLIC IP ADRESS', u'blacklist_website': u'https://www.spamhaus.org/zen/', u'blacklist_name': u'Spamhaus ZEN', u'test': u'mail_blacklist', u'reason': u'"https://www.spamhaus.org/query/ip/PUBLIC IP ADRESS"'})
(u'diagnosis_mail_blacklist_website', {u'blacklist': u'zen.spamhaus.org', u'item': u'PUBLIC IP ADRESS', u'blacklist_website': u'https://www.spamhaus.org/zen/', u'blacklist_name': u'Spamhaus ZEN', u'test': u'mail_blacklist', u'reason': u'"https://www.spamhaus.org/query/ip/PUBLIC IP ADRESS"'})
(u'diagnosis_mail_blacklist_listed_by', {u'blacklist': u'dnsbl.spfbl.net', u'item': u'PUBLIC IP ADRESS', u'blacklist_website': u'https://spfbl.net/en/dnsbl/', u'blacklist_name': u'SPFBL.net RBL', u'test': u'mail_blacklist', u'reason': u'"https://matrix.spfbl.net/PUBLIC IP ADRESS"'})
(u'diagnosis_mail_blacklist_reason', {u'blacklist': u'dnsbl.spfbl.net', u'item': u'PUBLIC IP ADRESS', u'blacklist_website': u'https://spfbl.net/en/dnsbl/', u'blacklist_name': u'SPFBL.net RBL', u'test': u'mail_blacklist', u'reason': u'"https://matrix.spfbl.net/PUBLIC IP ADRESS"'})
(u'diagnosis_mail_blacklist_website', {u'blacklist': u'dnsbl.spfbl.net', u'item': u'PUBLIC IP ADRESS', u'blacklist_website': u'https://spfbl.net/en/dnsbl/', u'blacklist_name': u'SPFBL.net RBL', u'test': u'mail_blacklist', u'reason': u'"https://matrix.spfbl.net/PUBLIC IP ADRESS"'})
(u'diagnosis_mail_queue_ok', {u'test': u'mail_queue', u'nb_pending': 5})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'avahi-daemon'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'valid', u'service': u'dnsmasq'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'dovecot'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'etherpad_mypads'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'valid', u'service': u'fail2ban'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'lstu'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'metronome'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'minidlna'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'mysql'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'valid', u'service': u'nginx'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'valid', u'service': u'php7.3-fpm'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'postfix'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'postgresql'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'redis-server'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'rspamd'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'valid', u'service': u'slapd'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'valid', u'service': u'ssh'})
(u'diagnosis_services_bad_status', {u'status': u'dead', u'configuration': u'unknown', u'service': u'yunohost-api'})
(u'diagnosis_services_bad_status_tip', {u'status': u'dead', u'configuration': u'unknown', u'service': u'yunohost-api'})
(u'diagnosis_services_running', {u'status': u'running', u'configuration': u'unknown', u'service': u'yunohost-firewall'})
(u'diagnosis_ram_ok', {u'test': u'ram', u'available': u'2.6 GiB', u'total': u'3.7 GiB', u'available_percent': 68})
(u'diagnosis_swap_ok', {u'test': u'swap', u'recommended': u'512 MiB', u'total': u'976 MiB'})
(u'diagnosis_swap_tip', {u'test': u'swap', u'recommended': u'512 MiB', u'total': u'976 MiB'})
(u'diagnosis_diskusage_ok', {u'test': u'diskusage', u'device': u'/dev/sda6', u'mountpoint': u'/', u'total': u'110 GiB', u'free_percent': 70, u'free': u'77 GiB'})
(u'diagnosis_diskusage_ok', {u'test': u'diskusage', u'device': u'/dev/sda1', u'mountpoint': u'/boot', u'total': u'215 MiB', u'free_percent': 57, u'free': u'123 MiB'})
(u'diagnosis_diskusage_ok', {u'test': u'diskusage', u'device': u'/dev/sdb1', u'mountpoint': u'/media/Dou\xe2t', u'total': u'111 GiB', u'free_percent': 76, u'free': u'84 GiB'})
Traceback (most recent call last):
  File "/usr/bin/yunohost", line 72, in <module>
    parser=parser
  File "/usr/lib/moulinette/yunohost/__init__.py", line 29, in cli
    top_parser=parser
  File "/usr/lib/python2.7/dist-packages/moulinette/__init__.py", line 120, in cli
    args, output_as=output_as, timeout=timeout
  File "/usr/lib/python2.7/dist-packages/moulinette/interfaces/cli.py", line 477, in run
    ret = self.actionsmap.process(args, timeout=timeout)
  File "/usr/lib/python2.7/dist-packages/moulinette/actionsmap.py", line 592, in process
    return func(**arguments)
  File "/usr/lib/moulinette/yunohost/diagnosis.py", line 97, in diagnosis_show
    Diagnoser.i18n(report, force_remove_html_tags=share or human_readable)
  File "/usr/lib/moulinette/yunohost/diagnosis.py", line 497, in i18n
    item["summary"] = m18n_(item["summary"])
  File "/usr/lib/moulinette/yunohost/diagnosis.py", line 486, in m18n_
    s = m18n.n(info[0], **(info[1]))
  File "/usr/lib/python2.7/dist-packages/moulinette/core.py", line 266, in n
    return self._namespaces[self._current_namespace].translate(key, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/moulinette/core.py", line 102, in translate
    .format(*args, **kwargs)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 10: ordinal not in range(128)

Soooo that’s the reason why it’s crashing … didnt expect you could have special chars in filenames … of course that’s not your fault and the code should keep working even in that situation … will have a look on how to fix this …

So if i change my mount point i could fix it ?

How can i go back before doing this :

sed -i 's@s = m18n@print(info)\n                s = m18n@g' /usr/lib/moulinette/yunohost/diagnosis.py

And sorry i don’t imagine i could make trouble

You can edit the file with nano /usr/lib/moulinette/yunohost/diagnosis.py

find the line written print(info), and delete that line entirely

(Alternatively, just upgrading yunohost at some point will overwrite all the source files)

1 Like

Thanks a lot :slight_smile:
I change the hour of cron diagnosis and it work perfectly thanks a lott