You are not logged in.

#1 2018-11-27 13:27:39

vigilian
Member
Registered: 2016-06-05
Posts: 23

[solved]super long boot time + 7 min to start sshd

Hi,

I have a long boot time process for several months now that I didn't resolve yet. it's in a archlinux vm on kvm. Full cli, no graphical interface.

sudo systemd-analyze
Startup finished in 2.422s (kernel) + 1min 34.066s (userspace) = 1min 36.489s
graphical.target reached after 1min 34.066s in userspace
[test@seedboxarchvpn ~]$ sudo systemd-analyze blame    
    1min 30.129s gssproxy.service     
          1.973s lvm2-monitor.service                   
          1.900s systemd-journal-flush.service
          1.641s dev-vda1.device 
          509ms var-lib-nfs-rpc_pipefs.mount                                                                                                                                                                                                                                                    [76/1329]
           480ms iptables.service              
           472ms systemd-logind.service           
           400ms systemd-udevd.service
           335ms systemd-tmpfiles-setup-dev.service
           274ms systemd-tmpfiles-clean.service
           272ms systemd-fsck@dev-disk-by\x2duuid-62091cc3\x2d6ad8\x2d4e19\x2dbcd8\x2d2f1b52a05e55.service
           260ms netctl@ens3.service
           188ms user@1000.service
           119ms netctl.service
            71ms systemd-udev-trigger.service                      
            69ms sys-kernel-debug.mount
            69ms systemd-remount-fs.service
            68ms systemd-tmpfiles-setup.service
            63ms dev-hugepages.mount
            62ms systemd-journald.service                                        
            61ms dev-mqueue.mount      
            56ms sys-kernel-config.mount
            51ms home.mount                  
            51ms rpc-statd-notify.service                               
            37ms kmod-static-nodes.service               
            35ms systemd-update-utmp.service
            33ms systemd-sysctl.service                                                                      
            30ms systemd-random-seed.service  
            29ms dev-disk-by\x2duuid-5cbc3818\x2da43b\x2d43a0\x2d8fe8\x2d4b7a06ad0bf9.swap
             5ms systemd-user-sessions.service
             2ms tmp.mount                    
[test@seedboxarchvpn ~]$ sudo systemd-analyze critical-chain
The time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.
                                         
graphical.target @1min 34.066s 
└─multi-user.target @1min 34.066s
  └─getty.target @1min 34.066s                             
    └─getty@tty1.service @1min 34.066s
      └─systemd-user-sessions.service @1min 34.059s +5ms
        └─remote-fs.target @1min 34.058s  
          └─remote-fs-pre.target @1min 34.058s
            └─nfs-client.target @1min 34.058s

and as you can see there is no sshd server mentionned and it still starts up after 6 or 7 minutes.

Nov 27 12:37:27 seedboxarchvpn kernel: audit: type=1130 audit(1543322247.526:26): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-user>                                                                                                                                           
Nov 27 12:37:27 seedboxarchvpn kernel: audit: type=1130 audit(1543322247.526:27): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 c>
Nov 27 12:44:02 seedboxarchvpn kernel: random: crng init done                                             
Nov 27 12:44:03 seedboxarchvpn kernel: random: 7 urandom warning(s) missed due to ratelimiting
Nov 27 12:44:03 seedboxarchvpn sshd[335]: Server listening on 0.0.0.0 port 22.                                                                      
Nov 27 12:35:58 seedboxarchvpn audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=sshd comm="systemd" exe="/usr/lib/syste>
Nov 27 12:35:58 seedboxarchvpn sm-notify[334]: Version 2.3.3 starting                 
Nov 27 12:35:58 seedboxarchvpn systemd[1]: Started Notify NFS peers of a restart.                                                                   
Nov 27 12:35:58 seedboxarchvpn audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=rpc-statd-notify comm="systemd" exe="/u>
Nov 27 12:35:58 seedboxarchvpn network[298]: Started network profile 'ens3'           
Nov 27 12:37:27 seedboxarchvpn systemd[1]: gssproxy.service: Start operation timed out. Terminating.                                                
Nov 27 12:37:27 seedboxarchvpn systemd[1]: gssproxy.service: Failed with result 'timeout'.
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Failed to start GSSAPI Proxy Daemon.                                                                     
Nov 27 12:37:27 seedboxarchvpn audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=gssproxy comm="systemd" exe="/usr/lib/s>
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Reached target NFS client services.                                                                      
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Reached target Remote File Systems (Pre).                                                                
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Reached target Remote File Systems.                                  
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Starting Permit User Sessions...               
Nov 27 12:37:27 seedboxarchvpn kernel: kauditd_printk_skb: 9 callbacks suppressed                                                                   
Nov 27 12:37:27 seedboxarchvpn kernel: audit: type=1130 audit(1543322247.519:25): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=gssproxy com>
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Started Permit User Sessions.                            
Nov 27 12:37:27 seedboxarchvpn audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-user-sessions comm="systemd" ex>
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Started Getty on tty1.                                              
Nov 27 12:37:27 seedboxarchvpn audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 comm="systemd" exe="/usr/lib>
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Reached target Login Prompts.           
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Reached target Multi-User System.                                                                        
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Reached target Graphical Interface.                                                  
Nov 27 12:37:27 seedboxarchvpn systemd[1]: Startup finished in 2.422s (kernel) + 1min 34.066s (userspace) = 1min 36.489s.
Nov 27 12:37:27 seedboxarchvpn kernel: audit: type=1130 audit(1543322247.526:26): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-user>
Nov 27 12:37:27 seedboxarchvpn kernel: audit: type=1130 audit(1543322247.526:27): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 c>
Nov 27 12:44:02 seedboxarchvpn kernel: random: crng init done                                                    
Nov 27 12:44:03 seedboxarchvpn kernel: random: 7 urandom warning(s) missed due to ratelimiting                                                      
Nov 27 12:44:03 seedboxarchvpn sshd[335]: Server listening on 0.0.0.0 port 22.                                                                      
Nov 27 12:44:03 seedboxarchvpn sshd[335]: Server listening on :: port 22.                                                                           
Nov 27 12:44:37 seedboxarchvpn sshd[360]: Accepted password for test from 10.0.0.4 port 43056 ssh2           

I can't even start openvpn client or nginx or anything else due to timeout. I really don't understand why it would happening on a practically new installation.
what should I do? There is practically no services started

Last edited by vigilian (2018-11-27 19:04:48)

Offline

#2 2018-11-27 14:08:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,844

Re: [solved]super long boot time + 7 min to start sshd

There's a known issue with the kernels early boot entropy generation, install and enable haveged for a software based entropy generation utility.

Offline

#3 2018-11-27 14:27:51

judd1
Member
Registered: 2015-09-04
Posts: 260

Re: [solved]super long boot time + 7 min to start sshd

V1del wrote:

There's a known issue with the kernels early boot entropy generation, install and enable haveged for a software based entropy generation utility.

https://wiki.archlinux.org/index.php/Haveged

# cat /proc/sys/kernel/random/entropy_avail

Last edited by judd1 (2018-11-27 14:28:44)


This isn't right. This isn't even wrong.
-- Wolfgang Pauli --

Offline

#4 2018-11-27 14:46:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,601
Website

Re: [solved]super long boot time + 7 min to start sshd

In addition, if your machine has a hardware random number generator, using rng-tools is better than haveged.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2018-11-27 19:04:05

vigilian
Member
Registered: 2016-06-05
Posts: 23

Re: [solved]super long boot time + 7 min to start sshd

A big big thanks to all of you. Indeed rng-tools provide me with enough entropy thanks to rdrand and the host-model option in libvirt.

Offline

Board footer

Powered by FluxBB