全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 797|回复: 13
打印 上一主题 下一主题

不懂就问,请大佬指点

[复制链接]
跳转到指定楼层
1#
发表于 2019-12-7 12:37:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
系统环境Debian10,某妇抢程序需要时间精准,所以用了ntp,但是ntp服务无法启动。

如下

  1. root@PH:~# apt-get install ntp
  2. 正在读取软件包列表... 完成
  3. 正在分析软件包的依赖关系树      
  4. 正在读取状态信息... 完成      
  5. 建议安装:
  6.   ntp-doc
  7. 下列【新】软件包将被安装:
  8.   ntp
  9. 升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
  10. 需要下载 761 kB 的归档。
  11. 解压缩后会消耗 2,062 kB 的额外空间。
  12. 获取:1 http://ftp.ca.debian.org/debian buster/main amd64 ntp amd64 1:4.2.8p12+dfsg-4 [761 kB]
  13. 已下载 761 kB,耗时 1秒 (1,336 kB/s)
  14. 正在选中未选择的软件包 ntp。
  15. (正在读取数据库 ... 系统当前共安装有 24680 个文件和目录。)
  16. 准备解压 .../ntp_1%3a4.2.8p12+dfsg-4_amd64.deb  ...
  17. 正在解压 ntp (1:4.2.8p12+dfsg-4) ...
  18. 正在设置 ntp (1:4.2.8p12+dfsg-4) ...
  19. Created symlink /etc/systemd/system/multi-user.target.wants/ntp.service → /lib/systemd/system/ntp.service.
  20. Job for ntp.service failed because of unavailable resources or another system error.
  21. See "systemctl status ntp.service" and "journalctl -xe" for details.
  22. invoke-rc.d: initscript ntp, action "start" failed.
  23. ● ntp.service - Network Time Service
  24.    Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
  25.    Active: failed (Result: resources)
  26.      Docs: man:ntpd(8)

  27. 12月 07 01:43:41 PH.Paleur systemd[1]: ntp.service: Failed to run 'start' task: No such file or directory
  28. 12月 07 01:43:41 PH.Paleur systemd[1]: ntp.service: Failed with result 'resources'.
  29. 12月 07 01:43:41 PH.Paleur systemd[1]: Failed to start Network Time Service.
  30. 12月 07 01:56:32 PH.Paleur systemd[1]: ntp.service: Failed to run 'start' task: No such file or directory
  31. 12月 07 01:56:32 PH.Paleur systemd[1]: ntp.service: Failed with result 'resources'.
  32. 12月 07 01:56:32 PH.Paleur systemd[1]: Failed to start Network Time Service.
  33. 12月 07 12:29:53 PH.Paleur systemd[1]: ntp.service: Failed to run 'start' task: No such file or directory
  34. 12月 07 12:29:53 PH.Paleur systemd[1]: ntp.service: Failed with result 'resources'.
  35. 12月 07 12:29:53 PH.Paleur systemd[1]: Failed to start Network Time Service.
  36. dpkg: 处理软件包 ntp (--configure)时出错:
  37. 已安装 ntp 软件包 post-installation 脚本 子进程返回错误状态 1
  38. 正在处理用于 systemd (241-7~deb10u2) 的触发器 ...
  39. 在处理时有错误发生:
  40. ntp
  41. E: Sub-process /usr/bin/dpkg returned an error code (1)
复制代码


菜鸡一个,不知道怎么处理,求大佬指点
2#
发表于 2019-12-7 12:49:01 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
3#
 楼主| 发表于 2019-12-7 12:55:31 | 只看该作者
hehe 发表于 2019-12-7 12:49
Debian 10 为什么还用 ntp ?

直接从Debian8升级上来的,请问还能使用什么网络同步时间的软件吗?
4#
发表于 2019-12-7 13:02:41 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
5#
 楼主| 发表于 2019-12-7 13:10:31 | 只看该作者
hehe 发表于 2019-12-7 13:02
CentOS官方嫌 ntp 在老旧硬件设备和网络不稳定的环境都会出现时间不准的问题,从 CentOS 7 开始系统内置 ...

之前Debian8我修改好时区和时间后,过几天就发现时间不对了。
所以用了ntp。
请问大佬说的这个内置的校时服务名称是?我查一下怎么使用
网上能找到的校时服务都是ntp的教程
6#
发表于 2019-12-7 13:15:11 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
7#
 楼主| 发表于 2019-12-7 13:24:21 | 只看该作者
hehe 发表于 2019-12-7 13:15
不用设置,默认就是开机自动启动的

大佬,您看

  1. root@PH:~# systemctl status systemd-timesyncd
  2. ● systemd-timesyncd.service - Network Time Synchronization
  3.    Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  4.   Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
  5.            └─disable-with-time-daemon.conf
  6.    Active: failed (Result: resources) since Sat 2019-12-07 13:18:49 CST; 4min 45s ago
  7.      Docs: man:systemd-timesyncd.service(8)

  8. 12月 07 13:18:49 PH.Paleur systemd[1]: systemd-timesyncd.service: Service has no hold-off time (RestartSec=0), sched
  9. uling restart.
  10. 12月 07 13:18:49 PH.Paleur systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 5.
  11. 12月 07 13:18:49 PH.Paleur systemd[1]: Stopped Network Time Synchronization.
  12. 12月 07 13:18:49 PH.Paleur systemd[1]: systemd-timesyncd.service: Start request repeated too
  13. quickly.
  14. 12月 07 13:18:49 PH.Paleur systemd[1]: systemd-timesyncd.service: Failed with result 'resour
  15. ces'.
  16. 12月 07 13:18:49 PH.Paleur systemd[1]: Failed to start Network Time Synchronization.
复制代码
8#
发表于 2019-12-7 13:37:38 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
9#
发表于 2019-12-7 13:38:40 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
10#
 楼主| 发表于 2019-12-7 13:48:42 | 只看该作者
hehe 发表于 2019-12-7 13:37
第一步:卸载 ntp
第二步:激活 systemd-timesyncd 开机自启动
第三步:重启服务器

还是和上面的报错一样

  1. root@PH:~# systemctl status systemd-timesyncd
  2. ● systemd-timesyncd.service - Network Time Synchronization
  3.    Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled)
  4.   Drop-In: /lib/systemd/system/systemd-timesyncd.service.d
  5.            └─disable-with-time-daemon.conf
  6.    Active: failed (Result: resources) since Sat 2019-12-07 13:39:16 CST; 7min ago
  7.      Docs: man:systemd-timesyncd.service(8)

  8. 12月 07 13:39:16 PH.Paleur systemd[1]: systemd-timesyncd.service: Service has no hold-off time (RestartSec=0), sched
  9. uling restart.
  10. 12月 07 13:39:16 PH.Paleur systemd[1]: systemd-timesyncd.service: Scheduled restart job, restart counter is at 5.
  11. 12月 07 13:39:16 PH.Paleur systemd[1]: Stopped Network Time Synchronization.
  12. 12月 07 13:39:16 PH.Paleur systemd[1]: systemd-timesyncd.service: Start request repeated too
  13. quickly.
  14. 12月 07 13:39:16 PH.Paleur systemd[1]: systemd-timesyncd.service: Failed with result 'resour
  15. ces'.
  16. 12月 07 13:39:16 PH.Paleur systemd[1]: Failed to start Network Time Synchronization.
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-12-16 01:04 , Processed in 0.064777 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表