Minecraft 服务器运维常见问题笔录
in Minecraft with 2 comments

Minecraft 服务器运维常见问题笔录

in Minecraft with 2 comments

服务器意外停止系列

因服务器时间与客户端时间不匹配导致

主要提示有:(形似即可,因配置文件不同,数据略有差异)

  1. Can't keep up! Did the system time change, or is the server overloaded? Running 23352870ms behind, skipping 467057 tick(s)
  2. A single server tick took 23361.66 seconds (should be max 0.05)
    (待补充)

主要错误日志如:(形似即可,因配置文件不同,数据略有差异)

[05:11:26] [Server thread/WARN]: Can't keep up! Did the system time change, or is the server overloaded? Running 23352870ms behind, skipping 467057 tick(s)
[05:11:35] [Server Watchdog/FATAL]: A single server tick took 23361.66 seconds (should be max 0.05)
[05:11:38] [Server Watchdog/FATAL]: Considering it to be crashed, server will forcibly shutdown.
[05:11:39] [Server Watchdog/ERROR]: This crash report has been saved to: C:\DATA\minecraft_server\.\crash-reports\crash-2014-11-24_05.11.39-server.txt
[05:11:39] [Server Shutdown Thread/INFO]: Stopping server

问题解析:
如上日志所示,Minecraft 服务端进程被服务器的服务器监视组件(Server Watchdog)杀死。当客户端从休眠状态恢复时,PC 时间和 Minecraft 内部时间不匹配(因为在休眠状态下 Minecraft 进程不运行)。Minecraft 服务器尝试调整它的内部时钟来匹配PC时间(正如我们在日志中看到的:Running 23352870ms behind, skipping 467057 tick(s))。Server Watchdog 杀死进程的本意是好的,然而会导致用户无法进入服务器。(这个时钟错误对游戏运行并无大碍)
解决方案:
进入服务器后台,更改server.properties

max-tick-time = 60000

为:

max-tick-time = -1

将值设置为 -1 实际上是禁用了 Server Watchdog 组件,所以不管 PC 时间和 Minecraft 服务端时间有什么区别,服务器都将调整自己的时间并继续运行。

本文写作于 1年前,文章内容可能已经与事实不符,如有疑问,请咨询作者。

留言:
  1. Rain

    感谢站主!!

    Reply
  2. Rain

    哇,找了半天,终于找到了,谢谢!!!

    Reply