记录一次 Failed to start Session c413585 of user root. 报错处理
前景描述
-
问题是在做时间同步的时候发现的
ntp server
配置启动成功之后,去配置ntp clinet
端并重启服务发现的问题
[root@node-2 ~]# systemctl start chronyd && systemctl enable chronyd Job for chronyd.service failed because a timeout was exceeded. See "systemctl status chronyd.service" and "journalctl -xe" for details.
- 执行
journalctl -x
[root@node-2 ~]# journalctl -x ... Aug 31 16:35:00 node-2.domain.tld systemd[1]: Failed to start Session c408725 of user root. -- Subject: Unit session-c408725.scope has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit session-c408725.scope has failed. -- -- The result is failed.
- 检查
messages
日志
[root@node-2 ~]# tail -n 10 /var/log/messages Sep 1 10:40:55 node-2 systemd: Failed to start Session c413576 of user root. Sep 1 10:40:56 node-2 systemd: Failed to start Session c413577 of user root. Sep 1 10:40:57 node-2 systemd: Failed to start Session c413578 of user root. Sep 1 10:40:58 node-2 systemd: Failed to start Session c413579 of user root. Sep 1 10:40:59 node-2 systemd: Failed to start Session c413580 of user root. Sep 1 10:41:00 node-2 systemd: Failed to start Session c413581 of user root. Sep 1 10:41:01 node-2 systemd: Failed to start Session c413582 of user root. Sep 1 10:41:02 node-2 systemd: Failed to start Session c413583 of user root. Sep 1 10:41:04 node-2 systemd: Failed to start Session c413584 of user root. Sep 1 10:41:06 node-2 systemd: Failed to start Session c413585 of user root.
-
通过以上报错的提示查询了相关的处理文档,同时检查了存储使用量、文件权限、以及服务配置等均为发现问题
- 存储使用量
[root@node-2 ~]# df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 16G 0 16G 0% /dev tmpfs 16G 0 16G 0% /dev/shm tmpfs 16G 485M 16G 4% /run tmpfs 16G 0 16G 0% /sys/fs/cgroup /dev/mapper/centos-root 80G 22G 59G 28% / /dev/sda1 497M 145M 353M 30% /boot /dev/sda3 500M 16K 500M 1% /boot/efi tmpfs 3.2G 0 3.2G 0% /run/user/0
- 文件权限
[root@node-2 ~]# ls -l /etc/chrony.conf -rw-r----- 1 root root 992 Aug 31 16:32 /etc/chrony.conf
- 服务配置
[root@node-2 ~]# cat /etc/chrony.conf # Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). server XXXXXXXXXX iburst # Record the rate at which the system clock gains/losses time. driftfile /var/lib/chrony/drift # Allow the system clock to be stepped in the first three updates # if its offset is larger than 1 second. makestep 1.0 3 # Enable kernel synchronization of the real-time clock (RTC). rtcsync # Enable hardware timestamping on all interfaces that support it. #hwtimestamp * # Increase the minimum number of selectable sources required to adjust # the system clock. #minsources 2 # Allow NTP client access from local network. #allow 192.168.0.0/16 # Serve time even if not synchronized to a time source. #local stratum 10 # Specify file containing keys for NTP authentication. #keyfile /etc/chrony.keys # Specify directory for log files. logdir /var/log/chrony # Select which information is logged. #log measurements statistics tracking
处理方法
- 使用了万能的
重启
大法
故障恢复的猜想
- 猜测是该机器所在的虚拟化中的存储出现了问题,导致机器产生了一些问题无法解决,通过重启大法解决了这次初夏那问题。