要解决此问题,请移除audit.log文件,然后验证 cron 作业是否在正常运行:
- 通过 SSH 登录到 vCenter Server Appliance。
- 运行以下命令以启用对 Bash shell 的访问:
shell.set --enabled true
- 键入shell,然后按 Enter。
- 使用以下命令导航到/var/log/audit文件夹:
cd /var/log/audit
- 运行以下命令以验证audit.log文件是否存在问题:
ls -lh
例如:
ls -lh
total 3.5G
drwx------ 2 root root 4.0K May 5 2016 audispd
-rw------- 1 root root 3.5G Feb 3 16:55 audit.log
-rw------- 1 root root 445K Apr 8 2016 audit.log-20160408.bz2
-rw------- 1 root root 447K Apr 9 2016 audit.log-20160409.bz2
-rw------- 1 root root 444K Apr 10 2016 audit.log-20160410.bz2
-rw------- 1 root root 447K Apr 11 2016 audit.log-20160411.bz2
-rw------- 1 root root 445K Apr 12 2016 audit.log-20160412.bz2
-rw------- 1 root root 446K Apr 13 2016 audit.log-20160413.bz2
-rw------- 1 root root 447K Apr 14 2016 audit.log-20160414.bz2
-rw------- 1 root root 446K Apr 15 2016 audit.log-20160415.bz2
-rw------- 1 root root 447K Apr 16 2016 audit.log-20160416.bz2
-rw------- 1 root root 447K Apr 17 2016 audit.log-20160417.bz2
-rw------- 1 root root 445K Apr 18 2016 audit.log-20160418.bz2
-rw------- 1 root root 446K Apr 19 2016 audit.log-20160419.bz2
-rw------- 1 root root 446K Apr 20 2016 audit.log-20160420.bz2
-rw------- 1 root root 445K Apr 21 2016 audit.log-20160421.bz2
-rw------- 1 root root 449K Apr 22 2016 audit.log-20160422.bz2
drwx------ 2 root root 4.0K Apr 23 2015 auditd
在此示例中,上次轮换 audit.log 的时间为 2016 年 4 月 22 日。
- 使用以下命令移除 audit.log 文件:
rm -rf audit.log
- 运行以下命令以查看上次成功运行 cron 作业的时间:
ls -l /var/spool/cron/lastrun/
例如:
ls -l /var/spool/cron/lastrun/
total 0
-rw------- 1 root root 0 Apr 22 2016 cron.daily
-rw------- 1 root root 0 Apr 22 2016 cron.hourly
-rw------- 1 root root 0 Apr 21 2016 cron.weekly
在此示例中,上次运行 cron 作业的时间为 4 月 22 日,与上次轮换日志的时间相同。
- 运行以下命令以检查运行 cron 作业时的凭据错误:
grep "Authentication token is no longer valid; new one required" /var/log/messages.0.log | head
例如:
grep "Authentication token is no longer valid; new one required" /var/log/messages.0.log | head
2016-11-07T00:20:01.617180+00:00 vcenter /usr/sbin/cron[18972]: Authentication token is no longer valid; new one required
2016-11-07T00:20:01.617183+00:00 vcenter /usr/sbin/cron[18974]: Authentication token is no longer valid; new one required
2016-11-07T00:25:01.619783+00:00 vcenter /usr/sbin/cron[31405]: Authentication token is no longer valid; new one required
2016-11-07T00:30:01.622177+00:00 vcenter /usr/sbin/cron[9978]: Authentication token is no longer valid; new one required
2016-11-07T00:30:01.622180+00:00 vcenter /usr/sbin/cron[9975]: Authentication token is no longer valid; new one required
2016-11-07T00:30:01.622182+00:00 vcenter /usr/sbin/cron[9977]: Authentication token is no longer valid; new one required
运行以下命令以检查 root 密码是否已过期:
chage -l root
例如:
chage -l root
Password change requested. Choose a new password.
Old Password:
New password:
- 请根据提示更改 root 密码。
- 验证是否已更改 root 帐户密码:
chage -l root
例如:
chage -l root
Minimum: 0
Maximum: 365
Warning: 7
Inactive: -1
Last Change: Feb 03, 2017
Password Expires: Feb 03, 2018
Password Inactive: Never
Account Expires: Never
- 重新启动所有 vCenter Server 服务。
service-control --stop --all
service-control --start --all