Diagnosis: No reaction

My YunoHost server

Hardware: VPS bought online
YunoHost version: 4.0.8.2
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

Whenever I start the diagnosis menu the server seems to hang and does not respond. After restarting yunohost-api from ssh everything works fine again.

1 Like

What happens if you run this from the CLI with something like

yunohost diagnosis run --debug

I get the following output. There are longer sections where nothing is happening. After some timeout it seem that some DNS stuff is happening. It took some time but finally finished. Is it ok to run about 7 minutes?

$ sudo yunohost diagnosis run --debug
81   DEBUG loading actions map namespace 'yunohost'
91   DEBUG extra parameter classes loaded: ['comment', 'ask', 'password', 'required', 'pattern']
91   DEBUG initializing base actions map parser for cli
92   DEBUG registering new callback action 'yunohost.utils.packages.ynh_packages_version' to ['-v', '--version']
130  DEBUG acquiring lock...
150  DEBUG lock has been acquired
162  DEBUG loading python module yunohost.diagnosis took 0.012s
163  INFO processing action [19868.1]: yunohost.diagnosis.run with args={'except_if_never_ran_yet': False, 'force': False, 'email': False, 'categories': []}
163  DEBUG No custom hook for action 'diagnosis' in /etc/yunohost/hooks.d/
163  DEBUG Running diagnosis for basesystem ...
204  DEBUG Using cached results for meltdown checker, from /tmp/yunohost-meltdown-diagnosis
292  DEBUG Updating cache /var/cache/yunohost/diagnosis/basesystem.json
293  SUCCESS Everything looks good for Base system!
293  DEBUG Running diagnosis for ip ...
457  DEBUG Starting new HTTPS connection (1): ip.yunohost.org:443
552  DEBUG https://ip.yunohost.org:443 "GET / HTTP/1.1" 200 13
559  DEBUG Starting new HTTPS connection (1): ip6.yunohost.org:443
677  DEBUG https://ip6.yunohost.org:443 "GET / HTTP/1.1" 200 20
693  DEBUG Updating cache /var/cache/yunohost/diagnosis/ip.json
695  SUCCESS Everything looks good for Internet connectivity!
695  DEBUG Running diagnosis for dnsrecords ...
803  DEBUG initialize authenticator 'as-root' with: uri='ldapi://%2Fvar%2Frun%2Fslapd%2Fldapi', base_dn='dc=yunohost,dc=org', user_rdn='gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth'
812  DEBUG Diagnosing DNS conf for md.0xabc.de
818  DEBUG Fetching IP from https://ip.yunohost.org 
820  DEBUG Starting new HTTPS connection (1): ip.yunohost.org:443
911  DEBUG https://ip.yunohost.org:443 "GET / HTTP/1.1" 200 13
915  DEBUG IP fetched: 78.47.240.134
932  DEBUG Fetching IP from https://ip6.yunohost.org 
935  DEBUG Starting new HTTPS connection (1): ip6.yunohost.org:443
1035 DEBUG https://ip6.yunohost.org:443 "GET / HTTP/1.1" 200 20
1039 DEBUG IP fetched: 2a01:4f8:c0c:33e4::1
1041 DEBUG No default hook for action 'custom_dns_rules' in /usr/share/yunohost/hooks/
1041 DEBUG No custom hook for action 'custom_dns_rules' in /etc/yunohost/hooks.d/

76823 DEBUG Diagnosing DNS conf for ynh.0xabc.de
76824 DEBUG Reusing IPv4 from cache: 78.47.240.134
76824 DEBUG Reusing IPv6 from cache: 2a01:4f8:c0c:33e4::1
76825 DEBUG No default hook for action 'custom_dns_rules' in /usr/share/yunohost/hooks/
76825 DEBUG No custom hook for action 'custom_dns_rules' in /etc/yunohost/hooks.d/

152591 DEBUG Diagnosing DNS conf for wiki.0xabc.de
152607 DEBUG Fetching IP from https://ip.yunohost.org 
152612 DEBUG Starting new HTTPS connection (1): ip.yunohost.org:443
152731 DEBUG https://ip.yunohost.org:443 "GET / HTTP/1.1" 200 13
152736 DEBUG IP fetched: 78.47.240.134
152750 DEBUG Fetching IP from https://ip6.yunohost.org 
152753 DEBUG Starting new HTTPS connection (1): ip6.yunohost.org:443
152849 DEBUG https://ip6.yunohost.org:443 "GET / HTTP/1.1" 200 20
152852 DEBUG IP fetched: 2a01:4f8:c0c:33e4::1
152854 DEBUG No default hook for action 'custom_dns_rules' in /usr/share/yunohost/hooks/
152855 DEBUG No custom hook for action 'custom_dns_rules' in /etc/yunohost/hooks.d/

228631 DEBUG Diagnosing DNS conf for nextcloud.0xabc.de
228633 DEBUG Reusing IPv4 from cache: 78.47.240.134
228634 DEBUG Reusing IPv6 from cache: 2a01:4f8:c0c:33e4::1
228636 DEBUG No default hook for action 'custom_dns_rules' in /usr/share/yunohost/hooks/
228636 DEBUG No custom hook for action 'custom_dns_rules' in /etc/yunohost/hooks.d/

314851 DEBUG Dyndns domain: 0xabc.de
314854 DEBUG Updating cache /var/cache/yunohost/diagnosis/dnsrecords.json
314861 WARNING Found 12 item(s) that could be improved for DNS records.
314862 DEBUG Running diagnosis for ports ...
314877 DEBUG Starting new HTTPS connection (1): diagnosis.yunohost.org:443
315091 DEBUG https://diagnosis.yunohost.org:443 "POST /check-ports HTTP/1.1" 200 98
315108 DEBUG Starting new HTTPS connection (1): diagnosis.yunohost.org:443
315339 DEBUG https://diagnosis.yunohost.org:443 "POST /check-ports HTTP/1.1" 200 98
315341 DEBUG Updating cache /var/cache/yunohost/diagnosis/ports.json
315342 SUCCESS Everything looks good for Ports exposure!
315343 DEBUG Running diagnosis for web ...
315367 DEBUG Starting new HTTPS connection (1): diagnosis.yunohost.org:443
315601 DEBUG https://diagnosis.yunohost.org:443 "POST /check-http HTTP/1.1" 200 140
315610 DEBUG Starting new HTTPS connection (1): diagnosis.yunohost.org:443
315852 DEBUG https://diagnosis.yunohost.org:443 "POST /check-http HTTP/1.1" 200 140
315858 DEBUG Starting new HTTP connection (1): 78.47.240.134:80
315862 DEBUG http://78.47.240.134:80 "HEAD / HTTP/1.1" 302 0
315864 DEBUG Updating cache /var/cache/yunohost/diagnosis/web.json
315865 SUCCESS Everything looks good for Web!
315865 DEBUG Running diagnosis for mail ...
315871 DEBUG Running check_outgoing_port_25
315913 DEBUG Running check_ehlo
315916 DEBUG Starting new HTTPS connection (1): diagnosis.yunohost.org:443
316074 DEBUG https://diagnosis.yunohost.org:443 "POST /check-smtp HTTP/1.1" 200 37
316079 DEBUG Starting new HTTPS connection (1): diagnosis.yunohost.org:443
316215 DEBUG https://diagnosis.yunohost.org:443 "POST /check-smtp HTTP/1.1" 200 37
316217 DEBUG Running check_fcrdns
326668 DEBUG Running check_blacklist
368888 DEBUG Running check_queue
368926 DEBUG Updating cache /var/cache/yunohost/diagnosis/mail.json
368927 ERROR Found 1 significant issue(s) related to Email!
368928 DEBUG Running diagnosis for services ...
369114 ERROR unable to retrieve string to translate with key 'service_description_postgresql' for default locale 'locales/en.json' file (don't panic this is just a warning)
None
369359 ERROR unable to retrieve string to translate with key 'service_description_monitorix' for default locale 'locales/en.json' file (don't panic this is just a warning)
None
369393 DEBUG Updating cache /var/cache/yunohost/diagnosis/services.json
369395 SUCCESS Everything looks good for Services status check!
369395 DEBUG Running diagnosis for systemresources ...
369397 DEBUG Updating cache /var/cache/yunohost/diagnosis/systemresources.json
369398 SUCCESS Everything looks good for System resources!
369398 DEBUG Running diagnosis for regenconf ...
369430 DEBUG Updating cache /var/cache/yunohost/diagnosis/regenconf.json
369432 WARNING Found 1 item(s) that could be improved for System configurations.
369432 WARNING To see the issues found, you can go to the Diagnosis section of the webadmin, or run 'yunohost diagnosis show --issues' from the command-line.
369433 DEBUG action [19868.1] executed in 369.270s
369434 DEBUG lock has been released

Ehh i guess it can run for 7 minutes for many reasons but that sounds excessively long … I would expect 1 minute max.

Naively I think this may be due to some timeout issues … maybe something to do with the dns resolvers in /etc/resolv.dnsmasq.conf - or maybe the lack of IPv6, something like this :s But difficult to tell exactly without being able to tests some stuff manually

I guess you could try to check if one of these commands takes longer than the others

dig +short google.com
dig +short google.com @127.0.0.1
dig +short google.com @8.8.8.8
dig +short google.com @9.9.9.9

Yes, I agree. It’s hard to support such cases.

All the commands you gave to me worked extremely fast. The server runs on a Hetzner-VPS. Never had any networking issues with them. It’s not a big problem for me as I am running the diagnosis tool not often. However I wanted you to know about this as it seems to be not normal.

$ time dig +short google.com
216.58.215.110

real	0m0.022s
user	0m0.013s
sys	0m0.008s

$ time dig +short google.com @127.0.0.1
216.58.215.110

real	0m0.016s
user	0m0.008s
sys	0m0.008s

$ time dig +short google.com @8.8.8.8
172.217.21.238

real	0m0.031s
user	0m0.013s
sys	0m0.003s

$ time dig +short google.com @9.9.9.9
216.58.201.78

real	0m0.057s
user	0m0.013s
sys	0m0.000s
admin@yunohost:~$ 

I’m experiencing a similar issue. The logs for me look like this, and then freeze:

111  DEBUG loading actions map namespace 'yunohost'
128  DEBUG extra parameter classes loaded: ['comment', 'ask', 'password', 'required', 'pattern']
128  DEBUG initializing base actions map parser for cli
129  DEBUG registering new callback action 'yunohost.utils.packages.ynh_packages_version' to ['-v', '--version']
188  DEBUG acquiring lock...
211  DEBUG lock has been acquired
227  DEBUG loading python module yunohost.diagnosis took 0.015s
227  INFO processing action [3218.1]: yunohost.diagnosis.run with args={'except_if_never_ran_yet': False, 'force': False, 'email': False, 'categories': []}
227  DEBUG No custom hook for action 'diagnosis' in /etc/yunohost/hooks.d/
227  DEBUG Running diagnosis for basesystem ...
239  DEBUG Cache still valid : /var/cache/yunohost/diagnosis/basesystem.json
239  INFO (Cache still valid for Base system diagnosis. Won't re-diagnose it yet!)
239  DEBUG Running diagnosis for ip ...
255  DEBUG Cache still valid : /var/cache/yunohost/diagnosis/ip.json
255  INFO (Cache still valid for Internet connectivity diagnosis. Won't re-diagnose it yet!)
256  DEBUG Running diagnosis for dnsrecords ...
413  DEBUG initialize authenticator 'as-root' with: uri='ldapi://%2Fvar%2Frun%2Fslapd%2Fldapi', base_dn='dc=yunohost,dc=org', user_rdn='gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth'
430  DEBUG Diagnosing DNS conf for <readacted>
431  DEBUG Reusing IPv4 from cache: <redacted>
431  DEBUG Reusing IPv6 from cache: None
432  DEBUG No default hook for action 'custom_dns_rules' in /usr/share/yunohost/hooks/
432  DEBUG No custom hook for action 'custom_dns_rules' in /etc/yunohost/hooks.d/

While diagnosing it with strace, it seemed like the 80.67.190.200 DNS server was timing out. I edited the /etc/resolv.dnsmasq.conf file to only contain google’s dns and now the diagnosis works

U wot m8

I know, I don’t like google as well, I just wanted to quickly check if another dns would fix it, and that’s the address that I remember (8.8.8.8).

Anyway - the issue was that one of the DNS servers times out. For some reason the script insisted on using 80.67.190.200. The dig command worked before changing the dns, but the diagnose script didn’t.

Removing that faulty dns server from config resolved the issue for me

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